GP2X Gp2x Code::blocks Pre-configuration Rc4


yaustar

UK GP32 & GP2X Owner
Joined
Oct 18, 2003
Messages
2,714
Location
UK
Website
Visit site
Hiya all,

Requesting some help testing this pre-configuration please (including testing the binaries on GP2x ;) ) especially if you have Vista:

http://www.sendspace.com/file/8ritz8

Cheers

Steven

QUOTE
================================================================================
GP2X Code::Blocks complete development setup RC 4
By Steven Yau
Email yaustar_8p@yahoo.co.uk
================================================================================
> What is this?
- This is a complete development environmet for GP2X development as a complate
preconfigured package as many people are still having trouble setting up the
toolchain, IDE, etc from the Wiki.

> What is included?
- Code::Blocks IDE nightly build (10 Aug 2007): http://www.codeblocks.org/
- MinGW compiler: http://www.mingw.org/
- SDL libraries: http://www.libsdl.org/
- DJWillis Open2x SDK: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1918
+ Updated Open2x libs (21 Feb 2007):
http://wiki.open2x.org/open2x/wiki/index.p...ibrary_Packages
- Octoate's DevkitGP2x SDK (6 March 2006):
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1362
+ Guyfawke updated SDL libraries (21 October 2006):
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,19,1875
- Guyfawkes SDL test: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,46,1047
[Modified by me with Code::Blocks project setup and PC build]
- SDL template project by myself based from Lazy Foo's tutorials
http://lazyfoo.net/SDL_tutorials/index.php

> What isn't included?
- A warranty. You run this setup at your own risk. I am not to blame if anything
goes wrong with the PC, GP2X or anything as a result of the use of these
programs.

- Personal support. Please do not PM me for extra help in setting this up. Post
in the release threads and I will do my best to get round to you. This stops the
same problem being sent to me dozens of times.

> How to install
- *IMPORTANT*
To use this, you must delete your current Code::Blocks user settings. This
is the only way that we can get C::B to check for local settings. To delete
your current user settings, go to %APPDATA% (or
C:\Documents and Settings\User_name\Application Data) and delete the
codeblocks folder.

- Decompress the package to the root of the C drive.

- You will have the following folders:
- CodeBlocks
- devkitGP2X
- Open2x
- GP2X Template
- MinGW
- SDL Test

- MinGW, Open2x and devkitGP2X MUST stay at the root of the C: drive for the
pre-config to work. If you want them somewhere else, you have to change the paths
yourself. The other folders can be moved whereever you want.

- [Skip this step if you don't want to use file association]
- Run Codeblocks.exe. Go to Settings->Environment Settings. On General
settings, tick the box for Check & set file associations and press the
button Set now.

- That's it, everything is ready to go.

> Extra notes on the folders
- SDL Test: This contains a modified version of Guyfawkes SDL test code. The
project can buld either the PC or the GP2X version. The execuatables are built
to the built sub directory.

- GP2X Template
- This is a simple Hello world template that you can copy the entire directory
to start a brand new project. It has been preconfigured for 3 bulid targets:
- PC Debug: You main development build
- PC Release: Optimised build to release to peers/users
- DevKitGP2x Release: Optimised build for GP2X platform using the DevkitGP2x
SDK
- Open2x Release: Optimised build for GP2X platform using the Open2x SDK

- The executables are built to the built sub directory.

- You can change all the settings, output file names etc in Project->Properties.

> LGPL and GPL issues
- *IMPORTANT*
- DevkitGP2x uses libmad with SDL_mixer for faster MP3 playback. This means that
if you use the DevKitGP2X SDK and SDL_mixer for ANY audio playback, your program
MUST be under GPL since the SDL_mixer has included libmad headers in the library
binary.
- Open2x uses libsmpeg with SDL_mixer that uses floats for MP3 playback which
means that LGPL is applied as standard.

> Extra notes on running the PC build from the IDE
- Use F8 (Debug->Start), this runs the exe via the debugger and uses the DLLs
from the bin directory in MinGW. If you use F9 or Ctrl+F10 (Build->Build/Run),
it will try to find the DLLs in the working folder which is set in
Project->Properties.

- If you want to run the exe as a separate application (i.e. double clicking on
the exe), then you need to put the SDL DLLs in the same directory as the exe.
They can be in the C:\MinGW\bin directory:
- mingwm10.dll
- SDL.dll
- SDL_image.dll
- SDL_mixer.dll
- SDL_ttf.dll
- SDLgfx.dll
- smpeg.dll
- zlib1.dll
- jpeg.dll
- libfreetype-6.dll
- libogg-0.dll
- libpng12-0.dll
- libtiff-3.dll
- libvorbis-0.dll
- libvorbisfile-3.dll

> Shoutouts
- The entire GP2X development community (too many names ;)

================================================================================
RC 4 20 Aug 2007
================================================================================
> What has been added/changed?
- Added both DevkitGP2x (GPL) SDK and Open2X (LGPL)
- Hopefully Vista support
- Configured the SDL test and template to use both compiles as separate build
targets.

================================================================================
RC 3 18 Aug 2007
================================================================================
> What has been added/changed?
- Updated the SDL libraries for Open2x

================================================================================
RC 2 16 Aug 2007
================================================================================
> What has been added/changed?
- GDB 6.6 has been installed over 6.3

================================================================================
RC 1 16 Aug 2007
================================================================================
> What has been added/changed?
- Everything, it is the first version :)
 
