Hey,
I spent the last months fighting/juggling/coding with WPF. Not the easiest hobby in town, should i mention, anyway: this is GFE.
The idea behind the project is to be able to... Play. No fuss, and more generally minimal settings, to be able to list and launch a vast collection of games: emulated, freeware, flash, choice is vast.
Basically GFE is listing a directory of... things (roms, zip, pics, you tell), probably thousands of them.
Background scanners are trying to match every entry with snapshots and movies (furtherly stats and extra infos from web). And apart from primary enumeration, everything else is asynchronous for a smoother experience.
All settings are guessed from a directory structure passed as application argument or preferably from a gameinfo.xml file.
It's using low level inputs, preferably a joystick, enabling some interaction with GFE running in the background. And it's a WPF project: so all the frontend rendering is done through DirectX and accelerated hardware if available.
OK now, this is the very first version of GFE, and, well: it's usable, but probably not versatile or cute enough. I'm working on that: you can help with suggestions, money, or simple greetings.
Binary: GFE-0.5.0.zip (45 Ko)
Technical details:
Windows - .NET 3.5, works on XP and Seven
Joystick (XInput compatible) or Keyboard
How to run it:
Modify included GameInfo.xml and use it as the application parameter.
Note: when in background, both LB+RB button (Ctrl+Back) is killing launched app and bring back GFE to front. LB+Y exits GFE.
alimbourg at gmail.com for any question.
This is GFE Emu FrontEnd (yes it's all animated, and video is playing from the selected game):
11 May 2010
25 August 2009
Mercurial on Synology
First telnet, and boostrap to install ipkg, classic (look at this and uses this).
Then
Now mercurial should be installed somewhere in '/opt/bin' (which redirects to '/volume1/@optware/bin'), type
You need to have some directory ready to hold a code repository, e.g. '//volume1/repos', executing
We could start working in this, as a shared folder on the network (\\diskstation\repos\testhg), or via http (execute
I finally choosed the ssh way, to easily secure transaction.
So, now
Let's activate the service using the web interface.
Test it using kitty or plink with:
But, if we execute
We might override this by editing (vi)
(to restart the ssh daemon after this, type
This script mod triggers the execution of a script
Now back to plink: we should now be able to execute
And... Everything should roll from this point :)
(Once in a while, telnet into your box (putty) and
Then
ipkg install py26-mercurial (many mercurial flavours in repository btw: one for every major python version).Now mercurial should be installed somewhere in '/opt/bin' (which redirects to '/volume1/@optware/bin'), type
hg -v to check this (or maybe hg-2.6 -v as ipkg apparently let me do the symbolic link: ln /opt/bin/hg /opt/bin/hg-2.6).You need to have some directory ready to hold a code repository, e.g. '//volume1/repos', executing
hg init /volume1/repos/testhg will init/create a mercurial dir with (hidden) management files in it. We could start working in this, as a shared folder on the network (\\diskstation\repos\testhg), or via http (execute
cd /volume1/repos/testhg, and hg serv, it mounts an http server on port 8000, accessible via 'http://192.168.0.X:8000' !), or via ssh (through 'ssh://user@192.168.0.x//volume1/repos/testhg') ! So Nice !I finally choosed the ssh way, to easily secure transaction.
So, now
ssh on synology: Let's activate the service using the web interface.
Test it using kitty or plink with:
plink.exe -ssh -2 root@192.168.0.X "set" should print a lot of variables contents.But, if we execute
plink.exe -ssh -2 root@192.168.0.X "hg": it should fail with ash: hg: not found. When the ssh daemon starts a session, it uses only a subset of the usual user environment, so our PATH variable is missing directories, hence cant find hg.We might override this by editing (vi)
/etc/ssh/sshd_config on the synology, to set PermitUserEnvironment yes. (to restart the ssh daemon after this, type
killall sshd and /usr/syno/etc.defaults/rc.d/S95sshd.sh start)This script mod triggers the execution of a script
$HOME/.ssh/environment for each ssh session creation: let's create such (executable) script with the line PATH=/opt/bin:/opt/sbin:$PATH in it. Now back to plink: we should now be able to execute
hg through ssh.And... Everything should roll from this point :)
(Once in a while, telnet into your box (putty) and
ipkg update and ipkg upgrade)
31 July 2009
Obese debug information (sqlite and qtcreator)
SQLite.c is the 'amalgemon' version of the Database: a huge .c file containing all the dependencies to compile SQLite into our projects.
Using GCC, and standard mingw compilation option, we probably all notice the ton of compilation warning telling us that debug infos are too huge to be handled correctly (if you tried that, it's impossible to trace sqlite sources with gdb).
in your .pro file (assuming you're using QtCreator), force these flags to be used:
No more compilation warning=quickest compilation, and we're now able to trace sqlite.c in gdb... Another win ;-)
Using GCC, and standard mingw compilation option, we probably all notice the ton of compilation warning telling us that debug infos are too huge to be handled correctly (if you tried that, it's impossible to trace sqlite sources with gdb).
The problem is concerning the embedded debugging information in STABS format: GCC is handling more modern types of debugging info. We just have to tell it to use them (http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html)
in your .pro file (assuming you're using QtCreator), force these flags to be used:
#remove standard debug generation for c files
QMAKE_CFLAGS_DEBUG -= -g
#(*= 'if not present'), force uber debug infos, perfect for gdb
QMAKE_CFLAGS_DEBUG *= -ggdb
No more compilation warning=quickest compilation, and we're now able to trace sqlite.c in gdb... Another win ;-)
Mame 132 and automated avi creation
This is an How-To build a special mame.exe, wich allows some automation from AutoIt.
I needed to find a way to send keys inputs which would trigger AVI recording of my games: but as Mame is using 'raw inputs', it cant be fooled with standard windows messages injection
Fortunately the Mame project is really really (really) easy to modify and build, so i patched some sources to allow that.
First, go there and follow every steps: http://mamedev.org/tools/
Once you get your first build, modify some sources:
Add More Windows Message to allow events from the outside:
Augment raw inputs with incoming windows messages:
Build it and voila. You should have a brand new mame.exe, listening for your external messages.
I have such a binary build available for willing people.
Next post should be an explanation for the whole Mame Avi Move Maker build with AutoIt...
Regards (and eventually leave comments)
30 July 2009
Clutter 1.0.0: Win32/MinGW (updated)
Personal Hack for a win32 build of clutter-1.0.0 libraries.
Basically all you need is:
Get Code::Blocks/QtCreator whatever (but a Mingw flavor): http://www.codeblocks.org/downloads/5
Get Clutter-1.0.0, and unzip-it somewhere on your hdd: http://www.clutter-project.org/sources/clutter/1.0/
Get GTK dependencies from http://www.gtk.org/download-windows.html (binaries+dev packages): pango, cairo, glib, gtk+
Get some other Mingw port from http://sourceforge.net/project/showfiles.php?group_id=7382 :
gettext, libiconv
I put all those libraries side by side with clutter-1.0.0.
Concerning mingw, it's likely that the package delivered with cb/qtcreator is outdated:
Get latest mingw API For MS Windows (http://sourceforge.net/projects/mingw/files/ , dev version) and unzip it into your mingw directory
Get latest glext.h (http://www.opengl.org/registry/api/glext.h), to update your probably old \mingw\include\GL\GLext.h.
Now some autoconf stuff:
Get And Unzip prebuild.zip (http://alimbourg.free.fr/clutter-1.0.0) into clutter-1.0.0/build/
It will create some qtcreator\ dir as it's my primary develoment platform, but rename it at will.
The configuration package uses perl (i'm using tinyperl, included in archive) to autoconfigure clutter build, generate marshaling info and glib-enum-typing header files. It makes it ready to compile.
Edit configure.pl to match your installation directories as it needs GLIB for some prebuild steps.
Then, execute configure.bat.
(Finally, it tweaks some qtcreator .pro project files to list every needed source files all the content from clutter\, clutter\COGL, clutter\Pango, clutter\json, clutter\win32: this, of course, has to be done 'by hand' for the other tools)
It's now ready to compile...
- static libraries,
- interactive.exe and the whole dll package (glib, pango, etc),
- and a configuration package (prebuild.zip)
Basically all you need is:
Get Code::Blocks/QtCreator whatever (but a Mingw flavor): http://www.codeblocks.org/downloads/5
Get Clutter-1.0.0, and unzip-it somewhere on your hdd: http://www.clutter-project.org/sources/clutter/1.0/
Get GTK dependencies from http://www.gtk.org/download-windows.html (binaries+dev packages): pango, cairo, glib, gtk+
Get some other Mingw port from http://sourceforge.net/project/showfiles.php?group_id=7382 :
gettext, libiconv
I put all those libraries side by side with clutter-1.0.0.
Concerning mingw, it's likely that the package delivered with cb/qtcreator is outdated:
Get latest mingw API For MS Windows (http://sourceforge.net/projects/mingw/files/ , dev version) and unzip it into your mingw directory
Get latest glext.h (http://www.opengl.org/registry/api/glext.h), to update your probably old \mingw\include\GL\GLext.h.
Now some autoconf stuff:
Get And Unzip prebuild.zip (http://alimbourg.free.fr/clutter-1.0.0) into clutter-1.0.0/build/
It will create some qtcreator\ dir as it's my primary develoment platform, but rename it at will.
The configuration package uses perl (i'm using tinyperl, included in archive) to autoconfigure clutter build, generate marshaling info and glib-enum-typing header files. It makes it ready to compile.
Edit configure.pl to match your installation directories as it needs GLIB for some prebuild steps.
Then, execute configure.bat.
(Finally, it tweaks some qtcreator .pro project files to list every needed source files all the content from clutter\, clutter\COGL, clutter\Pango, clutter\json, clutter\win32: this, of course, has to be done 'by hand' for the other tools)
It's now ready to compile...
27 May 2009
QtCreator Debug Helper...
QtCreator (1.1 for now) is great tool to work with...
The whole Qt thing is, too.
I'm sharing some experience with the beast.
If you need some relevant debug infos concerning the Qt class guts, you need to instruct gdb on how to print them.
It's done via a 'debugging helper': some dll/plugin loaded by gdb on startup.
On my machine they didnt work without a rebuild after each Qt SDK every integration:
The whole Qt thing is, too.
I'm sharing some experience with the beast.
If you need some relevant debug infos concerning the Qt class guts, you need to instruct gdb on how to print them.
It's done via a 'debugging helper': some dll/plugin loaded by gdb on startup.
On my machine they didnt work without a rebuild after each Qt SDK every integration:
- go to Tools->Options...->Qt4->Qt Versions,
- check the active Qt SDK, and its path (QT_PATH).
- *remove* the whole *QT_PATH/qtc-debugging-helper* directory via explorer
- back to the Options Pane, select the active SDK, and press *Rebuild*
- go to Options->Debugger->Debugging Helper, check 'Use debugging helper', uncheck 'Use debugging helper from custom location'
- next time you debug your qt app, you should get some '43 custom... loaded' from gdb
13 April 2009
Cool Dialog GUI (9 quads method)

Hey all,
If you want to draw some cool looking rectangle/dialog:
this is the 9 quads method using... Clutter.
First we need some texture like this (256x256 icon):

To be loaded with:
texture = cogl_texture_new_from_file (texPath, 10, COGL_TEXTURE_NONE, COGL_PIXEL_FORMAT_ANY, NULL);
Then, some layout parameters (inner rectangle coordinates):
float framing[4]={108.0/256.0,50.0/256.0,200.0/256.0,147.0/256.0};and a function which splits the texture into 9 quads, to stretch the whole thing smartly:
static void _cogl_9_rectangle (float x_1, float y_1, float x_2, float y_2,
float framing[4], CoglHandle texHandle)
{
float verts[12*9];
if (!cogl_is_texture(texHandle))
return;
cogl_set_source_texture (texHandle);
cogl_push_matrix ();
cogl_translate (x_1, y_1, 0);
float subrect[4];
float w = x_2-x_1;
float h = y_2-y_1;
//uniformly stretched
subrect[0]=w*dims[0];
subrect[1]=h*dims[1];
subrect[2]=w*dims[2];
subrect[3]=h*dims[3];
//and or preserving original texture dims
int tex_w = cogl_texture_get_width(texHandle);
int tex_h = cogl_texture_get_height(texHandle);
float value = tex_w*dims[0];
if (value<subrect[0]) subrect[0]=value;
value = tex_h*dims[1];
if (value<subrect[1]) subrect[1]=value;
value = w - tex_w*(1.0f-dims[2]);
if (value>subrect[2]) subrect[2]=value;
value = h - tex_h*(1.0f-dims[3]);
if (value>subrect[3]) subrect[3]=value;
//and the 9 quads
cogl_rectangle_with_texture_coords (0.0f, 0.0f, subrect[0], subrect[1],
0.0f, 0.0f, dims[0], dims[1]);
cogl_rectangle_with_texture_coords (subrect[0], 0.0f, subrect[2], subrect[1],
dims[0], 0.0f, dims[2], dims[1]);
cogl_rectangle_with_texture_coords (subrect[2], 0.0f, w, subrect[1],
dims[2], 0.0f, 1.0f, dims[1]);
cogl_rectangle_with_texture_coords (0.0f, subrect[1], subrect[0], subrect[3],
0.0f, dims[1], dims[0], dims[3]);
cogl_rectangle_with_texture_coords (subrect[0], subrect[1], subrect[2], subrect[3],
dims[0], dims[1], dims[2], dims[3]);
cogl_rectangle_with_texture_coords (subrect[2], subrect[1], w, subrect[3],
dims[2], dims[1], 1.0f, dims[3]);
cogl_rectangle_with_texture_coords (0.0f, subrect[3], subrect[0], h,
0.0f, dims[3], dims[0], 1.0);
cogl_rectangle_with_texture_coords (subrect[0], subrect[3], subrect[2], h,
dims[0], dims[3], dims[2], 1.0);
cogl_rectangle_with_texture_coords (subrect[2], subrect[3], w, h,
dims[2], dims[3], 1.0f, 1.0);
cogl_pop_matrix();
}
(http://code.google.com/p/syntaxhighlighter/ rocks)
Subscribe to:
Posts (Atom)
