Latest Files |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
File Info |
Browsing as Guest |
|
|
Updated: 22nd October 2006.
This is a program that I originally wrote to test out some of the SDL functions and extra Libraries such as SDL_TTF, SDL_Image, SDL_Mixer to see if they are working correctly with my dev setup.
No idea if it will be of any use to people but it makes a nice first program to compile and test your dev setup and also to maybe learn how to setup a program to run on the GP2X and PC. It is also used a s an example in the GP2X User Guide for the introduction to developing on the GP2X.
So far it does a test for the usual libs such as the below and more:
SDL_TTF - True Type Font text SDL_Mixer - WAV, MOD, MP3 and OGG playback. OGG playback has volume and pause controls. MOD Playback seems to be slow at the moment, possible bug when compiling for GP2X? SDL_Image - PNG, BMP and JPEG display with and without transparency Input - GP2X and PC simulated buttons, useful when testing on PC SDL Timer - Small example to make a timer
NOTE: To save download time I have not included example MP3 or OGG files. To do the test you must have a music.mp3 and music.ogg in the /sdltest/ folder.
If you do want to test a certain function just comment out the functions code and it should run fine. Dont forget to copy the /sdltest/ folder to your SD Card otherwise it wont run correctly, I also added a GPE if you just want to check it out without compiling. |
|
|
|
Operating Systems: |
gp2x F100 gp2x F200
|
|
|
Connection |
Download Time |
56k Modem |
4 mins, 6 secs |
128k ISDN |
1 mins, 72 secs |
256k Cable/DSL |
49.6 secs |
512k Cable/DSL |
25.8 secs |
1mbit Link |
12.8 secs |
|
|
|
|
|
Download |
Please note: The comment section is NOT intended to ask for help. Please use the I need Help-Section at the boards.
19 Comments |
|
|
This is an awesome test program... Thank you!!! I had to add in the line to allow the GP2X to choose the MOD Test, but it crashed the unit after a few seconds of playing. Also, the standard 'accept' button is B, not X. |
|
|
mod playback seems to be dodgy in sdl at the moment, its why i originally disabled the option in the first release of this test code.
the problem may be part due to the mod i used but i tried a few and all had problems. |
|
|
When i try to compile (crosscompile under windows) i get the following error:
> "make"
C:/devkitGP2X/bin/arm-linux-g++ -static -o sdltest.gpe sdltest.o `C:/devkitGP2X/bin/arm-linux-sdl-config --libs`
sdltest.o: In function `Shutdown()':
sdltest.cpp:(.text+0x24): undefined reference to `Mix_FreeChunk'
sdltest.cpp:(.text+0x30): undefined reference to `Mix_FreeMusic'
sdltest.cpp:(.text+0x34): undefined reference to `Mix_CloseAudio'
sdltest.cpp:(.text+0x40): undefined reference to `TTF_CloseFont'
sdltest.cpp:(.text+0x44): undefined reference to `TTF_Quit'
sdltest.o: In function `LoadFont(unsigned char)':
sdltest.cpp:(.text+0x8c): undefined reference to `TTF_OpenFont'
sdltest.o: In function `drawText(SDL_Surface*, char*, int, int, int, int, int)':
sdltest.cpp:(.text+0xe8): undefined reference to `TTF_RenderText_Blended'
sdltest.o: In function `drawTextInt(SDL_Surface*, int, int, int, int, int, int)':
sdltest.cpp:(.text+0x190): undefined reference to `TTF_RenderText_Blended'
sdltest.o: In function `TestSDLImage()':
sdltest.cpp:(.text+0x3e0): undefined reference to `IMG_Load'
sdltest.cpp:(.text+0x494): undefined reference to `IMG_Load'
sdltest.cpp:(.text+0x534): undefined reference to `IMG_Load'
sdltest.o: In function `TestSDLMixerWAV()':
sdltest.cpp:(.text+0xae8): undefined reference to `Mix_LoadWAV_RW'
sdltest.cpp:(.text+0xb08): undefined reference to `Mix_PlayChannelTimed'
sdltest.cpp:(.text+0xb14): undefined reference to `Mix_Playing'
sdltest.o: In function `TestSDLMixerOGG()':
sdltest.cpp:(.text+0xbc4): undefined reference to `Mix_LoadMUS'
sdltest.cpp:(.text+0xbd4): undefined reference to `Mix_PlayMusic'
sdltest.cpp:(.text+0xdb8): undefined reference to `Mix_ResumeMusic'
sdltest.cpp:(.text+0xe04): undefined reference to `Mix_HaltMusic'
sdltest.cpp:(.text+0xe28): undefined reference to `Mix_RewindMusic'
sdltest.cpp:(.text+0xe30): undefined reference to `Mix_RewindMusic'
sdltest.cpp:(.text+0xe44): undefined reference to `Mix_VolumeMusic'
sdltest.cpp:(.text+0xe78): undefined reference to `Mix_ResumeMusic'
sdltest.cpp:(.text+0xe90): undefined reference to `Mix_VolumeMusic'
sdltest.cpp:(.text+0xea4): undefined reference to `Mix_PauseMusic'
sdltest.cpp:(.text+0xeb0): undefined reference to `Mix_PauseMusic'
sdltest.o: In function `TestSDLMixerMOD()':
sdltest.cpp:(.text+0xf68): undefined reference to `Mix_LoadMUS'
sdltest.cpp:(.text+0xf78): undefined reference to `Mix_PlayMusic'
sdltest.cpp:(.text+0xf88): undefined reference to `Mix_HaltMusic'
sdltest.o: In function `main':
sdltest.cpp:(.text+0x10ec): undefined reference to `TTF_Init'
sdltest.cpp:(.text+0x1100): undefined reference to `Mix_OpenAudio'
"make": *** [sdltest.gpe] Error 1
|
|
|
SOLInvictus - make sure that the arm-linux-sdl-config.rar is downloaded and extracted to the correct place as shown in the guide. |
|
|
Hi Guyfawkes! I tried to find a arm-linux-sdl-config.rar but the only link i got is not working anymore - get a 404 ( https://www.emuholic.com/arm-linux-sdl-config.rar ). So where to download that? |
|
|
sorry SOLInvictus, i had changed the DNS on monday for emuholic.com as the domain is changing server. download the new v1.2.1 user guide which should be online shortly for a new dev setup section or download theoodbots libs in the Development -> Libraries section as this now contains the needed arm-linux-sdl-config files. sorry for the trouble its caused, had to change the DNS though. |
|
|
Thx Guyfawkes!!
It worked for me!
I only get one warning:
> "make"
C:/devkitGP2X/bin/arm-linux-g++ -static -o sdltest.gpe sdltest.o `C:/devkitGP2X/bin/arm-linux-sdl-config --libs`
C:/devkitGP2X/lib\libmikmod.a(mdriver.o): In function `MD_DropPrivileges':
mdriver.c:(.text+0x2cf4): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
C:/devkitGP2X/bin/arm-linux-strip sdltest.gpe
> Process Exit Code: 0 |
|
|
you can ignore the Using 'getpwnam'... error |
|
|
This is such a great demonstration! Thank you so much, it is exactly what I was looking for. If you download it and want a good guide on how to compile it on your Windows box for yourself, see here: https://wiki.gp2x.org/wiki/Using_CodeBlocks |
|
|
Seems sdltest.h file is missing in 1.5 version! |
|
|
sorry, somehow I forgot to add the file to the zip. I have just submitted an update and when its accepted you can download v1.51 |
|
|
you can also download the latest version from my software homepage at https://www.emuboards.com/guyfawkes/ |
|
|
|
|
will someone pleas make a wifi suport so we can use all thes web browsers?!?!?!?!?!?!?!?! |
|
|
Useful ! Tnx.
Just a note... it would be better to change the Makefile, adding a var:
DEVKIT_GP2X = $(DEVKITARM)
and changing every "C:/devkitGP2X" string with "$(DEVKIT_GP2X)" |
|
|
Great piece of code, thank you! |
|
|
Hum,
Linking console executable:
bin/Release/arm-openwiz-linux-gnu/lib/libSDL.a(SDL_sysloadso.o): In function `SDL_UnloadObject':
SDL_sysloadso.c:(.text+0x8): undefined reference to `dlclose'
/arm-openwiz-linux-gnu/lib/libSDL.a(SDL_sysloadso.o): In function `SDL_LoadFunction':
SDL_sysloadso.c:(.text+0x20): undefined reference to `dlsym'
SDL_sysloadso.c:(.text+0x78): undefined reference to `dlsym'
SDL_sysloadso.c:(.text+0x84): undefined reference to `dlerror'
/arm-openwiz-linux-gnu/lib/libSDL.a(SDL_sysloadso.o): In function `SDL_LoadObject':
SDL_sysloadso.c:(.text+0xac): undefined reference to `dlopen'
SDL_sysloadso.c:(.text+0xb4): undefined reference to `dlerror'
collect2: ld returned 1 exit status
Finally got it down to 6 errors but can't figure out why still. |
|
|
Something to do with this maybe: cannot find -lsmpeg |
|
|
|
%%COMMENTFORM%% |
|
|
|
|
|
|
Powered by
CFiles 2.0-b10
Copyright © 2002-2003 Carrick Information
Technologies |
Most Downloads |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|