GP2X minimal library v0. B by rlyeh, 2005

GP2X minimal library by rlyeh, 2005. emulnation.info@rlyeh (swap it!)

  • GP2X 920t/940t CPUs library with a FIFO message system.
  • GP2X 32 bits YUV video library using double buffering.
  • GP2X 15/16 bits RGB video library using double buffering.
  • GP2X 8 bits RGB video library using quadruple buffering.
  • GP2X sound library using octuple buffering.
  • GP2X blitter library.
  • GP2X timer library.
  • GP2X font library.
  • GP2X joystick library.

Thanks to Squidge, Robster, snaff, Reesy, NK and foft, for the help & previous work!  :-)

License

  • Free for non-commercial projects (it would be nice receiving a mail from you).  Other cases, ask me first.
  • GamePark Holdings is not allowed to use this library and/or use parts from it.

Known projects using the library or parts from it

  • Atari800 GP2X (foft)
  • D3DGP2XCross (FredrikH)
  • DrMDx (Reesy)
  • File Frontend (kounch)
  • GNUBoy2x (K-teto)
  • GP2Xengine (Hermes/PS2Reality)
  • Handy2X (Tharos)
  • MAME2X (Franxis)
  • NeoPop GP2x (madelman)
  • REminiscence (rlyeh)
  • XUMP (kedo)

What’s missing

  • OSD layer
  • fine scaling (post scaling)
  • rotation
  • hardware blitting
  • file handling
  • BMP/PSD image handling

What’s new:

0.B: preliminary documentation. Created with NaturalDocs (thanks synkro for the tip!).
preliminary Cursor layer support.
preliminary RGB windows support.
preliminary RGB alpha blending support.
preliminary RGB key colouring support.
preliminary RGB coarse scaling support.
preliminary YUV layer support.
preliminary YUV regions support.
preliminary YUV splitting screen support.
preliminary YUV mirroring support.
preliminary YUV coarse scaling support.
preliminary Gamma correction support.
preliminary dithering support (untested).
preliminary font support. Using public domain 6x10 console font.
using octuple buffering for sound now.
new 16 bits RGB video mode.

improved functions:
- gp2x_dualcore_exec() ; it queues up to 1000 commands (dualcore should work better now)

fixed functions:
- gp2x_blitter_rect() ; fixed stupid typo (thanks slygamer for the bug report)

added structs:
- gp2x_video_YUV[0,1,2,3] which contain {*screen8,*screen16,*screen32} pointers
- gp2x_video_RGB[0] which contains {*screen8,*screen16,*screen32} pointers

added functions:
- gp2x_video_YUV_color()
- gp2x_video_YUV_flip()
- gp2x_video_YUV_setregions()
- gp2x_video_YUV_setscaling()
- gp2x_video_RGB_color16()
- gp2x_video_RGB_setwindows()
- gp2x_video_RGB_setscaling()
- gp2x_video_RGB_setcolorkey()
- gp2x_video_setluminance()
- gp2x_video_setgammacorrection()
- gp2x_video_waitvsync()
- gp2x_video_waithsync()
- gp2x_printf_init()
- gp2x_printf()

deprecated variables:
- *gp2x_screen15
- *gp2x_screen8

changed functions:
- gp2x_video_flip() to gp2x_video_RGB_flip()
- gp2x_video_setpalette() to gp2x_video_RGB_setpalette()
- gp2x_video_color15(R,G,B,A) to gp2x_video_RGB_color15(R,G,B,A)
- gp2x_video_color8(C,R,G,B) to gp2x_video_RGB_color8(R,G,B,C) ; note that order of parameters has changed in this function.
- gp2x_init() to gp2x_init() ; it has an extra parameter now

0.A: 940t disabled all time unless required
sound is paused by default now, use gp2x_sound_pause() to unlock it

fixed functions:
- gp2x_sound_play() ; increased the number of sampling buffers
- gp2x_timer_read() ; it should work again. broken at some point before
- gp2x_dualcore_launch_program_from_disk() ; it missed the code uploading call

added functions:
- gp2x_sound_pause()
- gp2x_timer_delay()
- gp2x_dualcore_pause()

0.9: initial FIFO message system for dual cpu cores.
initial 48 Mb support.
initial quadruple buffering in 8bbp mode.

added functions:
- gp2x_dualcore_exec() ; initial FIFO message system for dual cpu cores.
- gp2x_dualcore_sync() ; initial FIFO message system for dual cpu cores.

improved functions:
- gp2x_video_flip() ; initial quadruple buffering in 8bbp mode.

0.8: initial dual cores cpu support.
very basic blit functions by popular demand ;-)
vsync & hsync waiting code (thanks Reesy)

added functions:
- gp2x_launch_program() ; initial dual cores cpu support.
- gp2x_launch_program_from_disk() ; initial dual cores cpu support.
- gp2x_launch_subprogram() ; initial dual cores cpu support.
- gp2x_blitter_rect15() ; very basic blit function by popular demand ;-)
- gp2x_blitter_rect8() ; very basic blit function by popular demand ;-)
- gp2x_video_hsync() ; hsync waiting code (thanks Reesy)
- gp2x_video_vsync() ; vsync waiting code (thanks Reesy)

fixed functions:
- gp2x_video_color8() ; bugfixed a stupid typo (thanks Franxis for the bug report)

0.7: added functions:
- gp2x_sound_volume()

fixed functions:
- gp2x_deinit() ; fixed menu launch code when exiting.

improved functions:
- gp2x_timer_read() ; rewritten timer. it should be more accurate now.
- gp2x_init() ; faster init code.

0.6: added functions:
- gp2x_timer_read()
- gp2x_sound_pause()

fixed functions:
- gp2x_video_setpalette() ; palette handling was incorrect. fixed.

0.5: improved functions:
- gp2x_init() ; better and cleaner initalizing code.
- gp2x_init() ; sound patched for real stereo output (by using NK's solution)

0.4: lots of cleanups.
sound is threaded and double buffered now.
8 bpp video support.

fixed functions:
- gp2x_deinit() ; better and cleaner exiting code.

0.3: shorter library.

fixed functions:
- gp2x_joystick_read() ; improved joystick diagonal detection.

0.2: better code layout.
public release.

0.1: beta release.