<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - Gameboy Register Discussion]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/14602/"/>
	<updated>2014-06-28T01:03:20Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/14602/gameboy-register-discussion/</id>
		<entry>
			<title type="html"><![CDATA[Re: Gameboy Register Discussion]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/211995/#p211995"/>
			<content type="html"><![CDATA[<p>Thanks a ton, I had not seen the updated pandocs before! I will print them out immediately. <br />All of your answers helped, but the LSDj examples went over my head. I know nothing about that software and hate trackers TBH. I am writing my own assembly code, so that is why I have these questions. </p><p>The fibonacci LFSR is something you used in Shitwave, correct? I have a few questions about that software in particular, so I will join #gbdev at some point. </p><p>Cheers</p>]]></content>
			<author>
				<name><![CDATA[Jazzmarazz]]></name>
				<uri>https://chipmusic.org/Jazzmarazz</uri>
			</author>
			<updated>2014-06-28T01:03:20Z</updated>
			<id>https://chipmusic.org/forums/post/211995/#p211995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Gameboy Register Discussion]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/211994/#p211994"/>
			<content type="html"><![CDATA[<p>First off, you should probably use the newer version of Pandocs:<br /><a href="http://problemkaputt.de/pandocs.htm" target="_blank">http://problemkaputt.de/pandocs.htm</a></p><p>Secondly, you can experiment with these things in LSDj.<br />1) This setting corresponds to the length setting in an LSDj instrument. When then bit is 0, the channel continues to play forever (or until the envelope runs out or you kill it.) When that bit is 1, the channel stops playing after a period set by NRx0.</p><p>2) Yes, all 32 of the 4-bit samples are played sequentially in a loop. The volume, btw, is set by shifting each sample 1 or 2 bits to the right, which means the sample isn&#039;t just attenuated, but also &quot;bitcrushed&quot; to use modern terminology.</p><p>3) This setting corresponds to the envelope setting in a pulse/noise instrument in an LSDj instrument, or an E command. You can rewrite a new value to restart the envelope, but this will produce an audible artifact in the audio, and it&#039;s up to you to time this right by whatever methods your playback routine is using.</p><p>4) This is the shape setting in an LSDj noise instrument. The hardware has a <a href="http://en.wikipedia.org/wiki/Linear_feedback_shift_register" target="_blank">Fibonacci linear feedback shift register</a> which is producing pseudorandom data. The bit setting determines where the taps are located. The other settings determine how fast the generator is clocked, and in effect which frequency, or period it has. 7-bit means that period is so short that it sound tonal. 15-bit means the period is long enough to sound like white noise, but nevertheless, the output is periodical This can be heard in LSDj with a standard noise instrument. When played at &quot;C-3&quot; you can hear repetitions a couple of times per second.&nbsp; At &quot;C-4&quot;, it repeats so fast that the repetition starts to sound rhythmical.<br />The data is output as a single bit tapped from the shift register, so it actually just flips between 0 and 1 really fast. This can be clearly seen in a recorded waveform on some shape settings.</p><p>Hope that helped. Also, you should totally hang out in the IRC channel #gbdev on EFNet.</p>]]></content>
			<author>
				<name><![CDATA[nitro2k01]]></name>
				<uri>https://chipmusic.org/nitro2k01</uri>
			</author>
			<updated>2014-06-28T00:43:22Z</updated>
			<id>https://chipmusic.org/forums/post/211994/#p211994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Gameboy Register Discussion]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/211989/#p211989"/>
			<content type="html"><![CDATA[<p>bump<br />NA forums won&#039;t help me either!</p>]]></content>
			<author>
				<name><![CDATA[Jazzmarazz]]></name>
				<uri>https://chipmusic.org/Jazzmarazz</uri>
			</author>
			<updated>2014-06-27T23:16:35Z</updated>
			<id>https://chipmusic.org/forums/post/211989/#p211989</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Gameboy Register Discussion]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/211563/#p211563"/>
			<content type="html"><![CDATA[<p>I have a few questions about some of the registers within the gameboy. <br />The names are used from the &quot;Everything You wanted to KNow about Gameboy&quot; document.</p><p><span class="bbu">question 1.</span></p><p>$FF19 - NR 24 - AUD2HIGH</p><p>Bit 6 - Counter/Consecutive selection</p><p>If this bit is reset, will the sound sustain and when this bit is set, will the sound play for as long as is set in AUD2LEN, bits 5-0?</p><p><span class="bbu">question 2.</span></p><p>$FF1C - NR 32 - AUD3LEVEL</p><p>This register states that the Wave Pattern RAM is located from $FF30 - $FF3F and I understand that the volume is set here. How is wave patter RAM processed though? Are all 32 bits played sequentially, 4-bits at a time? </p><p><span class="bbu">question 3. </span></p><p>$FF17 - NR 22 - AUD2ENV</p><p>Bit 3 - Attenuate/Amplify</p><p>Does this mean that I may not Amplify and then Attenuate? Only one at a time? Is there an easy way to use the sound length data of a channel to toggle an attack and then decay once the sound completes? </p><p><span class="bbu">question 4. </span></p><p>$FF22 - NR 43 - AUD4POLY</p><p>I don&#039;t get this register in the least. What is going on? Here is the full description:</p><div class="quotebox"><blockquote><p>Contents - Sound Mode 4 register, polynomial counter (R/W)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bit 7-4 - Selection of the shift clock frequency of the<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; polynomial counter<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bit 3&nbsp; &nbsp;- Selection of the polynomial counter&#039;s step<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bit 2-0 - Selection of the dividing ratio of frequencies</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection of the dividing ratio of frequencies:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 000: f * 1/2^3 * 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 001: f * 1/2^3 * 1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 010: f * 1/2^3 * 1/2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 011: f * 1/2^3 * 1/3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100: f * 1/2^3 * 1/4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 101: f * 1/2^3 * 1/5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 110: f * 1/2^3 * 1/6<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 111: f * 1/2^3 * 1/7&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;f = 4.194304 Mhz</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection of the polynomial counter step:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0: 15 steps<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1: 7 steps</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Selection of the shift clock frequency of the polynomial<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; counter:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000: dividing ratio of frequencies * 1/2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0001: dividing ratio of frequencies * 1/2^2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0010: dividing ratio of frequencies * 1/2^3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0011: dividing ratio of frequencies * 1/2^4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0101: dividing ratio of frequencies * 1/2^14<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1110: prohibited code<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1111: prohibited code</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Jazzmarazz]]></name>
				<uri>https://chipmusic.org/Jazzmarazz</uri>
			</author>
			<updated>2014-06-22T17:56:25Z</updated>
			<id>https://chipmusic.org/forums/post/211563/#p211563</id>
		</entry>
</feed>
