<?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>Dysfunctional Programming &#187; megazeux</title>
	<atom:link href="http://www.joshmatthews.net/blog/category/megazeux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joshmatthews.net/blog</link>
	<description>/* You are not expected to understand this */</description>
	<lastBuildDate>Tue, 24 Jan 2012 20:50:01 +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>Megazeux debugger on github</title>
		<link>http://www.joshmatthews.net/blog/2010/03/megazeux-debugger-on-github/</link>
		<comments>http://www.joshmatthews.net/blog/2010/03/megazeux-debugger-on-github/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 10:14:45 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=65</guid>
		<description><![CDATA[The official Megazeux repository recently moved to github, allowing me the opportunity to create my own fork and move my debugger work into a more public sphere. Accordingly, you can now visit my repo for all the most recent robotic debugging developments.]]></description>
			<content:encoded><![CDATA[<p>The official <a href="http://www.github.com/ajs1984/megazeux">Megazeux repository</a> recently moved to github, allowing me the opportunity to create my own fork and move my debugger work into a more public sphere.  Accordingly, you can now visit <a href="http://www.github.com/jdm/megazeux">my repo</a> for all the most recent robotic debugging developments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2010/03/megazeux-debugger-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross-compiling with MinGW on Fedora</title>
		<link>http://www.joshmatthews.net/blog/2010/02/cross-compiling-with-mingw-on-fedora/</link>
		<comments>http://www.joshmatthews.net/blog/2010/02/cross-compiling-with-mingw-on-fedora/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 13:22:29 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=55</guid>
		<description><![CDATA[My goodness, I&#8217;m impressed. Having released the first iteration of my robotic debugger, I was informed that the fork()/exec() combo isn&#8217;t portable to Windows. Nobody volunteered any patches immediately, so I decided to read up on cross-compiling since I really dislike having to reboot into my other partition. Turns out that the entire MinGW stack [...]]]></description>
			<content:encoded><![CDATA[<p>My goodness, I&#8217;m impressed.  Having <a href="http://www.digitalmzx.net/forums/index.php?showtopic=14776&#038;hl=">released</a> the first iteration of my robotic debugger, I was informed that the fork()/exec() combo isn&#8217;t portable to Windows.  Nobody volunteered any patches immediately, so I decided to read up on cross-compiling since I really dislike having to reboot into my other partition.  Turns out that the entire MinGW stack has been packaged up for Fedora, meaning that all I had to do in the end was:<br />
<code># yum install mingw32-gcc mingw32-gcc-c++ mingw32-libpng mingw32-SDL<br />
$ mingw32-make -j2</code></p>
<p>It wasn&#8217;t quite that easy &#8211; since Megazeux uses a non-standard configure script, I had to correct a few faulty assumptions.  I never figured out the correct way to use
<pre>/usr/i686-pc-mingw32/sys-root/mingw/bin/sdl-config</pre>
<p> instead of the default one, so that got hardcoded somewhere.  Also, Megazeux relies on libogg and libvorbis, which haven&#8217;t been pushed to the fedora repository yet (packaging limbo ahoy!), but I was able to grab some rpms that the mingw32 packager helpfully left lying around.  All in all, a very successful and satisfying experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2010/02/cross-compiling-with-mingw-on-fedora/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Break me off a piece of that Megazeux debugger</title>
		<link>http://www.joshmatthews.net/blog/2010/01/break-me-off-a-piece-of-that-megazeux-debugger/</link>
		<comments>http://www.joshmatthews.net/blog/2010/01/break-me-off-a-piece-of-that-megazeux-debugger/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 22:45:31 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=53</guid>
		<description><![CDATA[Breaking news: breakpoints now exist in the debugger. There&#8217;s no indication that they exist until execution reaches them unless you look in the console window , but they&#8217;re there! Next up: differentiating between active line, current line, and line + breakpoint in the robot editor syntax highlighting. Apart from that, the debugger is now fairly [...]]]></description>
			<content:encoded><![CDATA[<p>Breaking news: breakpoints now exist in the debugger.  There&#8217;s no indication that they exist until execution reaches them unless you look in the console window , but they&#8217;re there!  Next up: differentiating between active line, current line, and line + breakpoint in the robot editor syntax highlighting.  Apart from that, the debugger is now fairly functional &#8211; stepping, continuing, and breaking, and most importantly quitting are all zipping along as happy as can be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2010/01/break-me-off-a-piece-of-that-megazeux-debugger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Megazeux Debugging: Redux</title>
		<link>http://www.joshmatthews.net/blog/2010/01/megazeux-debugging-redux/</link>
		<comments>http://www.joshmatthews.net/blog/2010/01/megazeux-debugging-redux/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 10:14:03 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=29</guid>
		<description><![CDATA[It&#8217;s been about a year and a half since I last touched on the idea of a Megazeux debugger, and that is far too long! I&#8217;ve recently begun an internship with Mozilla working on the Electrolysis project, which is a continuation of the work I&#8217;ve been doing in a volunteer capacity for the past few [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been about a year and a half since I last touched on the idea of a Megazeux debugger, and that is far too long!  I&#8217;ve recently begun an internship with Mozilla working on the <a href="https://wiki.mozilla.org/Content_Processes">Electrolysis</a> project, which is a continuation of the work I&#8217;ve been doing in a volunteer capacity for the past few months.  This has inspired me to restart my Megazeux debugger project, with the key difference that the debugger is run in a separate process.  I&#8217;ve spent a few days hacking this into a working state, and users of my debugger (namely me) are now able to choose a robot to watch inside of Megazeux, and a completely new application window appears displaying the robot editor and the watched object&#8217;s code.  With this architecture, the parent process (mzx) simply informs the child (mzxdbg) which line is currently being executed, and the user can happily scroll around inside the robot and do things like place break points.  Theoretical break points at this point, but they&#8217;re coming.  Just you wait.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2010/01/megazeux-debugging-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MegaZeux Debugging: part 3</title>
		<link>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging-part-3/</link>
		<comments>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging-part-3/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 20:48:52 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=20</guid>
		<description><![CDATA[After some more fiddling, basic robot watching is pretty rock solid.  I fixed some memory leaks and crashes, and I&#8217;ve moved on to breakpoints.  And herein lies the conumdrum, as I&#8217;m trying to figure out the use cases here and how everything should work together.  As it stands, breakpoints are not very useful, because you [...]]]></description>
			<content:encoded><![CDATA[<p>After some more fiddling, basic robot watching is pretty rock solid.  I fixed some memory leaks and crashes, and I&#8217;ve moved on to breakpoints.  And herein lies the conumdrum, as I&#8217;m trying to figure out the use cases here and how everything should work together.  As it stands, breakpoints are not very useful, because you can only place them when debugging, and then the only option is to place a breakpoint at the currently executing line.  The robot editor that shows up when debugging currently has no mechanism for scrolling around the robot&#8217;s code, so you&#8217;re limited to the view of about 10 lines of code that surround the current line.  For breakpoints to be useful to a developer, I feel like either you should be able to place them either in editing mode (when you&#8217;re actually modifying the robot), which will lead to all kinds of terrible headaches trying to keep that information in sync with the robot&#8217;s contents, or else the debugging interface needs to have more interactivity.  I&#8217;m leaning towards the latter option, but still open for discussion.</p>
<p>The other major consideration right now is what kind of lifetime breakpoints should have.  Should they persist between debugging/testing sessions?  Across boards?  What should happen to the interface when the player switches boards and the debugged robot no longer exists?  These are questions for which I don&#8217;t have good answers at the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MegaZeux Debugging: part 2</title>
		<link>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging-part-2/</link>
		<comments>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging-part-2/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 03:08:11 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[debugging]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=18</guid>
		<description><![CDATA[What with midterms and end of term, it&#8217;s been several weeks since I last touched my robotic debugger, but that changed tonight.  There&#8217;s now a usable bleeding-edge debugger for your perusal in the bzr repository.  You have your choice of robots to watch on activation (ctr+f6 in testing mode), f8 will bring up the watch [...]]]></description>
			<content:encoded><![CDATA[<p>What with midterms and end of term, it&#8217;s been several weeks since I last touched my robotic debugger, but that changed tonight.  There&#8217;s now a usable bleeding-edge debugger for your perusal in <a href="http://www.joshmatthews.net/bzr/megazeux/robodebugger/">the bzr repository</a>.  You have your choice of robots to watch on activation (ctr+f6 in testing mode), f8 will bring up the watch dialog, f9 will step a single instruction (which updates in the editor accordingly, so you can follow the action), and f10 will continue normal execution with the debugger still activated, so pressing f9 will start stepping once more.  Of course I&#8217;ve somehow induced megazeux to start segfaulting on exit, so there are obviously some problems that need fixing, but everything starts somewhere!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MegaZeux Debugging</title>
		<link>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging/</link>
		<comments>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 23:12:55 +0000</pubDate>
		<dc:creator>Josh Matthews</dc:creator>
				<category><![CDATA[megazeux]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://www.joshmatthews.net/blog/?p=7</guid>
		<description><![CDATA[I&#8217;m an occasional contributor to the MegaZeux source code, and I frequently compete in the bi-annual Day of Zeux competions.  Accordingly, I&#8217;m always interested in new ways to push MegaZeux forward and help people create games easier, which brings me to Kev Vance&#8216;s MegaZeux debugger.  It&#8217;s ten years old and based on the ancient 2.51 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m an occasional contributor to the <a href="http://www.sourceforge.net/projects/megazeux/">MegaZeux</a> source code, and I frequently compete in the bi-annual <a href="http://doz.digitalmzx.net">Day of Zeux</a> competions.  Accordingly, I&#8217;m always interested in new ways to push MegaZeux forward and help people create games easier, which brings me to <a href="http://www.kvance.com">Kev Vance</a>&#8216;s <a href="http://kvance.com/project/mzxdbg/">MegaZeux debugger</a>.  It&#8217;s ten years old and based on the ancient 2.51 codebase, which means that the released code is not much good (2.7 was a near complete rewrite, if I recall correctly), but it&#8217;s got me thinking about how a debugger could integrate into the modern incarnation of mzx.  So much so that I&#8217;ve got a prototype in the works (and a corresponding <a href="http://www.joshmatthews.net/bzr/megazeux/robodebugger">bzr repository</a>), and some thoughts to put down on paper.</p>
<p>I forsee a debugger in MegaZeux as being useful in the following ways:</p>
<ul>
<li>Tracing code execution in a single robot</li>
<li>Placing breakpoints in robotic code</li>
<li>Verifying expected values at different points in the program</li>
</ul>
<p>The third is already possible with the F11 window that was added recently, which displays all known counters for easy perusal.  Combined with instruction stepping, a debugger will hopefully remove the need for debug variable output lines in order to determine when a counter&#8217;s value changes.</p>
<p>The vision of the robotic debugger I have is a shortened robotic editor that takes up half the screen.  This displays the watched robot&#8217;s program with the current line highlighted.  F9 will single step forwards in the current robot, F10 continues the normal execution until/unless a breakpoint is reached (in any robot).  Pressing CTR+F6 will bring up the debugger interface, and a window to select the robot to watch, at which point all execution will cease until the user presses either F9 or F10.</p>
<p>That&#8217;s the gist of it right now.  I currently have the shortened editor displaying the watched robot code, but only the global robot can be watched right now, and the code display doesn&#8217;t actually show which line is about to be executed.  If you bring up the debugger, all robot execution stops, and pressing F9 will trigger one line of code to be executed in the global robot, and F10 will make everything resume as normal.</p>
<p>Now, a brain dump of problems that I need to consider, in no particular order:</p>
<ul>
<li>Remove the ability for the player to move when single stepping?</li>
<li>In fact, currently the rest of the board is updated as usual while the debugger is active, so bullets will continue to move normally even when the user is single stepping a robot, so something has to change there.</li>
</ul>
<p>I&#8217;m positive there are going to be more concerns I&#8217;ll have to deal with, but I&#8217;m pleased with the progress I&#8217;ve made so far.  Next step: make the debugger show the actual line being executed.  Then it might start being useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joshmatthews.net/blog/2008/07/megazeux-debugging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

