Fawny Kate said:
Would it be possible to add this to yaustar's code::block dev environment ?
In any case, thank you Kidchaos2k6, I too, would greatly appreciate it if you would post your solution here
.
Dont mention, i have made a few patches which luckily worked...
About codeblocks, im sorry but never used it,...
Well, a few explanations: Basically, im using chui's SDL4GP libs with the x_gp32 SDK that its included, and everything has to be compiled from source. Im using the latest EABI DKARM which works swell for me...
- First compile x_gp32 using -DREENTRANT_SYSCALLS_PROVIDED and -specs=gp32.specs (ie i use the link scripts from DKARM, not the ones included), also in syscalls i changed all file functions _xxxx to _xxxx_r (ie _read to _read_r, _write to _write_r, etc...)...
- I took from any crt0x_gp32.s on the example dir this code and created this initGP function, and you can use Mymain() or whatever you like as standard entry point for your app, but remember to call this first...
void initGP()
{
asm volatile(" \n"
" bl SmcInit \n"
" mov r1, #8 \n "
" mov r2, #50 \n "
" mov r0, #208666624 \n "
" add r0, r0, #737280 \n "
" bl x_gp32_initFramebuffer \n"
" mov r0, #208666624 \n "
" add r0, r0, #737280 \n "
" bl x_gp32_SetLcdBuffer \n "
" mov r0, #208666624 \n "
" add r0, r0, #737280 \n "
" bl x_gp32_SetPrintBase \n "
" bl x_gp32_init_timer \n "
" \n"
:
:
:"r0", "r1", "r2");
}
int main (int arg_len, char ** arg_v)
{
x_gp32_SetCPUSpeed_133();
initGP();
Mymain();
}
Remember that for testing files, do not use gp:\\ but /, like this
Mix_LoadMUS("/ogg/sexy.ogg");
- After that you can recompile the rest of the SDL libs and everything works fine (timers, audio, video)...
- Btw, Im also using gptremor libs from the svorbis player and it works with SDL_mixer just changing the ov_ functions, and in OGG_getsome passing unsigned buffers by using "SDL_BuildAudioCVT(cvt, AUDIO_U16,..." the performance is not bad but i wanted to port beat2x to the gp and i think its still not possible
I still dont know if this is the best solution, as i have seen that other people prefers the official SDK, and also others talked about the Gp32 RTEMS (never get to compile) which seems to work great and to compile even SDL-1.2.8 ((GP32-AW was an amazing port!!) )...
Anyway, I hope this help some people to do something else with the GP, and im expecting to see the compo gp32_console entries !!
Regards,
@B^)>