yaustar said:
Hiya all,

Requesting some help testing this pre-configuration please (including testing the binaries on GP2x ;) ) especially if you have Vista:

http://fs06u.sendspace.com/processupload.html

Cheers

Steven


Thanks for your effort! I've been using RC2 and it's great :)

The download link for RC4 seems to be invalid, though.
 
Last edited by a moderator:
Sebastian said:
yaustar said:
Hiya all,

Requesting some help testing this pre-configuration please (including testing the binaries on GP2x ;) ) especially if you have Vista:

http://fs06u.sendspace.com/processupload.html

Cheers

Steven


Thanks for your effort! I've been using RC2 and it's great :)

The download link for RC4 seems to be invalid, though.

Opps, I copied the wrong url.. give me a minute
 
Last edited by a moderator:
Well it seems to work ok... The GPL target gives me music back... but my performance is still down. I'm wondering if this is to do with some of my bug-fixing now... Although, Yaustar do you know if hardware blitting is supported in either of the 2 library packs? I remember my game performed similar to what it's doing when everything was using software surfaces...

Anyway it looks like it needs more investigation whatever it is.
But thanks for your wrk in putting this dev-package together :)

EDIT: I think you forgot to add the Open2X paths in the project... I couldn't get an Open2X project to compile till I added the extra search paths.
 
I am currently using the latest libraries on the file archives so SDL should be HW blitting in both packs.

Which paths did you have to add? I checked all the compilers with SDL Test and they came out fine :/
 
In the "GP2X Template" I had to add "C:\Open2x\include" in the compiler search directories.
And: "C:\Open2x\lib" in the linker search directories in order for it to compile .
Also it was outputting with an EXE extension instead of a GPE.
 
Hmm, I am very perplexed by that, the config I am looking at has both search paths in the compiler settings .

Can you also upload the SDL lib that you were using before any of my packages? Cheers.
 
PokeParadox said:
Well it seems to work ok... The GPL target gives me music back... but my performance is still down. I'm wondering if this is to do with some of my bug-fixing now... Although, Yaustar do you know if hardware blitting is supported in either of the 2 library packs? I remember my game performed similar to what it's doing when everything was using software surfaces...
So in theory you could take the lib from your first toolchain and repalce the SDK one and you should see the performance return? Could that help in determining that the library is the problem?
 
Last edited by a moderator:
Sorry, I no longer have it. :S It used the MAD lib for mp3 playback though.
I'm not sure that it's the SDL lib that's causing my slow-downs, because thinking about it, I made a couple of bug-fixes a little time before you released the devpackage... so it could be my changes that have impeded performance. I'll have to figure that out.
Additionally I'm still not getting music from things compiled with Open2X libs :S
 
I have no idea what could be causing problem with Open2x music. I may have to talk to DJWillis about that :/.

I wonder if I used the wrong Lib pack for open2x...
 
yaustar said:
I have no idea what could be causing problem with Open2x music. I may have to talk to DJWillis about that :/.

I wonder if I used the wrong Lib pack for open2x...
I think I've read somewhere that the Open2X libs don't use libmad, because of the GPL... so MP3 playback is a bit sluggish.

Ah, it was in the last thread: http://www.gp32x.de/board/index.php?showt...8210&st=32#

Edit: oops, i messed up, must be the time. I got mp3/ogg playback, wav works, but won't change volume if used as music (not really a big deal)?
 
Last edited by a moderator:
I have sent myself a couple of binaries with both toolchains from an old project I did and I see what happens then.
 
Confirmed, the Open2x SDK does not have any music playback for some reason. Not sure what the actual problem is and look at a debug build at some point.
 
No. So far I have only seen syntax highlighting on that level (user defined types etc) is with Visual Assist for Visual Studio.
 
Interesting, I took a look at a fully debug log and found that it couldn't load any of the ogg files:
CODE
Creating a new Sfx Chunk with Filename: ./Sounds/_common change.ogg
Loading Sfx file failed
Creating a new Sfx Chunk with Filename: ./Sounds/Common start.ogg
Loading Sfx file failed
Cleaning up the Game State that is at the top of the Stack
Freeing a Font
Freeed a Font
Freeing a Font
Freeed a Font
Freeing a Surface Wrapper
Freeing the Surface
Freed the Surface
Freeing a Sprite
Clearing a Sprite
Cleared a Sprite
Freeed a Sprite
Freeing a Chunk
Chunk not valid
Freeing a Chunk
Chunk not valid
Pushing a new Game State onto the Stack
Initialising the new Game State
Creating a new SDL_Surface with Filename: ./Backgrounds/Splash1.png
Creating a new SDL_Surface with Filename: ./Backgrounds/Splash2.png
Loading new Music file: ./Sounds/ScreenCompany music.ogg
Error loading Music file
Playing the Music stream
No Music stream

If I get some time, I take a closer look at specifically what error it was.
 
Back
Top