Author Topic: [Release] libvita2d_sys - libvita2d for system mode applications  (Read 21828 times)

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
[Release] libvita2d_sys - libvita2d for system mode applications
« on: February 16, 2020, 10:59:11 PM »
libvita2d_sys is modification of libvita2d with new features and support for "system mode" applications.

Exclusive features of libvita2d_sys:

- "system mode" that actually works.
- support for custom display resolutions, including 1280x720 and 1920x1080 (with Sharpscale https://forum.devchroma.nl/index.php/topic,112.0.html) or 1280x725 and 1920x1088 (without Sharpscale on PS TV).
- Hardware decoding for JPEG textures using Codec Engine.
- Supports loading textures using FIOS2 overlay (for example, directly from PSARC archives).
- Supports GXT textures.
- Extended PVF functionality.
- More coming soon!

Download suprx module version of the library: https://github.com/GrapheneCt/libvita2d_sys/releases/tag/v1.0

https://github.com/GrapheneCt/libvita2d_sys
« Last Edit: July 14, 2020, 06:53:22 PM by Graphene »

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #1 on: February 23, 2020, 10:47:01 PM »
Fixed the way shared fb is swapped. SceShell overlay shoud work properly now.

Framebuffer swapping in libvita2d_sys is now performed automatically. vita2d_swap_buffers() does not exist anymore.

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #2 on: April 05, 2020, 05:58:21 PM »
- Switched to DolceSDK.
- JPEG textures are now decoded on dedicated hardware using scejpeg.

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #3 on: April 20, 2020, 01:34:14 AM »
libvita2d_sys has been updated!

- libvita2d_sys now supports both "system mode" and "game mode" applications. Appropriate GXM mode and framebuffer mode are set automatically when vita2d_init() is called.
- Loading textures using FIOS2 overlay is now supported (for example, loading directly from PSARC archive). When calling vita2d_load_XXX_file() specify 1 for io_type to use FIOS2 or 0 to use SceIo.
« Last Edit: April 20, 2020, 03:35:14 AM by Graphene »

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #4 on: April 21, 2020, 05:28:47 PM »
libvita2d_sys has been updated!

-libvita2d_sys now uses only sceClib functions for std C

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #5 on: May 30, 2020, 05:16:05 PM »
libvita2d_sys has been updated!

New:

- GXT textures are now supported. All GXT texture formats are supported, including compressed textures. Since single gxt file can contain multiple textures, loading and freeing procedures differ from the standard ones, more info in example below.
- Added vita2d_JPEG_decoder_initialize_with_params() - can be used to reduce memory footprint of JPEG decoder (by default decoder is initialized with max size for all buffers).

Changed:

- Changed fw version in shared fb init procedure to 3.57.

GXT textures usage example:

In this example, gxt file contains 3 textures:

vita2d_texture *tex1, *tex2, *tex3;

/* Load master texture. For this texture, index value must be 0. Set io_type to 1 if you are loading from FIOS2 overlay */

tex1 = vita2d_load_GXT_file("app0:texture.gxt", 0, 0);

/* Load slave textures. Index value depends on the file order set when creating gxt file */

tex2 = vita2d_load_additional_GXT(tex1, 1);
tex3 = vita2d_load_additional_GXT(tex1, 2);

.
.
.

/* Slave textures must be unloaded first. Master texture must be unloaded last. */

vita2d_free_texture(tex3);
vita2d_free_texture(tex2);
vita2d_free_texture(tex1);

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #6 on: June 09, 2020, 11:26:01 PM »
libvita2d_sys has been updated!

New:

- Updated to accomodate changes in DolceSDK.
- JPEG decoder can now be initialized to use main memory. Specify 0 for useMainMemory to use phycont memory or 1 to use main user memory.
Note that using phycont memory results in faster decoding process, so use main memory only when phycont memory is not available.

Changed:

- Memory for GXM render target is now allocated explicitly.

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #7 on: June 20, 2020, 07:34:52 PM »
libvita2d_sys has been updated!

General:

- Added vita2d_init_with_msaa_and_memsize(), wich allows initialization with set sizes for GXM buffers.
- For game mode, CDRAM is used for textures by default.
- Added simple widgets. For now only buttons are available:

vita2d_sys_create_widget_button()
vita2d_sys_delete_widget()
vita2d_sys_draw_widget()
vita2d_sys_widget_set_xy()
vita2d_sys_widget_set_text()
vita2d_sys_widget_set_visibility()
vita2d_sys_widget_set_highlight()
vita2d_sys_widget_get_x()
vita2d_sys_widget_get_y()
vita2d_sys_widget_set_highlight_max()

JPEG decoder:

- Reduced memory footprint of JPEG decoder (amount of required memory is calculated for each picture individually).
- Added ability to enable/disable downscale mode and set downscale margins.

Bugfixes:

- Fixed a bug that caused issues with multithreaded drawing

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #8 on: June 28, 2020, 03:34:45 AM »
libvita2d_sys has been updated!

Added support for custom display resolutions. That includes 1280x720 and 1920x1080 with Sharpscale (https://forum.devchroma.nl/index.php/topic,112.0.html)

To set custom resolution, call vita2d_display_set_resolution() before initializing the library:

void vita2d_display_set_resolution(int hRes, int vRes); //Set display resolution.

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #9 on: June 28, 2020, 11:58:27 PM »
Small correction: Sharpscale is only required for 1280x720 and 1920x1080 or for normal Vita.
1280x725 and 1920x1088 can be used without Sharpscale on PS TV only.
« Last Edit: June 29, 2020, 12:31:48 AM by Graphene »

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #10 on: July 02, 2020, 01:06:28 AM »
libvita2d_sys has been updated!

JPEG decoder:

Added ability to use ARM to decode JPEG (sceJpegArm sysmodule is used). Decoding is performed a little bit slower, but has much smaller memory footprint:

vita2d_JPEG_ARM_decoder_initialize()
vita2d_JPEG_ARM_decoder_finish()
vita2d_load_JPEG_ARM_file()
vita2d_load_JPEG_ARM_buffer()

GXT:

Added vita2d_free_additional_GXT(), wich provides a faster way to free additional GXT textures.

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #11 on: July 14, 2020, 06:51:46 PM »
libvita2d_sys has been updated!

1. Added suprx module version of the library.

Download here: https://github.com/GrapheneCt/libvita2d_sys/releases/tag/v1.0

It is recommended that you use this version of the library, however it has certain limitaions compaired to static version:

  - PNG textures are not available.
  - FT2 font functions are not available. You can use PVF font functions to work with external fonts.

2. Switched to sceDbg logging.

  - You can now set logging level for vita2d_sys from your application during runtime.
  - By default logging level is set to SCE_DBG_LOG_LEVEL_ERROR after calling vita2d_clib_pass_mspace(), or after starting module for suprx module version.
  - Use sceDbgSetMinimumLogLevel() to set your prefered logging level after default level has been set.
  - Maximum level that vita2d_sys uses is SCE_DBG_LOG_LEVEL_DEBUG.
« Last Edit: July 14, 2020, 06:53:36 PM by Graphene »

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: [Release] libvita2d_sys - libvita2d for system mode applications
« Reply #12 on: August 27, 2020, 02:41:39 AM »
libvita2d_sys has been updated!

1. General:

1.1 Changed internal memory management. Simplified initialization procedure.
Following functions are now deprecated:
vita2d_pass_mspace()
Call vita2d_set_heap_size() before initialization to change internal memory heap size from default (1MB).

Note that internal heap will be automatically extended or reduced if needed.

1.2 Various bugfixes.

2. PVF:

2.1 Improved PVF font rendering. Following functions are now deprecated:
vita2d_pvf_draw_text_ls()
vita2d_pvf_draw_textf_ls()
Use vita2d_pvf_linespace() instead.

2.2 Added ability to load custom PVF font from memory. Use vita2d_load_custom_pvf_buffer().

2.3 Added ability to set character spacing interval. Use vita2d_pvf_charspace().

2.4 Default system PVF font is now opened on shared memory.

3. PGF:

3.1 Added ability to load custom PGF font from memory. Use vita2d_load_custom_pgf_buffer().

4. Font (FT2):

4.1 vita2d_font_xxx functions are now deprecated. Use vita2d_pvf_xxx instead.