<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chaos Engine</title>
	<atom:link href="http://dev.modmancer.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.modmancer.com</link>
	<description>Sometimes I drink to forget.. but then I forget to drink..</description>
	<lastBuildDate>Mon, 06 Feb 2012 16:11:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Qt and GCC 4.7.0 -std=c++0x</title>
		<link>http://dev.modmancer.com/index.php/2012/02/06/181/</link>
		<comments>http://dev.modmancer.com/index.php/2012/02/06/181/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 16:08:36 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=181</guid>
		<description><![CDATA[Another bump. Switching to gcc 4.7.0 and trying to compile my qt code with -std=c++0x, fails legendary. The error message is intuitive like ever. It says something like: error: inconsistent user-defined literal suffixes '_FILE_' and 'QTOSTRING' in string literal According to this https://bugreports.qt-project.org/browse/QTBUG-22847?focusedCommentId=168644&#38;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel According to this, here is the solution, at least until we get [...]]]></description>
			<content:encoded><![CDATA[<p>Another bump. Switching to gcc 4.7.0 and trying to compile my qt code with -std=c++0x, fails legendary. The error message is intuitive like ever. It says something like:</p>
<pre>error: inconsistent user-defined literal suffixes '_<em>FILE</em>_' and 'QTOSTRING' in string literal</pre>
<p>According to this</p>
<p><a href="https://bugreports.qt-project.org/browse/QTBUG-22847?focusedCommentId=168644&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel">https://bugreports.qt-project.org/browse/QTBUG-22847?focusedCommentId=168644&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel</a></p>
<p>According to this, here is the solution, at least until we get new qt, or recompile it ourselves, or I don&#8217;t know what:</p>
<pre>Magick: override fix for qt and c++0x</pre>
<p>#define QLOCATION &#8220;\0&#8243; __FILE__ &#8220;:&#8221; QTOSTRING(__LINE__)
</pre>
<p>Add this before any Qt includes. It solved my problem.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2012/02/06/181/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GCC 4.7.0 on Ubuntu 10.10</title>
		<link>http://dev.modmancer.com/index.php/2012/01/20/gcc-4-7-0-on-ubuntu-10-10/</link>
		<comments>http://dev.modmancer.com/index.php/2012/01/20/gcc-4-7-0-on-ubuntu-10-10/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 13:57:28 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=175</guid>
		<description><![CDATA[I needed to have gcc 4.6+ on my laptop to compile some c++11 code, which my gcc 4.4.4 from synaptic wasn&#8217;t able to handle. Yes, yes &#8216;update your ubuntu&#8217; is the default warcry in such situations, but I didn&#8217;t want that to happen, not yet. So I needed a second gcc in my system. This [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to have gcc 4.6+ on my laptop to compile some c++11 code, which my gcc 4.4.4 from synaptic wasn&#8217;t able to handle. Yes, yes &#8216;update your ubuntu&#8217; is the default warcry in such situations, but I didn&#8217;t want that to happen, not yet. So I needed a second gcc in my system. This is a reminder post to myself, nothing spectacular, it&#8217;s a bit dirty as well, and it&#8217;s already thoroughly documented here <a href="http://gcc.gnu.org/faq.html#multiple">http://gcc.gnu.org/faq.html#multiple</a></p>
<p>What I did was, checked out the latest gcc from svn.  Configured it with ./configure &#8211;prefix=/usr/local/gcc-4.7.0 &#8211;program-suffix=-4.7.0 (btw that suffix is completely unnecessary because all files will anyway be dumped in a folder named gcc-4.7.0) and than called make -j10 (yes I went out, grabbed some food, a coffee, got back and it at that very second it was done). make install finally to install it into /usr/local/gcc-4.7.0/</p>
<p>Additionally I&#8217;ve overridden the existing symlinks to let me use the new gcc as default gcc:</p>
<p>ln -s /usr/local/gcc-4.7.0/bin/g++-4.7.0 /usr/bin/g++ -f</p>
<p>ln -s /usr/local/gcc-4.7.0/bin/gcc-4.7.0 /usr/bin/gcc -f</p>
<p>And one last thing, for programs compiled with 4.7.0 you need to tie in the new libstdc++ as well, otherwise you&#8217;ll get an expected error message when executing them. Each libstdc++ covers all previous versions, but cannot cover future versions. For example, with my gcc 4.4.4 from synaptic the libstdc++ version was: 6.0.7. The new gcc 4.7.0 comes with libstdc++ 6.0.14.</p>
<p>Just like the gcc and g++ a symlink for libstdc++ exists in /usr/lib. We need to override that one as well:</p>
<p>ln -s /usr/lib/libstdc++.so.6 libstdc++.so.6.0.14 -f</p>
<p>And that&#8217;s it. Of course, there are some other libs like the one for objective c etc. that need to be symlinked. OR you can make your own shell script that sets LD and exe paths accordingly, and while working in that context, you can use the selected gcc version. I will try this out, and add it to this post, one day .. soon?</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2012/01/20/gcc-4-7-0-on-ubuntu-10-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Owlboy &#8211; when my heart goes ta-dum-ta-dum</title>
		<link>http://dev.modmancer.com/index.php/2011/12/24/owlboy-when-my-heart-goes-ta-dum-ta-dum/</link>
		<comments>http://dev.modmancer.com/index.php/2011/12/24/owlboy-when-my-heart-goes-ta-dum-ta-dum/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 22:53:58 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2d platform]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[owlboy]]></category>
		<category><![CDATA[pixelart]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=161</guid>
		<description><![CDATA[It started snowing, it&#8217;s christmas, and I am a great fan of 2d games. And that&#8217;s particularly true when they are made of pixels. Ok, all games are made of pixels, but what I meant is &#8211; real pixel art, sprites and bobs, limited number of colors, blocky esthetics, everything that smells like amiga. Enjoy [...]]]></description>
			<content:encoded><![CDATA[<p>It started snowing, it&#8217;s christmas, and I am a great fan of 2d games. And that&#8217;s particularly true when they are made of pixels. Ok, all games are made of pixels, but what I meant is &#8211; real pixel art, sprites and bobs, limited number of colors, blocky esthetics, everything that smells like amiga. </p>
<p>Enjoy this wonderful trailer, I can&#8217;t wait for the game to come out &#8211; Owlboy, we welcome you!</p>
<p><iframe width="585" height="329" src="http://www.youtube.com/embed/XkwgJK88Ajs?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2011/12/24/owlboy-when-my-heart-goes-ta-dum-ta-dum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access box.com (box.net) from your Ubuntu</title>
		<link>http://dev.modmancer.com/index.php/2011/12/17/access-box-com-box-net-from-your-ubuntu/</link>
		<comments>http://dev.modmancer.com/index.php/2011/12/17/access-box-com-box-net-from-your-ubuntu/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 19:55:15 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=162</guid>
		<description><![CDATA[Several ways found so far, the suggested &#8216;through the nautilus&#8217; webdav connection approach never worked for me on both 10.10 and 10.04. Maybe it works with a later version, I don&#8217;t know. But here is an easy way to set it up. * Open terminal * sudo vim /etc/fstab * append this line to the [...]]]></description>
			<content:encoded><![CDATA[<p>Several ways found so far, the suggested &#8216;through the nautilus&#8217; webdav connection approach never worked for me on both 10.10 and 10.04. Maybe it works with a later version, I don&#8217;t know.</p>
<p>But here is an easy way to set it up.<br />
* Open terminal<br />
* sudo vim /etc/fstab<br />
* append this line to the bottom:<br />
<code>https://www.box.com/dav 			  /home/youruser/box.com  davfs   rw,user,noauto 	  0  	  0</code><br />
Naturally change youruser to match your actual user.<br />
* Save and exit vim<br />
* cd ~<br />
* mkdir box.com<br />
* mount box.com/<br />
* type your full user name, don&#8217;t forget the email part! (ie. name@email.com)<br />
* enter password</p>
<p>That&#8217;s it.</p>
<p>After that you can use rsync, cp, mc or any other tool to copy data back and forth.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2011/12/17/access-box-com-box-net-from-your-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Amiga C Book accompanying floppy &#8211; &#8220;Grafik in C&#8221;</title>
		<link>http://dev.modmancer.com/index.php/2011/07/03/amiga-c-book-accompanying-floppy-grafik-in-c/</link>
		<comments>http://dev.modmancer.com/index.php/2011/07/03/amiga-c-book-accompanying-floppy-grafik-in-c/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 07:59:35 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Amiga]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Demoscene]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=155</guid>
		<description><![CDATA[What a wonderful, inspiring weekend, spent writing some C in Cygnus Editor. Few months ago a coder from my demo group from the nineties found his Amiga 1200 with a fully functional and kicking hard disk. In one of its deeply nested, completely deprived of any systematical approach, &#8216;drawers&#8217; (that&#8217;s how folders were called on [...]]]></description>
			<content:encoded><![CDATA[<p>What a wonderful, inspiring weekend, spent writing some C in Cygnus Editor. Few months ago a coder from my demo group from the nineties found his Amiga 1200 with a fully functional and kicking hard disk. In one of its deeply nested, completely deprived of any systematical approach, &#8216;drawers&#8217; (that&#8217;s how folders were called on amiga), I&#8217;ve bumped into the contents of one of the rarest books for amiga, low profile, cheaply done, published only in Germany, never translated to english, called: <strong>Grafik In C</strong>. But it has tons of hints (quite valuable today) on how to do some advanced gfx coding in C (copper, blitter, viewports, pixel manipulation, basic 3d etc.).</p>
<p>SO, I decided to share it with anyone who might be in need of good tutorials:</p>
<p><a title="Grafik In C - soruces" href="http://almagest.modmancer.com/data/grafik_in_c.zip">http://almagest.modmancer.com/data/grafik_in_c.zip</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2011/07/03/amiga-c-book-accompanying-floppy-grafik-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protozoa by Almagest &#8211; Demo in browser (html5/js)</title>
		<link>http://dev.modmancer.com/index.php/2011/05/14/protozoa-by-almagest-demo-in-browser-html5js/</link>
		<comments>http://dev.modmancer.com/index.php/2011/05/14/protozoa-by-almagest-demo-in-browser-html5js/#comments</comments>
		<pubDate>Sat, 14 May 2011 19:56:39 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Amiga]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Js]]></category>
		<category><![CDATA[almagest]]></category>
		<category><![CDATA[blame]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[demo scene]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[protozoa]]></category>
		<category><![CDATA[webtro]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=143</guid>
		<description><![CDATA[Ok, here is the story. The amiga demoscene group i was coding for back in the nineties has called for reunion, so here we are, with our first public appearance after 15 years, since the age of BBS&#8217;s :) Protozoa, by Almagest, 2011 Music: BLAME, &#8220;convergent fields&#8221; album. &#160; &#160; Credits: akiko (code), BLAME (music), blue imp [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, here is the story. The amiga demoscene group i was coding for back in the nineties has called for reunion, so here we are, with our first public appearance after 15 years, since the age of BBS&#8217;s :)</p>
<p><a href="http://almagest.modmancer.com/protozoa/"><img class="alignleft size-full wp-image-145" title="protozoa_trackmo" src="http://dev.modmancer.com/wp-content/uploads/2011/05/protozoa_trackmo.jpg" alt="" width="120" height="90" /></a> <strong><br />
Protozoa</strong>, by Almagest, 2011<br />
Music: <a title="BLAME - Akiko's ebm industrial band" href="http://www.blame-industrial.com">BLAME</a>, &#8220;convergent fields&#8221; album.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Credits: akiko (code), BLAME (music), blue imp (closing words)</p>
<p>Readme file: <a title="Readme, dev log, credits." href="http://almagest.modmancer.com/protozoa/agt-protozoa.txt">agt-protozoa.txt</a></p>
<p>Youtube:</p>
<p><iframe width="585" height="439" src="http://www.youtube.com/embed/RCAKVON3LKs?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>I&#8217;ve chosen html5/js as the platform for this demo (ok, technically it&#8217;s a trackmo), because it&#8217;s a simple and easy way to do it, and it&#8217;s online.. well, times have changed, people got accustomed to different ways of thinking, downloading and installing files seems to have become quite an effort for a common user, so here we go &#8211; one click away from it &#8211; everything online, just click and watch.. or at least that&#8217;s what you can do if you have HTML5 capable browser, and I actually suggest: <strong>Firefox 4 (version 3 is too slow), Chrome or IE9 (official)</strong>. I think Opera would do as well, they used to have quite a fast js engine, and html5 (especially canvas pixel pushing) was pleasingly fast, last time I tested it.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2011/05/14/protozoa-by-almagest-demo-in-browser-html5js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JS, HTML5, Chrome and Uncaught Error: SECURITY_ERR: DOM Exception 18</title>
		<link>http://dev.modmancer.com/index.php/2011/03/19/js-html5-chrome-and-uncaught-error-security_err-dom-exception-18/</link>
		<comments>http://dev.modmancer.com/index.php/2011/03/19/js-html5-chrome-and-uncaught-error-security_err-dom-exception-18/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 18:20:29 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Js]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=138</guid>
		<description><![CDATA[Firefox has it. Chrome has it too. You cannot do some funky things with the files coming from different domains than the script you are running. I was just trying to load image from http://www.modmancer.com, and then to do some simple image manipulation code starting with: var data = context.getImageData(0,0,100,100); and both Firefox and Chrome [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox has it. Chrome has it too. You cannot do some funky things with the files coming from different domains than the script you are running. I was just trying to load image from http://www.modmancer.com, and then to do some simple image manipulation code starting with:</p>
<pre>
var data = context.getImageData(0,0,100,100);
</pre>
<p>and both Firefox and Chrome choked on that snippet.</p>
<p>Discussion about this issue is too long and boring, if you want,  you can follow it from this link, it&#8217;s your funeral: http://code.google.com/p/chromium/issues/detail?id=40787&#038;q=ajax%20local&#038;colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS </p>
<p>Anyway &#8211; how to avoid this ANNOYING issue while doing local development? Simply start chrome with &#8216;&#8211;allow-file-access-from-files&#8217; argument, and you are done. Don&#8217;t forget to clear this argument when finished, it could eventually become a threat to your browser&#8217; safety.</p>
<p>Didn&#8217;t figure out how to disable this idiocy in firefox yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2011/03/19/js-html5-chrome-and-uncaught-error-security_err-dom-exception-18/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.10 &#8211; How to disable Nouveau kernel driver</title>
		<link>http://dev.modmancer.com/index.php/2011/03/14/ubuntu-10-10-how-to-disable-nouveau-kernel-driver/</link>
		<comments>http://dev.modmancer.com/index.php/2011/03/14/ubuntu-10-10-how-to-disable-nouveau-kernel-driver/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 11:00:29 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>
		<category><![CDATA[Ubuntu 10.10]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=132</guid>
		<description><![CDATA[Usually I look after this over and over again, each time I set up ubutntu 10.04 or 10.10. So, this time I will post the link to the quick solution: http://ubuntuforums.org/showpost.php?p=10324779&#38;postcount=8 Just in case the link is unavailable, here is what it says: Re: Disable nouveau Quote: Originally Posted by bmeakings View Post You can [...]]]></description>
			<content:encoded><![CDATA[<p>Usually I look after this over and over again, each time I set up ubutntu 10.04 or 10.10. So, this time I will post the link to the quick solution:</p>
<p><a href="http://ubuntuforums.org/showpost.php?p=10324779&amp;postcount=8">http://ubuntuforums.org/showpost.php?p=10324779&amp;postcount=8</a></p>
<p>Just in case the link is unavailable, here is what it says:</p>
<pre>Re: Disable nouveau
Quote:
Originally Posted by bmeakings View Post
You can edit the modprobe blacklist file (terminal: gksu gedit /etc/modprobe.d/blacklist.conf) and add these entries at the bottom:
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Then reboot and they shouldn't be loaded. I had to do the same with my system.
You also have to type "sudo update-initramfs -u" to create a new image and reboot before nouveau is actually removed.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2011/03/14/ubuntu-10-10-how-to-disable-nouveau-kernel-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qmake and targets (pre-building dependencies)</title>
		<link>http://dev.modmancer.com/index.php/2010/11/14/qmake-building-dependencies/</link>
		<comments>http://dev.modmancer.com/index.php/2010/11/14/qmake-building-dependencies/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 20:07:22 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[qmake]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Qt Creator]]></category>
		<category><![CDATA[build dependencies]]></category>
		<category><![CDATA[build targets]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[makefile]]></category>
		<category><![CDATA[pre-build project]]></category>
		<category><![CDATA[qt]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=123</guid>
		<description><![CDATA[When using qmake as your build system, if you have a project which depends on a, e.g. external_library.a, you will need to set it up so that it can rebuild the library automatically, whenever the external library changes. In Visual studio this is easily done via its GUI, project properties, dependencies section, but when it [...]]]></description>
			<content:encoded><![CDATA[<p>When using qmake as your build system, if you have a project which depends on a, e.g. external_library.a, you will need to set it up so that it can rebuild the library automatically, whenever the external library changes. In Visual studio this is easily done via its GUI, project properties, dependencies section, but when it comes to qmake, it requires a bit of extra effort to set things properly up. But it&#8217;s easy, once you know how.</p>
<p><strong>HEARD OF TARGETS?</strong></p>
<p>Qmake uses &#8216;targets&#8217;, thet&#8217;re like modules which you define, and insert into the main build chain, telling the resulting Makefile when to build what. Targets can be auto-executed, or simply residing in your make file, so that you can build them on demand.</p>
<p>Here is a simple example, covering the external_library.a story above.<br />
In your main .pro file, add these lines:<span id="more-123"></span></p>
<pre>
extralib.target = extra
extralib.commands =	echo "Building extralib.."; \
				make -w -C ../my_libraries/extralib; \
				echo "Done building extralib."; \
extralib.depends =
QMAKE_EXTRA_TARGETS += extralib
PRE_TARGETDEPS = extra

.. the rest of your .pro file comes here ..
}
</pre>
<p>From now on, when building your main project, it will automatically try to build the extralib project. This step will be executed before the linker requests the resulting extralib.a, that way you will always have a consistent build.</p>
<p>But you can do much more with targets, you can for example set up doxygen to automatically export new docs on rebuilds, or to copy files, add text to your files &#8211; svn revision number maybe, or else.</p>
<p>If you leave out the PRE_TARGETDEPS = extra, the extralib target you defined will not be automatically execute during builds. But you will be able to type in your shell: </p>
<pre>
$ make extra
</pre>
<p>.. which will execute this specific target.</p>
<p>Additionally, if one of your targets depends on other target(s), you just need to add them to the <em>&#8216;extralib.depends =&#8217;</em><strong> variable. Note that you can execute a shell script via targets, in case you need to do complex file operation, which would be too painful to write in the .pro file, or which depend on external shell scripts.  </p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/11/14/qmake-building-dependencies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dirty debug output in DeSmuMe</title>
		<link>http://dev.modmancer.com/index.php/2010/10/10/dirty-debug-output-in-desmume/</link>
		<comments>http://dev.modmancer.com/index.php/2010/10/10/dirty-debug-output-in-desmume/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 10:47:13 +0000</pubDate>
		<dc:creator>akiko</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NDS]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[desmume]]></category>
		<category><![CDATA[emulation]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[nds]]></category>
		<category><![CDATA[nds printf replacement]]></category>

		<guid isPermaLink="false">http://dev.modmancer.com/?p=111</guid>
		<description><![CDATA[Looking for a printf replacement when coding NDS homebrew? Okay, (i)printf is nice, most of the time, but sometimes (actually quite often) you just can&#8217;t use it, be it for reasons like you&#8217;ve exhausted all video memory locations, or you need both screens, if you are coding something more complex than a simple effect, or [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for a printf replacement when coding NDS homebrew?</p>
<p>Okay, (i)printf is nice, most of the time, but sometimes (actually quite often) you just can&#8217;t use it, be it for reasons like you&#8217;ve exhausted all video memory locations, or you need both screens, if you are coding something more complex than a simple effect, or you just can&#8217;t fit the complete debug output onto 256&#215;192 pixels. There are several solutions to this problem (log to file using fatlib, send debug via Wifi, setup complete DeSmuMe debugging environment with eclipse), but here I will add one more.</p>
<p><strong>Warning &#8211; this one is dirty like hell, and there is absolutely no guarantee that it will work (unless you write your own absolute mem manager).<br />
</strong></p>
<p>So, here is the plan &#8211; DeSmuMe comes as CLI, gtk and glade. We need the DeSmuMe-glade, you&#8217;ll automatically get it if you install DeSmuMe from synaptic. This glade verision features a very handy tool, namely the hex memory viewer. This means, your code can write something let say at location 0&#215;00000000 &#8211; 0&#215;00001000 and you will clearly see it in the hex dump. Here&#8217;s an example :</p>
<p><a href="http://dev.modmancer.com/wp-content/uploads/2010/10/desmum_debug.jpg"><img class="alignleft size-full wp-image-114" title="desmum_debug" src="http://dev.modmancer.com/wp-content/uploads/2010/10/desmum_debug.jpg" alt="" /></a></p>
<p><span id="more-111"></span>And here is a simple code:</p>
<pre>#include &lt;stdarg.h&gt;
#define BUFFER_SIZE 1024
char* mem_p = (char*)0x00000000;

void mem_log(bool reset, const char *format, ...)
{
	char	    in_buf[BUFFER_SIZE];
	char	    out_buf[BUFFER_SIZE * 2];
	va_list	    vargs;

	// Compile the string.
	va_start (vargs, format);
	vsnprintf(in_buf, BUFFER_SIZE, format, vargs);
	va_end(vargs);

	snprintf(out_buf, BUFFER_SIZE, "%s ## ", in_buf);

	if (reset)
		mem_p = (char*)0x00000000;

	char* p = out_buf;
	while (*p != '\0')
		*mem_p++ = *p++;
}</pre>
<p>To use this simply:</p>
<pre>mem_log(true, "Hello world!");
	for(int i=0; i</pre>
<p>Again,<strong> if you are not controlling mallocs yourself, there is no guarantee that you will not cause some serious program flaws by overwriting some sensitive data around 0&#215;00000000</strong>. This is just a quick debug solution, if you are tired of trying to get libfat to work on an emulator.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.modmancer.com/index.php/2010/10/10/dirty-debug-output-in-desmume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

