Gp32 dev questions


XboxMessiag

Still Fresh
Joined
Nov 15, 2022
Messages
15
Hi there people of the internet, so anyways im just started getting back into the gp32 scene, but now its time for me to make games for it. But I have a couple questions about it.
1. What SDK should I use in 2025?
2. How can I go about creating sprites from .GIF files?
3. How can I go about including digital music or midi music in my games?
If I have any more questions, ill try to add them to this post. Thx and have a happy holidays + sorry for sounding like a noob. Thx
 
Devkitpro still has a gp32 group with libmirko, you'll struggle to get much help with it these days though. Various libraries and tools are available in their repo compiled for armv4 which you could use for loading images and sound .
 
Good luck with your development!

Based on instructions I found on the internet:

1. Getting started with SDK
go to: https://devkitpro.org/
Download: devkitPro pacman installer

In devkitPro MSYS2 terminal run:
sudo dkp-pacman -Syu
sudo dkp-pacman -S gp32-dev

Restart the terminal run the following to clone the repo with demo's:
git clone https://github.com/devkitPro/gp32-examples

Build the demo files with this command:
cd gp32-examples/some_example && make

Some other sources: https://dl.openhandhelds.org/cgi-bin/gp32.cgi?cat=19,0,0,0,19


2. Sprites from GIF
You cannot directly convert gif to sprites, but you can use Gimp to convert a GIF to a BMP: In GIMP select Image -> Decompose to layers.
For each frame resize to 32x32 pixels and export them as a 16-bit BMP.
In GP32 tools you can use bmp2bin or bin2c to binary or hex. There is some way to embed BMP in the FXE by using fxebuild.


3. Sound
In libmirko are some audio functions:
//init audio
gp_initSound(44100, 16, 1); // freq, bits, stereo
//Sample
#define REF_NAME 0
extern u8 demoaudio[]; //generate with adpcmenc
extern u32 demoaudio_len;
gp_addSample(REF_NAME, demoaudio, shoot_adpcm_len, 44100, 16, 0);
gp_playSample(REF_NAME, 255, 128, 0); // volume=255, pan=128 (center)
//MOD
extern u8 music_mod[]; //convert .mod to array using raw2c or bin2c
extern u32 music_mod_len;
gp_startModfile(music_mod, music_mod_len, 1); // 1 = loop forever
//end
gp_stopMod();
gp_resetSound();
 
Back
Top