<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - game boy homebrew tutorial (for software and cart development)]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/1597/"/>
	<updated>2011-02-13T00:16:05Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/1597/game-boy-homebrew-tutorial-for-software-and-cart-development/</id>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/56060/#p56060"/>
			<content type="html"><![CDATA[<p>thank you for all the links, that&#039;s gonna help me a lot , really ! <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Vesuvian]]></name>
				<uri>https://chipmusic.org/Vesuvian</uri>
			</author>
			<updated>2011-02-13T00:16:05Z</updated>
			<id>https://chipmusic.org/forums/post/56060/#p56060</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/30517/#p30517"/>
			<content type="html"><![CDATA[<p>say what?!?!?!?</p>]]></content>
			<author>
				<name><![CDATA[wedanced]]></name>
				<uri>https://chipmusic.org/wedanced</uri>
			</author>
			<updated>2010-07-14T22:30:32Z</updated>
			<id>https://chipmusic.org/forums/post/30517/#p30517</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/30483/#p30483"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>undergroundclouds wrote:</cite><blockquote><div class="quotebox"><cite>belial wrote:</cite><blockquote><p>I know the problem <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" />. It took me months to write this tutorial because its so boring to fire on latex after your regular work, create the figures, etc.</p></blockquote></div><p>At the risk of losing face, what does &quot;fire on latex&quot; mean? I would google this but it seems potentially NSFW.</p></blockquote></div><p>It means putting on your rubber suit and being kinky.</p><p>...</p><p>Actually, LaTeX is a document format that is popular in the academic world.</p><p><a href="http://www.latex-project.org/" target="_blank">http://www.latex-project.org/</a></p>]]></content>
			<author>
				<name><![CDATA[nitro2k01]]></name>
				<uri>https://chipmusic.org/nitro2k01</uri>
			</author>
			<updated>2010-07-14T17:55:48Z</updated>
			<id>https://chipmusic.org/forums/post/30483/#p30483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/29887/#p29887"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>belial wrote:</cite><blockquote><div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>Maybe I should get my ass off the couch and actually write a tutorial myself. I&#039;ve been wanting to do this for a while</p></blockquote></div><p>I know the problem <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" />. It took me months to write this tutorial because its so boring to fire on latex after your regular work, create the figures, etc.</p></blockquote></div><p>At the risk of losing face, what does &quot;fire on latex&quot; mean? I would google this but it seems potentially NSFW.</p>]]></content>
			<author>
				<name><![CDATA[undergroundclouds]]></name>
				<uri>https://chipmusic.org/undergroundclouds</uri>
			</author>
			<updated>2010-07-08T17:23:21Z</updated>
			<id>https://chipmusic.org/forums/post/29887/#p29887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/29882/#p29882"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>trash80 wrote:</cite><blockquote><p><a href="http://gameboy.mongenel.com/asmschool.html" target="_blank">http://gameboy.mongenel.com/asmschool.html</a></p><p>this site helped me alot when I moved into the gb asm arena.</p></blockquote></div><p>ohhh..... thanx!<br />bookmarked for this weekend ;D</p>]]></content>
			<author>
				<name><![CDATA[xero]]></name>
				<uri>https://chipmusic.org/xero</uri>
			</author>
			<updated>2010-07-08T15:32:25Z</updated>
			<id>https://chipmusic.org/forums/post/29882/#p29882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/29458/#p29458"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>tRasH cAn maN wrote:</cite><blockquote><div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>Maybe I should get my ass off the couch and actually write a tutorial myself.</p></blockquote></div><p>I would love to see one. I&#039;m just about to start off a GB programming project myself and have only limited knowledge of assembler programming.<br />Btw, did you have some documents up on 8bc, the gameboygenius site, on GB programming? If so, are they up on another site these days?</p></blockquote></div><br /><p><a href="http://gameboy.mongenel.com/asmschool.html" target="_blank">http://gameboy.mongenel.com/asmschool.html</a></p><p>this site helped me alot when I moved into the gb asm arena.</p>]]></content>
			<author>
				<name><![CDATA[Trash80]]></name>
				<uri>https://chipmusic.org/Trash80</uri>
			</author>
			<updated>2010-07-05T06:45:31Z</updated>
			<id>https://chipmusic.org/forums/post/29458/#p29458</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25630/#p25630"/>
			<content type="html"><![CDATA[<p>trashy: It&#039;s under the gbdev.gg8.se domain these days. Gameboydev.org is back in Jose&#039;s hands and used only for selling cartridges now. Also, the info on the wiki is not unique, but it might still be helpful.<br /><a href="http://gbdev.gg8.se/wiki/articles/Main_Page" target="_blank">http://gbdev.gg8.se/wiki/articles/Main_Page</a><br /><a href="http://gbdev.gg8.se/forums/index.php" target="_blank">http://gbdev.gg8.se/forums/index.php</a></p><p>And of course, as I said before:<br /><a href="http://gameboy.mongenel.com/" target="_blank">http://gameboy.mongenel.com/</a>&nbsp; &lt;- and click GBC ASMSchool</p>]]></content>
			<author>
				<name><![CDATA[nitro2k01]]></name>
				<uri>https://chipmusic.org/nitro2k01</uri>
			</author>
			<updated>2010-06-07T11:45:08Z</updated>
			<id>https://chipmusic.org/forums/post/25630/#p25630</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25628/#p25628"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>Maybe I should get my ass off the couch and actually write a tutorial myself.</p></blockquote></div><p>I would love to see one. I&#039;m just about to start off a GB programming project myself and have only limited knowledge of assembler programming.<br />Btw, did you have some documents up on 8bc, the gameboygenius site, on GB programming? If so, are they up on another site these days?</p>]]></content>
			<author>
				<name><![CDATA[tRasH cAn maN]]></name>
				<uri>https://chipmusic.org/tRasH+cAn+maN</uri>
			</author>
			<updated>2010-06-07T11:38:24Z</updated>
			<id>https://chipmusic.org/forums/post/25628/#p25628</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25621/#p25621"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>Maybe I should get my ass off the couch and actually write a tutorial myself. I&#039;ve been wanting to do this for a while</p></blockquote></div><p>I know the problem <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" />. It took me months to write this tutorial because its so boring to fire on latex after your regular work, create the figures, etc.</p>]]></content>
			<author>
				<name><![CDATA[belial]]></name>
				<uri>https://chipmusic.org/belial</uri>
			</author>
			<updated>2010-06-07T07:30:12Z</updated>
			<id>https://chipmusic.org/forums/post/25621/#p25621</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25529/#p25529"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>belial wrote:</cite><blockquote><div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>An integer table, even 16-bit integer, is better than that float table</p></blockquote></div><p>I bet i misunderstand you and maybe this should be discussed somewhere else, but why using an integer table? An integer table of sine values would contain exactly 3 entries {-1, 0 1}.</p></blockquote></div><p>Oh, you need to scale it, of course. If you want an object to swing 40 pixels from side to side in a sinusoidal curve, you could pre-calculate y=int(20*sin(x)). Actually you could probably get away with calculating 10*sin(x) and multiplying the table values by 2.</p><p>Which brings me to another point... Integer multiplication and even division by 2 and multiples of 2 is cheap. It can be easily written as a shift operation. y=4*x is equivalent to y=x&lt;&lt;2 for example. </p><p>Another trick, which I don&#039;t think the C compiler has support for, is fixed-point arithmetic. You could for example define that in an 8-bit number, the lower two bits are the decimal part and the upper six bits are the integer part. So, for example, you could represent a number like 5.75 without rounding: <br /></p><div class="codebox"><pre><code>Bin: 0001 01.11</code></pre></div><p>This would of course be stored in an 8-bit register as hex: $17 (Bin: 00010111)<br />The logic is that bits below decimal point get the values 1/2, 1/4, 1/8 etc. </p><p>Adding two of these numbers works all the same like any other number of that bit size. If you multiply two numbers fixed-point numbers however, you must realign the number. Consider that you multiply 2*3 in the notation above:<br /></p><div class="codebox"><pre><code>&quot;2.00&quot; = Bin: 0000 10.00 = Hex: $08
&quot;3.00&quot; = Bin: 0000 11.00 = Hex: $0C

$08 * $0C = $60
Bin: 0110 0000 = Hex: $60</code></pre></div><p>Here you need to divide by 4, or as it can also be done, shift right twice, to get the correct answer:<br /></p><div class="codebox"><pre><code>Bin: 0001 10.00 = &quot;6.00&quot;</code></pre></div><p>However, when you multiply fixed-point * actual integer, you don&#039;t need the realignment step. </p><p>I think any tutorial to programming an 8-bit CPU should talk about binary numbers and 8-bit math tricks. Not as a thing that you need to go through by necessity, but as something that is actually useful. But maybe that scares people off?</p><p>Oh, and you&#039;re right that there&#039;s seems to be a lack of GB tutorial. There&#039;s one though...<br /><a href="http://gameboy.mongenel.com/" target="_blank">http://gameboy.mongenel.com/</a> &lt;- and click GBC ASMSchool <br />It&#039;s geared towards ASM however. Which I personally think is the way to go in the long run.</p><p>Maybe I should get my ass off the couch and actually write a tutorial myself. I&#039;ve been wanting to do this for a while, but lazy and stupid in the same as being an elitist dickhead is almost a guarantee that you&#039;ll never manage to write something you&#039;re satisfied with.</p>]]></content>
			<author>
				<name><![CDATA[nitro2k01]]></name>
				<uri>https://chipmusic.org/nitro2k01</uri>
			</author>
			<updated>2010-06-06T12:14:20Z</updated>
			<id>https://chipmusic.org/forums/post/25529/#p25529</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25527/#p25527"/>
			<content type="html"><![CDATA[<p>Hi there, im the author of the paper posted above. First of all, thanx for the advices. I posted this paper in another forum get get comments, suggestion, critics, etc. <br /></p><div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>Now I&#039;m going to sound like a massive dick, but I don&#039;t like this paper at all</p></blockquote></div><p>Just a few words: This document wasn&#039;t written as a &quot;school project&quot; <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" />. It started it when i created the homebrew cartridge and wanted to document it. In the Atari 2600 homebrew scene is a big community named &quot;atariage.com&quot; with lots of beginner friendly tutorials. On the game boy side, those beginner tutorials are missung. All you can do is to google and find technical documentation or dead links. So i decided to create a tutorial which collects all the useful links and ideas i have found.<br /></p><div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>An integer table, even 16-bit integer, is better than that float table</p></blockquote></div><p>I bet i misunderstand you and maybe this should be discussed somewhere else, but why using an integer table? An integer table of sine values would contain exactly 3 entries {-1, 0 1}.<br /></p><div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>So uhm yeah... I&#039;m sorry for the complete smackdown</p></blockquote></div><p>No problem, its not the first paper review im reading about my stuff <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" />. Ill try to adept your improvoments.</p>]]></content>
			<author>
				<name><![CDATA[belial]]></name>
				<uri>https://chipmusic.org/belial</uri>
			</author>
			<updated>2010-06-06T11:27:35Z</updated>
			<id>https://chipmusic.org/forums/post/25527/#p25527</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25513/#p25513"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>nitro2k01 wrote:</cite><blockquote><p>Now I&#039;m going to sound like a massive dick, but I don&#039;t like this paper at all...</p></blockquote></div><p>No not at all (at least not to me)! <br />I&#039;m not really knowledgeable on this sort of thing, I just took a quick look at it and was curious what relevance it might have here. Something for the pros and people who might use it to discuss. <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[bucky]]></name>
				<uri>https://chipmusic.org/bucky</uri>
			</author>
			<updated>2010-06-06T02:52:32Z</updated>
			<id>https://chipmusic.org/forums/post/25513/#p25513</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25511/#p25511"/>
			<content type="html"><![CDATA[<p>Now I&#039;m going to sound like a massive dick, but I don&#039;t like this paper at all. </p><p>It&#039;s actually mostly factually correct as far as I could tell when skimming it through, but it feels very rushed. There are a few couple of small things that are wrong, like calling the MBC BSC, but that less important. But what I&#039;m more worried about is that I&#039;m wondering if the complete noob is actually going to learn anything substantial from the paper. It&#039;s written in such a way that I&#039;m getting the feeling it was made to meet a school deadline, not out of a genuine will to teach. A lot of things could be probably be described in more understandable ways.</p><p>I&#039;m bothered by the theory sections about transistor/logic and NTSC. They don&#039;t really fit in. The transistor/logic section could probably be scrapped. If you know about these things, you do. If you don&#039;t, that short text isn&#039;t going to make much of a difference for you. The NTSC section could probably be replaced with an actual diagram of how the screen is drawn, and when you can and can&#039;t write to it.</p><p>Then there&#039;s the coding guidelines. The first 3 points are sound advice, but last one isn&#039;t really. The &lt;=, &lt; etc operators typically have no or a very small overhead compared to == and !=. <strong>we only have a limited time window to perform our calculations (vertical synchronisation phase)</strong> &lt;- That&#039;s not really correct. Just because you can&#039;t write freely to the display during most of the time doesn&#039;t mean you can&#039;t do math. And why make a <em>float</em> table of sine values? An integer table, even 16-bit integer, is better than that float table. And even so, theres no explanation on how you&#039;re actually supposed to use the lookup table.</p><p>The whole idea that the Gameboy is <strong>well documented but it is difficult to collect all the distributed informations on the internet.</strong> is largely untrue. There are a couple of good collected sources. Most importantly <a href="http://nocash.emubase.de/pandocs.htm" target="_blank">PANDocs</a> which is a collection of a lot of small documents (some of them quoted in the paper) that was assembled about 10 years ago. It&#039;s both more informative and accurate than the quoted sources. (No undocumented GB cart pins etc...) Then there&#039;s <a href="http://www.devrs.com/gb/" target="_blank">devrs.com/gb</a> which has many dead links nowadays but is still a good starting place. A little more research would&#039;ve revealed those. </p><p>The paper doesn&#039;t at all mention that there are in fact commercial flashcarts for sale to this date. <a href="http://chipmusic.org/forums/post/20783/#p20783" target="_blank">See here</a> for example.</p><p>So uhm yeah... I&#039;m sorry for the complete smackdown, but I honestly think a lot of things in the paper could have been better. Forward this post to Belial (or maybe not.)</p>]]></content>
			<author>
				<name><![CDATA[nitro2k01]]></name>
				<uri>https://chipmusic.org/nitro2k01</uri>
			</author>
			<updated>2010-06-06T02:34:06Z</updated>
			<id>https://chipmusic.org/forums/post/25511/#p25511</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25510/#p25510"/>
			<content type="html"><![CDATA[<p>Fascinating read.&nbsp; Gave me a few ideas for future projects.</p>]]></content>
			<author>
				<name><![CDATA[scienceguy8]]></name>
				<uri>https://chipmusic.org/scienceguy8</uri>
			</author>
			<updated>2010-06-06T02:30:10Z</updated>
			<id>https://chipmusic.org/forums/post/25510/#p25510</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[game boy homebrew tutorial (for software and cart development)]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/25505/#p25505"/>
			<content type="html"><![CDATA[<p>This was written and posted by belial over at the <a href="http://www.nintendoage.com/forum/messageview.cfm?catid=22&amp;threadid=34249" target="_blank">nintendoage</a> forums. </p><p><a href="http://belial.blarzwurst.de/gbpaper/paper.pdf" target="_blank">http://belial.blarzwurst.de/gbpaper/paper.pdf</a><br /></p><div class="quotebox"><blockquote><p>...The circuit board layout, CPU, etc. are well documented but it is difficult to collect all the distributed informations on the internet. The aim of this paper is to close this gap and it can be divided into two main sections:<br />-Developing a homebrew Game Boy cartridge<br />-Developing software for the Game Boy</p></blockquote></div><p>Someone can repost this under tutorials or move it there if it makes sense to. I didn&#039;t, because it&#039;s not mine and I can&#039;t vouch for all of the content. Just figured I&#039;d post it here for people to check out first! He warns that there&#039;s probably typos or some grammatical errors since English isn&#039;t his first language. He also says suggestions are welcome. <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[bucky]]></name>
				<uri>https://chipmusic.org/bucky</uri>
			</author>
			<updated>2010-06-06T00:30:33Z</updated>
			<id>https://chipmusic.org/forums/post/25505/#p25505</id>
		</entry>
</feed>
