<?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"
	>

<channel>
	<title>Gameboy Genius</title>
	<atom:link href="http://blog.gg8.se/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.gg8.se/wordpress</link>
	<description>Explore, modify, create (This is the blog of Gameboy musician nitro2k01)</description>
	<pubDate>Sun, 04 Mar 2012 09:08:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>How to patch LSDj to use an inverted palette</title>
		<link>http://blog.gg8.se/wordpress/2012/03/04/how-to-patch-lsdj-to-use-an-inverted-palette/</link>
		<comments>http://blog.gg8.se/wordpress/2012/03/04/how-to-patch-lsdj-to-use-an-inverted-palette/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 07:57:53 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[LSDj]]></category>

		<category><![CDATA[gameboy]]></category>

		<guid isPermaLink="false">http://gameboygenius.8bitcollective.com/wordpress/?p=356</guid>
		<description><![CDATA[This article was originally posted on September 19th, 2009 and has now been revised to use BGB instead no$gmb as a debugger. However, the things described here are mostly irrelevant now, because the standard method of installing a backlight these days is with a biversion, i.e. a hardware inversion. It may still be interesting for [...]]]></description>
			<content:encoded><![CDATA[<p><i>This article was originally posted on September 19th, 2009 and has now been revised to use BGB instead no$gmb as a debugger. However, the things described here are mostly irrelevant now, because the standard method of installing a backlight these days is with a <a href="http://blog.gg8.se/wordpress/2009/11/23/how-to-patch-your-dmg-to-use-a-biverted-palette/">biversion</a>, i.e. a hardware inversion. It may still be interesting for educational purposes.</i></p>
<p><del datetime="2012-03-04T02:24:30+00:00">Yesterday</del> Three years ago <a href="http://8bitcollective.com/forums/viewtopic.php?id=14899">axolotl asked on 8bc</a> whether it is possible to invert the monochrome palette in LSDj, for use with backlit screens with an inverted polarizing foil. And it&#8217;s very much possible to do, and it&#8217;s even possible to modify an existing ROM image. So, I&#8217;ll show you how I did it using a copy of the <a href="http://littlesounddj.com/lsd/latest/full_version/">LSDj ROM</a>, <a href="http://bgb.bircd.org/">BGB</a>, and optionally a hex editor. I&#8217;m using <a href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm">XVI32</a>, but any hex editor would do.</p>
<p>The palette value is change by a hardware register, which is a place in memory that a Gameboy program can be write to, to change things. So I look it up in the Pan Docs, which is a manual to the Gameboy hardware. Let&#8217;s look in the section <a href="http://nocash.emubase.de/pandocs.htm#lcdmonochromepalettes">LCD Monochrome Palettes</a>. There we see that the address is $ff47 in hexadecimal and how the value is constructed.</p>
<p>For this tutorial, right click the BGB window and choose options (or press F11), go to system and choose the Gameboy option. This will run the ROM in DMG mode, which is needed to find where the palette change happens. Open the ROM image, press esc to go to the debugger and open <strong>Debug>Access <a href="http://www.youtube.com/watch?v=5SaFTm2bcac">break</a>points</strong> and enter <strong>FF47</strong> and make sure &#8220;on write&#8221; is checked. This tells the BGB to track any writes to that address so we can find the place where the palette is initialized and change it.<br />
<center><a href="http://www.flickr.com/photos/gameboygenius/6805308876/" title="BGB create breakpoint by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7183/6805308876_8287da2c33_o.png" width="417" height="238" alt="BGB create breakpoint"></a></center></p>
<p>Click ok and press F9 to begin execution. (Or reset the emulator)</p>
<p><center><a href="http://www.flickr.com/photos/gameboygenius/6805308948/" title="BGB palette breakpoint by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7195/6805308948_991e4d468b.jpg" width="500" height="455" alt="BGB palette breakpoint"></a></center></p>
<p>BGB stops and show a bunch of machine instructions. The interesting part is the instructions at 019C and 019E. The instruction at 019C takes the hexadecimal value $E4, stores it in the CPU register A then writes it to the hardware register $FF47. This is the code we&#8217;re looking for. The value $E4 is the standard palette. Go back to pan docs and check again how the value is constructed.<br />
Then let&#8217;s split the value into its individual colours.
<pre>$E4 = 11 10 01 00</pre>
<p>11 is the lightest palette value and 00 is the darkest. Since want to invert the palette we&#8217;ll reverse the order.
<pre>      00 01 10 11 = $1B</pre>
<p>Great. You may now right click the line at 019C, choose modify code and enter <strong>ld a,1B</strong>. The line that said <strong>ld a,E4</strong> should now say <strong>ld a,1B</strong>. Choose run, reset to confirm that the palette is inverted and that LSDj doesn&#8217;t crash or anything. You may now go to file, save ROM as and save the file anywhere you want, preferably with a new file name.</p>
<p>Alternatively, you can use a hex editor to edit this value. This part of the tutorial was left unchanged from the first version, because no$gmb can&#8217;t save changes made to a ROM and thus needed a hex editor to modify the file.<br />
Open the hex editor and replace the $E4 at position 019D with the value $1B. This address will vary depending on LSDj version.</p>
<p><center>Before:</center><br />
<center><a href="http://www.flickr.com/photos/gameboygenius/3932894245/"><img src="http://farm3.static.flickr.com/2561/3932894245_50a059a770_o.png" alt="Hex editor - before" class="imagebox"></a></center><br />
<center>After:</center><br />
<center><a href="http://www.flickr.com/photos/gameboygenius/3932948277/"><img src="http://farm3.static.flickr.com/2454/3932948277_dc62f43d51_o.png" alt="Hex editor - after" class="imagebox"></a></center></p>
<p>Lastly, open the ROM in an emulator to confirm that the modification worked.<br />
<center><a href="http://www.flickr.com/photos/gameboygenius/6951423913/" title="BGB run ROM by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7064/6951423913_abb2fccd40_o.png" width="328" height="315" alt="BGB run ROM"></a></center><br />
Enjoy the inverted palette.</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=356" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2012/03/04/how-to-patch-lsdj-to-use-an-inverted-palette/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A modest copyright proposal</title>
		<link>http://blog.gg8.se/wordpress/2012/01/28/a-modest-copyright-proposal/</link>
		<comments>http://blog.gg8.se/wordpress/2012/01/28/a-modest-copyright-proposal/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 19:11:25 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=426</guid>
		<description><![CDATA[Everybody is so negative about SOPA and PIPA and ACTA. Nobody sees the opportunities! In the US legal system, plaintiffs who can prove willful infringement are entitled to up to $150,000 per work in damages. Let&#8217;s make a conservative estimate that a million Americans have downloaded 100 songs each. This would mean potential damages of [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody is so negative about SOPA and PIPA and ACTA. Nobody sees the opportunities! In the US legal system, plaintiffs who can prove willful infringement are entitled to up to $150,000 per work in damages. Let&#8217;s make a conservative estimate that a million Americans have downloaded 100 songs each. This would mean potential damages of $15M ($15,000,000) per person. Across a million people, that&#8217;s 15 million million, or 15 trillion US dollars in damages. </p>
<p>What does this number remind you of? You&#8217;re right, the US gross public debt. So hear me out on this modest proposal. Use this money to pay back the public debt. Then give each of the million people a 400 year prison sentence (not unheard of in the US) and let them work their asses off for 400 years to pay back the debt that is now on <em>their</em> shoulders. (Should anyone try to die from natural causes prior to the end of the sentence, you simply threaten to kill the person in question, which is usually enough to make him or her want to stay alive.) Putting another million people in prison won&#8217;t even double the US prison population, so the relatively small increase would hardly be a strain on the American correctional supervision system.</p>
<p>It&#8217;s doubtful whether anyone could object to this modest proposal which would instantly solve the two biggest problems America is facing today, copyright infringement and rampant public debt.</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=426" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2012/01/28/a-modest-copyright-proposal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Korg monotribe Firmware 2.0 analysis</title>
		<link>http://blog.gg8.se/wordpress/2011/12/04/korg-monotribe-firmware-20-analysis/</link>
		<comments>http://blog.gg8.se/wordpress/2011/12/04/korg-monotribe-firmware-20-analysis/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 03:33:28 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=424</guid>
		<description><![CDATA[As has already been established, Korg monotribe is MIDI capable. Howver, it is still limited with regard to certain things, such as being able to use more than 8 seqeuncer steps for the synth part or using a filter envelope separately from and LFO. All things that should be very much technically possible on the [...]]]></description>
			<content:encoded><![CDATA[<p>As has already been established, <a href="http://blog.gg8.se/wordpress/2011/08/14/monotribe-midi-and-me/">Korg monotribe is MIDI capable</a>. Howver, it is still limited with regard to certain things, such as being able to use more than 8 seqeuncer steps for the synth part or using a filter envelope separately from and LFO. All things that should be very much technically possible on the microcontroller device in the unit. One thing I&#8217;ve considered is to modify or even rewrite the firmware of the &#8216;tribe. Apart from the obvious work of actually rewriting the firmware, you need a way of flashing it onto the device. And preferably a copy of the original firmware, so the &#8216;tribe won&#8217;t be a useless brick until development is done. The microcontroller in the monotribe does support JTAG, a protocol for reading and writing firmware data, among other things, but this function may be locked down for security reasons.</p>
<p>Korg recently announced the 2.0 firmware for the monotribe, which actually gives you 16 step, velocity control and a few other new features. More full information and download available on <a href="http://korg.com/monotribe">Korg&#8217;s homepage</a>. </p>
<p>But what&#8217;s interesting about this upgrade is how you install it. You hold a secret key combo of three buttons on startup to go into upgrade mode, and then play a special audio file into the sync jack to perform the actual upgrade. This is potentially an easy way to hack the firmware of the monotribe (although with the same risk of bricking.)</p>
<p>Below, I&#8217;m posting the first step towards that goal, to extract the firmware image from the audio file. First, a big thanks to <a href="http://gravitronic.blogspot.com/2011/12/decoding-korg-monotribe-firmware.html">Th0mas</a> for doing the initial groundwork of figuring out how the data is encoded. In fact, my code below below relies on having a transformed and cleaned up version of the audio data.<br />
<span id="more-424"></span><br />
How is this data composed? The audio file encodes individual bits as little square wave pieces that are longer or shorter depending on whether a bit is low or high. The problem then becomes to figure out what is high and what is low, and how individual bytes are arranged. Th0mas quickly found out that short pulses mean a logical 1 and that bytes are transmitted with least significant digit first. </p>
<p>The problem, then, was to align the different data packets in the file, which both me and Th0mas spent some time trying to bruteforce by inserting bits at variious places to make the bytes appear correctly. To your  you have two plaintext text strings saying KORG, and also a few other patterns. You feel like you&#8217;re trying to solve the <a href="http://uk.sitestat.com/future/t3/s?clickout.www-telegraph-co-uk&#038;ns_type=clickout&#038;ns_url=http://www.telegraph.co.uk/news/uknews/defence/8928088/GCHQ-spy-recruitment-code-solved.html">GCHQ challenge</a>. Eventually I gave a up bruteforcing and made an assumption about the encoding that turned out to be correct.</p>
<p>My starting point was a file with a list of individual bits. The data is transferred in packets with a 256 byte payload each. Normally, a number of 1 bits a retransmitter. To initiate communication, one 0 bit is transmitted, followed by starting signature of 0xA9, then 256 bytes of data are transferred. Then, 3 byte signature, 0&#215;55, 0&#215;55, 0&#215;55 is transmitted (a &#8220;checkerboard&#8221; pattern, or alternating 0s and 1s.) Lastly, there&#8217;s a byte that I&#8217;m not sure what it&#8217;s for. It&#8217;s probably some form of checksum, but I can&#8217;t figure out what it is. (I&#8217;ve tried a number of xor combinations to see if I could figure it out, but no luck so far. Suggestions are welcome.)</p>
<p>Between every packet, there&#8217;s a number of bits skipped, or transmitted as simply 1. 344 to be precise, or 43 bytes. This was probably chosen to get a nice-looking number of cycles for (256+43=99) However, I would still assume that the &#8216;tribe is triggered by the start bits coming after a pause, rather than counting cycles. </p>
<p>Two packets are different, however, the first and the last. Both have the 0xA9 pre-data signature, and both lack the 0&#215;55 post-data signature. The first, &#8220;greeting&#8221; package is much shorter than 256 bytes, and the rest is filled with 0xff. It looks like this:</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6450274685/" title="korg firmware by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7172/6450274685_307c1d8dd2.jpg" width="500" height="229" alt="korg firmware" class="imagebox"></a></p>
<p>I have not figured out what the 27 D8 value is. I couldn&#8217;t find any way of making it match the size of the rest of the dat. The 02 and 01 probably denote that this is version 2.0, first revision. </p>
<p>The last packet is also missing post-data signature. All the regular data adds up to a total of exactly 32768 nytes, or 32 kB. </p>
<p>Below is my version of the decoder program, which takes a &#8220;bits&#8221; file generated by Th0mas&#8217; scripts, see the link above. It doesn not save the additional data, only the 256 byte payload of each packet.</p>
<p>Code, written in Python: (<a href="http://pastebin.com/2Kx85EUL">Or as a pastebin</a>.)</p>
<pre style="botrder: 1px gray;">from struct import pack

class TribeDecodeError(Exception):
    def __init__(self, value):
        self.value = value
    def __str__(self):
        return repr(self.value)

# Seeks a 'tribe fw bit array for the next packet start.
# Takes an iterator
def packetseek(it):
    numbits = 0;
    while(it.next()):
        numbits += 1;         # Loop through all the junk bits

    # print "%d bits skipped." % (numbits)

# Fetch next byte from bitarray.
# Returns an int.
def fetchbyte(it):
    tempstr="";
    for x in range(0,8):
        #print it.next()
        tempstr = str(it.next())+tempstr;

    return int(tempstr, 2)

# fetch a number of bytes to extract a full packet
# The second optional argument is to ignore the post-signature check, needed for the initial greeting packet
def fetchpacket(it, ignorepostsig=False, packetindex=0):
    tempbyte=0;tempstr = "";temparray=[];

    tempbyte=fetchbyte(it);

    # Confirm pre-signature
    if(tempbyte != 0xA9):
        raise TribeDecodeError(&#8221;Invalid packet pre-signature! Should be 0xA9. Found: &#8221; + hex(tempbyte));

    # Confirm post-signature
    for x in range(0,256):
        tempbyte = fetchbyte(it);
        tempstr+=pack(&#8221;B&#8221;, tempbyte);
        temparray.append(tempbyte);

    if not ignorepostsig:
        # Confirm post-signature
        for x in range(0,3):
            tempbyte = fetchbyte(it);
            if(tempbyte != 0&#215;55 and packetindex != 0&#215;80):
                raise TribeDecodeError(&#8221;Invalid packet post-signature! Should be 3*0&#215;55. Found: &#8221; + hex(tempbyte));

        # Print the mysterious checksum byte
        tempbyte = fetchbyte(it);
        print &#8220;Packet %s has checksum (?) %s&#8221; % (hex(packetindex), hex(tempbyte));

        # Sanity check
        tempbyte = fetchbyte(it);
        if(tempbyte != 0xff):
            raise TribeDecodeError(&#8221;Sanity check. Packet should be followed by 0xff but isn&#8217;t. Found: &#8221; + hex(tempbyte));

    return tempstr;

# main function
def tribefwdecode(infile, outfile, invert):
    f = open(infile, &#8220;r&#8221;);

    bitarray = f.readlines();  # Fetch the array of bits

    # Validate the bit array and convert it to bool
    for i,b in enumerate(bitarray):
        b = b.strip();
        if (b != &#8220;0&#8243; and b != &#8220;1&#8243;):
            raise TribeDecodeError(&#8221;Only 0 and 1 in the bit file, please! Found: &#8221; + b);
        else:
            if invert:
                bitarray[i] = 1-int(b);
            else:
                bitarray[i] = int(b);

    bititer = iter(bitarray);

    # Seek for the greeting packet.
    packetseek(bititer);
    fetchpacket(bititer, True)

    f = open(outfile, &#8220;w&#8221;)

    packetidx = 0;

    while True:
        try:
            packetseek(bititer);        # Try to get a packet
        except StopIteration:
            break;                      # Detect end of file.

        # Parse packet and write it fo the file.
        packet = fetchpacket(bititer,False,packetidx)
        f.write(packet)

        packetidx += 1;

    # If we&#8217;re done, close the file.
    f.close();
    print &#8220;File %s successfully parsed and written to %s&#8221; % (infile, outfile)

tribefwdecode(&#8221;bits&#8221;, &#8220;firmware2.bin&#8221;, True)
</pre>
<p> If you have questions or suggestions what the unknown values might be (27 F8 and checksum) please leave a comment below.</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=424" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/12/04/korg-monotribe-firmware-20-analysis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fun with a LED spotlight, a camera, my hand and some fruit</title>
		<link>http://blog.gg8.se/wordpress/2011/11/25/fun-with-a-led-spotlight-a-camera-my-hand-and-some-fruit/</link>
		<comments>http://blog.gg8.se/wordpress/2011/11/25/fun-with-a-led-spotlight-a-camera-my-hand-and-some-fruit/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 05:05:51 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=423</guid>
		<description><![CDATA[I recently bought an IKEA spotlight. (JANSJÖ Clamp spotlight, product number 80163192) For fun I tried cupping my hand around it in a dark room to make the light shine through my hand. I could see my own veins. Pretty cool. I used to this with flashlights as a kid, as well.
Of course, I felt [...]]]></description>
			<content:encoded><![CDATA[<p>I recently bought an IKEA spotlight. (JANSJÖ Clamp spotlight, product number 80163192) For fun I tried cupping my hand around it in a dark room to make the light shine through my hand. I could see my own veins. Pretty cool. I used to this with flashlights as a kid, as well.</p>
<p>Of course, I felt the need to document it. But these pictures look considerably different from what I could see with my naked eye&#8230;</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397895011/" title="Hand by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7149/6397895011_61cff5a00b.jpg" width="500" height="375" alt="Hand" class="imagebox"></a><br />
<span id="more-423"></span></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397904711/" title="Hand by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7017/6397904711_929f4cac26.jpg" width="500" height="375" alt="Hand" class="imagebox"></a></p>
<p>The photo has a pink tint and the sensor is saturated in the area between my fingers. (There was no open gap between the fingers.) What the how, you might ask? Let me tell you, the camera is picking up infrared light. The human doesn&#8217;t react to IR light, but digital cameras generally do react to near-red IR to some degree. There&#8217;s typically an IR high pass filter to remove the mostly unwanted IR, but it&#8217;s not perfect. Handy tip: You can also use this effect to test whether a remote control or Wii sensor bar is working by pointing it toward the camera, pressing a button/turning it on and looking at the screen.</p>
<p>So the LED is apparently emitting quite a lot of IR, and my flesh is apparently pretty transparent to it. What about some fruits? For this experiment, I made hole in various fruits and mounted to the lamp head, making sure no light escaped out the back. I put a plastic bag over the lamp head so it wouldn&#8217;t get dirty, of course.</p>
<p>An apple:<br />
<a href="http://www.flickr.com/photos/gameboygenius/6397907507/" title="Apfel by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7027/6397907507_6850f96697.jpg" width="500" height="375" alt="Apfel" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397910047/" title="Apfel by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7025/6397910047_0d781851ce.jpg" width="500" height="375" alt="Apfel" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397913051/" title="Apfel by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7019/6397913051_85ef932d88.jpg" width="500" height="375" alt="Apfel" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397916035/" title="Apfel by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.staticflickr.com/6107/6397916035_6924d50aed.jpg" width="500" height="375" alt="Apfel" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397918699/" title="Apfel by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7172/6397918699_ae34d2b6da.jpg" width="500" height="375" alt="Apfel" class="imagebox"></a></p>
<p>The effect on the apple is certainly not as pronounced as on my hand, but you can see it in the shadow, as well as some fringing around the edge of the fruit.</p>
<p>The last fruit to get this treatment was a kiwi. As one might expect, the thick skin and colored pulp made this shot less interesting from an IR point of view, but they are still included below. The difference in color is from experimenting with different ISO values. The last picture shows where the lamp head is shoved into the fruit with the &#8220;condom&#8221; on.</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397921343/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7027/6397921343_4a0223331a.jpg" width="500" height="375" alt="Kiwi" class="imagebox" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397924111/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7170/6397924111_6a5a67f55d.jpg" width="500" height="375" alt="Kiwi" class="imagebox" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397930163/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.staticflickr.com/6046/6397930163_592dd50439.jpg" width="500" height="375" alt="Kiwi" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397933141/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7014/6397933141_fb3b83d913.jpg" width="500" height="375" alt="Kiwi" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397936303/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7016/6397936303_f8b98481b9.jpg" width="500" height="375" alt="Kiwi" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397944949/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7017/6397944949_167514e137.jpg" width="500" height="375" alt="Kiwi" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397947957/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7028/6397947957_dc65e012aa.jpg" width="500" height="375" alt="Kiwi" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397954167/" title="Kiwi by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm8.staticflickr.com/7149/6397954167_0602aa45d1.jpg" width="500" height="375" alt="Kiwi" class="imagebox"></a></p>
<p>And lastly a semi-unrelated photo: This is some form of residue in my sink that I couldn&#8217;t remove easily. I think it&#8217;s a drop of grapefruit juice that has dried out. Pretty cool pattern. A moon with a big crater?</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6397957699/" title="Residue by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.staticflickr.com/6102/6397957699_e92e338fb9.jpg" width="500" height="375" alt="Residue" class="imagebox" class="imagebox"></a></p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=423" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/11/25/fun-with-a-led-spotlight-a-camera-my-hand-and-some-fruit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Untitled installation featuring Shitwave</title>
		<link>http://blog.gg8.se/wordpress/2011/10/18/untitled-installation-featuring-shitwave/</link>
		<comments>http://blog.gg8.se/wordpress/2011/10/18/untitled-installation-featuring-shitwave/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 22:01:35 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=419</guid>
		<description><![CDATA[An untitled collaboration between Simon Mattisson and Marcus Olsson. A Gameboy in a dark room is overclocked until it crashes. I&#8217;m almost getting Saw vibes from this. The Gameboy is modded by NeX and is actually being overclocked. The sound is produced by Shitwave.

Untitled from _-_- on Vimeo.
 ]]></description>
			<content:encoded><![CDATA[<p><a href="http://moire.se/simon/index.php?n=Site.UntitledInstallation">An untitled collaboration between Simon Mattisson and Marcus Olsson.</a> A Gameboy in a dark room is overclocked until it crashes. I&#8217;m almost getting Saw vibes from this. The Gameboy is modded by <a href="http://nex.gg8.se/modblog/">NeX</a> and is actually being overclocked. The sound is produced by <a href="http://blog.gg8.se/wordpress/2009/03/23/shitwave-a-prng-based-drone-generator-for-gameboy/">Shitwave</a>.</p>
<p><iframe src="http://player.vimeo.com/video/30668852?color=c9ff23" width="500" height="281" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/30668852">Untitled</a> from <a href="http://vimeo.com/s0000">_-_-</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=419" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/10/18/untitled-installation-featuring-shitwave/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Syncing monotribe to LSDj using the sync jack (no MIDI)</title>
		<link>http://blog.gg8.se/wordpress/2011/09/28/syncing-monotribe-to-lsdj-using-the-sync-jack-no-midi/</link>
		<comments>http://blog.gg8.se/wordpress/2011/09/28/syncing-monotribe-to-lsdj-using-the-sync-jack-no-midi/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 00:37:10 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=418</guid>
		<description><![CDATA[Monotribe has jacks on the back for sync in and out. The sync output outputs 15 ms 5V pulses, which can either be rising or falling. (There&#8217;s a setting for this.) The sync input can also trigger on either a positive or a negative edge. (There&#8217;s a setting for this as well.)
You can trigger this [...]]]></description>
			<content:encoded><![CDATA[<p>Monotribe has jacks on the back for sync in and out. The sync output outputs 15 ms 5V pulses, which can either be rising or falling. (There&#8217;s a setting for this.) The sync input can also trigger on either a positive or a negative edge. (There&#8217;s a setting for this as well.)</p>
<p>You can trigger this input from LSDj. There are two things to think about:<br />
1) The signal from the headphone jack is too weak. You need a ProSound modded DMG with the volume turned all the way up. (Other models untested, may or may not work&#8230;)<br />
2) The monotribe requires a single clean rising edge to trigger correctly. The pitfall when using LSDj is that for example a square way, or a sawtooth wave, or even the noise generator, will trigger multiple steps. For this reason, you cannot use the pulse channels for this without getting a lot of false triggers. But you can use either the wave channel or the noise channel with somewhat predictable results (almost no false triggers) using a couple of tricks.</p>
<p>In this video I&#8217;m showing you how. As you can see, the video also shows which buttons I were pressing at any one time in case anything is unclear. Below is an explanation for the things show in the video.</p>
<p><object width="480" height="457"><param name="movie" value="http://www.youtube.com/v/GdrmAEBAI3g?fs=1&amp;hl=en_US&amp;color1=0xcc2550&amp;color2=0xe87a9f"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="quality" value="low"></param><embed src="http://www.youtube.com/v/GdrmAEBAI3g?fs=1&amp;hl=en_US&amp;color1=0xcc2550&amp;color2=0xe87a9f" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="457" quality="low"></embed></object></p>
<p><H3>1) Using the wave channel</h3>
<p>The idea of this method is to create a wave that doesn&#8217;t oscillate. Instead of a sawtooth wave or a sine wave, you have a constant voltage. The easiest way to do this is by creating a synth with zero volume and moving all samples to the top.<br />
Select+B, right until everything is selected, up until the samples are at the top.<br />
(After recording this I realized that an even easier way to do the same thing is to set the VSHIFT parameter to 80, but this is good exercise in using the wave editor.)</p>
<p>The instrument used needs to be a wave instrument and have PLAY set to MANUAL. At this point, the instrument hould be ready to use. Place a note on on each step in the sequencer where you want to trigger the monotribe.</p>
<p><H3>2) Using the noise channel</h3>
<p>The Gameboy noise channel actually doesn&#8217;t produce real noise, but pseudo-random noise by changing amplitude between 0 and 1 in ways that sound random to humans. The Gameboy allows you to control the pitch of the noise, and at very slow pitch settings, it can take a second between the changes. This can be to sync the monotribe by first turning on the sound quickly to trigger the sync function, and then turning it off again, so the noise channel&#8217;s oscillations won&#8217;t trigger any more steps after that.</p>
<p>The way to do this is by setting the shape to 54 and usinng a table that turns off the sound output with the O command. (Trust me, I&#8217;m a professional.) I also changed the envelope to F8 to get the maximum amplitude possible.</p>
<p><H3>General instructions</h3>
<p>Use either the wave method or the noise method, not both. Both methods should give you OK stability from 40 BPM to 255 BPM, but sometimes you&#8217;ll see glitches, especially if you adjust the tempo.</p>
<p>If you have an appropriate left/right splitter cable, you can pan the sync instrument to the left and all other instruments to the right, to get both sound and sync out of one Gameboy. If any sound instrument is panned to the sync channel, the monotribe will start rushing.</p>
<p>Always start the monotribe first (or stop/start it before you restart LSDj) if you want things in sync. Otherwise, it will start at the step where it received the last pulse before it stopped.</p>
<p>Even when following all instructions, it may happen that the monotribe misses a beat when you press play, in particular the first time you press play after turning on the Gameboy. If so, stop LSDj, stop/start the monotribe and try again. </p>
<p><H3>Tip 1: Adding some swing</h3>
<p>You can add some swing in LSDj, just like when using <a href="http://itunes.apple.com/us/app/korg-synckontrol-for-monotribe/id438617344?mt=8">Korg&#8217;s iOS app SyncKontrol</a>. Swing, or shuffle, basically means that you delay every second note to get a more natural and less straight feel.</p>
<p>For this, I&#8217;m using the groove function in LSDJ. Since I laid out the the sync notes as 1/8th notes, I need to make a groove pattern that is 4 steps for it to have any effect. This is an LSDj technique that doesn&#8217;t need the monotribe to work. <a href="http://www.packetsofknowledge.se/LSDj:Ticks_and_grooves">Go here to learn how the groove function in LSDj works</a>.</p>
<p><H3>Tip 2: Using the noise channel as a random trigger source</h3>
<p>If you want to get random trigger pulses that are not synced to the tempo, or anything else, you can create a noise instrument with a low shape value, just like in the noise example below. If you let it play, it will trigger the monotribe at seemingly random intervals.</p>
<p>If you have any questions or thoughts, ask below.</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=418" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/09/28/syncing-monotribe-to-lsdj-using-the-sync-jack-no-midi/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wireless monotribe MIDI</title>
		<link>http://blog.gg8.se/wordpress/2011/09/10/wireless-monotribe-midi-almost/</link>
		<comments>http://blog.gg8.se/wordpress/2011/09/10/wireless-monotribe-midi-almost/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 21:34:12 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[monotribe]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=417</guid>
		<description><![CDATA[Made by a Japanese person using the name air_variable. He&#8217;s using an XBee for wireless serial communication. This just gives you a serial line, which can be interfaced over USB. This is not real MIDI, but you can use a serial to MIDI converter for this. For example, BlipBox MIDI serial or Spikenzie Labs Serial [...]]]></description>
			<content:encoded><![CDATA[<p>Made by a Japanese person using the name air_variable. He&#8217;s using an XBee for wireless serial communication. This just gives you a serial line, which can be interfaced over USB. This is not real MIDI, but you can use a serial to MIDI converter for this. For example, <a href="http://blipbox.wordpress.com/projects/midiserial/">BlipBox MIDI serial</a> or <a href="http://spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html">Spikenzie Labs Serial MIDI</a>. Or why not Korg&#8217;s (!) <a href="http://www.korguksupport.co.uk/page.cfm?pageid=464">PCIF-NT</a> driver, as suggested in <a href="http://www.ladyada.net/make/xbee/midibee.html">Lady Ada&#8217;s MIDI Zigbee tutorial</a>. There are even more serial MIDI converters if you use Google.</p>
<p>Source: <a href="http://airvariable.asablo.jp/blog/cat/monitribe/">air_variable posts tagged monotribe</a> (Japanese)</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=417" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/09/10/wireless-monotribe-midi-almost/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Monotribe, MIDI and me</title>
		<link>http://blog.gg8.se/wordpress/2011/08/14/monotribe-midi-and-me/</link>
		<comments>http://blog.gg8.se/wordpress/2011/08/14/monotribe-midi-and-me/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 16:20:23 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[monotribe]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=414</guid>
		<description><![CDATA[
Introduction
Voilà Korg monotribe, the successor to its little brother, the monotron. The Monotron is a cheap, squeeky, and easily moddable toy synth with an MS-10/20-like filter topology. It has a ribbon keyboard an audio oscillator, an LFO, a lowpass filter, and not much more. The monotron was an instant hit, and Korg released schematics for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/gameboygenius/6034699085/" title="Monotribe first picture by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6136/6034699085_07da9328ba.jpg" width="500" height="375" alt="Monotribe first picture" class="imagebox"></a></p>
<h2>Introduction</h2>
<p>Voilà Korg monotribe, the successor to its little brother, the mono<strong>tron</strong>. The <a href="http://www.korg.com/monotron">Monotron</a> is a cheap, squeeky, and easily moddable toy synth with an <a href="http://www.timstinchcombe.co.uk/synth/monotron/mono.html">MS-10/20-like filter topology</a>. It has a ribbon keyboard an audio oscillator, an LFO, a lowpass filter, and not much more. The monotron was an instant hit, and <a href="http://korg.com/monotronSchematics">Korg released schematics</a> for it to aid modders further.</p>
<p>When I heard about the monotribe, I had my doubts. Mostly that there&#8217;s only one pattern, which is 8 steps long. Well, there are 8 extra steps for the drums, as well as a &#8220;flux mode&#8221; which records your movements on the ribbon continuously. In that sense, it is limited, and is an instrument made to be played with your hands, rather than be programmed. But as it turned out, this was a design choice, and not a technical limitation. I can easily imagine why. They wanted it to seem as analog and playful as possible.</p>
<p>Same thing with MIDI. Officially, the monotribe doesn&#8217;t support MIDI. It does however offer a sync pulse output and input. This allows it to be synced to other monotribes, modular synthesizers or even Korg&#8217;s own virtual <a href="http://www.korg.com/ims20">iMS-20</a>/<a href="http://www.korg.com/ielectribe">iElectribe</a>, using a special sync app on a second iPhone/Pod/Pad. However, the lack of MIDI is still a slight limitation.<br />
<span id="more-414"></span><br />
TOC</p>
<p><a href="#Opening_it_up">Opening it up</h2>
<p><a href="#Hackability_and_MIDI">Hackability and MIDI</h2>
<p><a href="#MIDI_the_electrical_side_of_things">MIDI, the electrical side of things</h2>
<p><a href="#MIDI_the_mechanical_side_of_things">MIDI, the mechanical side of things</h2>
<p><a href="#What_can_you_do_with_MIDI_on_the_monotribe">What can you do with MIDI on the monotribe?</h2>
<p><a href="#Videos">Videos</h2>
<p><a href="#Where_do_we_go_from_here_Final_thoughts">Where do we go from here?/Final thoughts</h2>
<h2 id="Opening_it_up">Opening it up</h2>
<p><a href="http://www.flickr.com/photos/gameboygenius/6035298622/" title="Monotribe main board bottom side (closeup) by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6127/6035298622_b857ee913e.jpg" width="500" height="375" alt="Monotribe main board bottom side (closeup)" class="imagebox"></a></p>
<p>Before I get to the part everyone has been waiting for, let me remark on something I noticed when I opened up the monotribe. The whole bottom side of the main board is covered in some form of residue, maybe flux or one of the liquids used in the manufacturing process. </p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6034742135/" title="Monotribe main board bottom side (closeup) by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6195/6034742135_05dc08c0d0.jpg" width="500" height="375" alt="Monotribe main board bottom side (closeup)" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6035300176/" title="Monotribe main board bottom side (closeup) by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6209/6035300176_d3f04fee68.jpg" width="500" height="375" alt="Monotribe main board bottom side (closeup)" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6034740325/" title="Monotribe main board bottom side (closeup) by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6085/6034740325_3b495f20ee.jpg" width="500" height="375" alt="Monotribe main board bottom side (closeup)" class="imagebox"></a></p>
<p>This is even nastier. In the top two pictures, there&#8217;s some black stuff that I&#8217;m not sure what it is. Could be corrosion of some kind, or parts of a chip that was crushed by the pick and place machine. Or something. In the bottom picture, notice how IC17 (an LM324 opamp) as well as the Q2 transistor, are covered in this gunk. Also notice that there&#8217;s too much solder on some of the SMD resistors. (<a href="http://www.flickr.com/photos/gameboygenius/6034740325/sizes/o/in/photostream/">Original hi-res photo, 4320 x 3240</a>) None of that is an <em>immediate</em> risk to the function of the device, but depending on what that residue actually is, there&#8217;s a very real risk of an increased failure rate over a decade or three, due to corrosion. I&#8217;ve seen better soldering, and I&#8217;ve seen <a href="http://blog.gg8.se/wordpress/2009/10/20/the-chinese-pirate-dell-psu/">significantly worse soldering</a>, but all-in-all I expect better from a factory-made product. Maybe mine was a dud, but it makes you wonder.</p>
<h2 id="Hackability_and_MIDI">Hackability and MIDI</h2>
<p>I doubt Korg is going to release a schematic for the monotribe anytime soon, like they did for the monotron, but the monotribe board does have a number of useful points for modifying parameters and separating outputs, marked on the board. See the <a href="http://monomodder.blogspot.com/">Monomodder</a> blog for inspiration.</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6035277420/" title="Monotribe main board component side by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6137/6035277420_f6e4c2e6ff.jpg" width="500" height="375" alt="Monotribe main board component side" class="imagebox"></a></p>
<p>However, monotribe is quite a different beast compared to monotron. Even though the sounds are generated with analog circuitry, the heart of the monotribe is a microcontroller. The microcontroller is used as sequencer and, I think, LFO. The microcontroller is a Toshiba TMPM332FWUG. It has an ARM Cortex-M3 core, 128 kB of flash memory and 8 kB of internal RAM. It is clocked at 10 MHz. It has, like most microcontrollers these days, support for UART (serial communication) which means that software running on the microcontroller could theoretically easily implement MIDI, which is really just a quirky variation of UART. As I, and <a href="http://airvariable.asablo.jp/blog/2011/06/01/5895001">air_variable</a> (Japanese) before me have discovered, there is something going on there, and it turned out to be actual MIDI. All you need to do is hook a few points on the board.</p>
<h2 id="MIDI_the_electrical_side_of_things">MIDI, the electrical side of things</h2>
<p><a href="http://www.flickr.com/photos/gameboygenius/6039056736/" title="MIDI out and MIDI in by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6122/6039056736_6cf4beb9d9.jpg" width="500" height="375" alt="MIDI out and MIDI in" class="imagebox"></a><br />
Upper schematic: MIDI out. Lower schematic: MIDI in. NC means &#8220;no connection&#8221;.</p>
<p>Note that this schematic is looking at the back of a panel mount style MIDI jack, similar to the one seen in my other images. </p>
<p>The schematic is drawn so that you&#8217;re looking at the chip from above. Place the chip so that the little notch is pointing up. Pins 2 and 3 are on the left side of the chip. Ground is the bottom right pin. +5V/+3.3V is the upper right pin on the chip. The things inside the dotted rectangle is what&#8217;s inside the chip.</p>
<p>The unspecified diode on the left of the chip is a small signal diode, not a LED. 1n4148 or 1n914 will work, for example.</p>
<p><strong>MIDI is designed in such a way</strong> that individual bits are transferred as a current that lights up a LED in an optocoupler, on the receiving side. This LED, in turn turns a phototransistor on and off. In a MIDI circuit, the LED in the optocoupler should be connected between the +5V line and the signal line. Normally, the signal line is high, which means there is no difference between it and the +5V line. To communicate, the signal line will go low, which in turn will light the LED on the receiving side.</p>
<p>A MIDI circuit should have a number of resistors both on the transmitting and receiving side. This design gives MIDI better noise immunity, and protects the gear in case of a number of things that can go wrong, such as a short-circuit between any individual pins, connecting an output to an output or reversing the pinout of the plug.</p>
<p><strong>Let&#8217;s first look at how to do MIDI out</strong> with the monotribe. The microcontroller is using a 3.3 V power supply. MIDI is normally using 5 V, so if we wanted to be correct, we would convert the signal from 3.3 V to 5 V. However, we don&#8217;t strictly need to do this. As long as we can light up the LED on the other side, we&#8217;re fine. (You might need a real +5 V supply if you want to connect a MIDI hub that is powered by the MIDI host, however.)</p>
<p>To be guaranteed to light up the LED from 3.3 V, we&#8217;ll need to decrease the resistor values slightly. I found that replacing R<sub>1</sub> and R<sub>2</sub> in the schematic above with 150 ohms each works fine with my MIDI interface, but my calculations are suggesting that around 60 ohms may be needed, depending on the optocoupler. Bigger value resistor is safer, so try 150 ohms first. </p>
<p><strong>There are two ways to do MIDI in</strong>, either with an optocoupler or without one. If you want to be cheap, you can simply connect the signal pin (the lowest one) from the MIDI jack and connect it through a 820 ohm resistor to the RX pin (see below) of the microcontroller. The resistor is needed to protect the microcontroller chip from the signal which is using a +5V signal level, which is outside of the chip&#8217;s specified limits. If you do it this way, you also need to connect ground from the MIDI jack (the &#8220;NC&#8221; pin) to ground on the board. Do not connect +5 V pin (the upper pin) anywhere.</p>
<p>If you want to do it properly, you can use for example a 6n136 or a 6n138. If you choose to use a 6n136, connect it as pictured above. (Connect +3.3 V, the red wire in the picture, instead of +5V in the schematic.) If you&#8217;ll be using a 6n138, you can use the connection below, <a href="http://www.flickr.com/photos/wooster/4925449834/">according to Wooster audio</a>. The part of the circuit that is to the left of the diode is the same as in the 6n136 circuit.<br />
<a href="http://www.flickr.com/photos/gameboygenius/6038673381/" title="DSCN1504-contrast by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6081/6038673381_ae52d02c08.jpg" width="500" height="375" alt="6n138 MIDI schematic for 3.3 V operation" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6034837003/" title="Quick'n'dirty mounting of a prototype board by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6129/6034837003_34c0a138da.jpg" width="500" height="375" alt="Quick'n'dirty mounting of a prototype board" class="imagebox"></a><br />
The picture above shows how I connected MIDI in with an optocoupler. The blue wire is ground. The red wire is +3.3V. The yellow wire is where the signal comes back (MIDI in.)</p>
<p>The MIDI output is situated between the points with yellow and the red cables, i.e. 3rd from the top.</p>
<h2 id="MIDI_the_mechanical_side_of_things">MIDI, the mechanical side of things</h2>
<p><a href="http://www.flickr.com/photos/gameboygenius/6035371960/" title="Getting there... by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6122/6035371960_204c1a934d.jpg" width="500" height="375" alt="Getting there..." class="imagebox"></a><br />
You drill a hole for the jack, simple enough. However, I&#8217;ll share these images as a cautionary tale that you need to pay attention where you drill the hole. Here I made two mistakes:<br />
1) The hole was too high up, so the jack collided with the PCB. (You&#8217;re looking into the monotribe from the bottom, so up=down&#8230;) I solved this by trimming away a part of the PCB which was just a big ground plane.<br />
2) The less obvious problem is that the hole was too far back, so one of the screw holes ended up behind the standoff. This is a problem because it makes it difficult to insert a nut behind the screw.<br />
So, plan before you drill!<br />
<a href="http://www.flickr.com/photos/gameboygenius/6035383016/" title="But the hole was slightly misaligned... by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6146/6035383016_6ea7d3cf97.jpg" width="500" height="375" alt="But the hole was slightly misaligned..." class="imagebox"></a></p>
<p>If you&#8217;re using an optocoupler you need to add a small PCB for the optocoupler and the other components. (2-3 resistors and a diode.) I found that one suitable place for attaching this board is on the interface board. There&#8217;s a hole drilled where you can attach a board with a screw, as pictured below. Once again, however, I slightly misjudged the measurements. The board stuck out too long and collided with the speaker.</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6035268136/" title="Monotribe interface board bottom side by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6182/6035268136_d1f813a665_m.jpg" width="240" height="180" alt="Monotribe interface board bottom side" class="imagebox"></a> <a href="http://www.flickr.com/photos/gameboygenius/6034833187/" title="Quick'n'dirty mounting of a prototype board by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6083/6034833187_1abe625e4b_m.jpg" width="240" height="180" alt="Quick'n'dirty mounting of a prototype board" class="imagebox"></a></p>
<p><a href="http://www.flickr.com/photos/gameboygenius/6034840897/" title="Quick'n'dirty mounting of a prototype board by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6063/6034840897_39953b939b_m.jpg" width="240" height="180" alt="Quick'n'dirty mounting of a prototype board" class="imagebox"></a> <a href="http://www.flickr.com/photos/gameboygenius/6035390760/" title="Quick'n'dirty mounting of a prototype board by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6085/6035390760_f60b2435f8_m.jpg" width="240" height="180" alt="Quick'n'dirty mounting of a prototype board" class="imagebox"></a></p>
<h2 id="What_can_you_do_with_MIDI_on_the_monotribe">What can you do with MIDI on the monotribe?</h2>
<p><a href="http://www.flickr.com/photos/gameboygenius/6035312304/" title="Monotribe - MIDI-controllable things by nitro2k01 (Gameboy Genius), on Flickr"><img src="http://farm7.static.flickr.com/6210/6035312304_7892ea12be.jpg" width="500" height="375" alt="Monotribe - MIDI-controllable things" class="imagebox"></a></p>
<p>Simple answer: You can sync the internal sequencer, play notes, and control all parameters the EG type as well as all parameters relating to the LFO section. It also transmits those very same things, so it could be used as a MIDI sync source, sequencer or limited control surface.</p>
<p>Details</p>
<ul>
<li><strong>Sync:</strong> It will both send and accept MIDI sync, start and stop messages, meaning the sequencer can be reset over MIDI, which can&#8217;t be done remotely if you&#8217;re only using the regular sync input.
<p><strong>Quirks/problems:</strong> When you&#8217;re using the miditribe as a MIDI slave and remove the sync clock, it will keep waiting for a MIDI clock indefinitely. You can fix this by either <a href="http://www.youtube.com/watch?v=nn2FB1P_Mn8">turning it off and on again</a>, or plugging something in and out of the sync in jack, which will restore it to the internal sync clock.</li>
<li><strong>Notes:</strong> It will send and receive notes within the limits of the sequencer. It&#8217;s using channel 1 for notes. Notes outside these limits will be ignored. It does <em>not</em> react to varying velocities. It does however react to pitch bend MIDI messages and is able to record and play back pitch bend in flux mode! I don&#8217;t have MIDI out hooked up at the moment, so I can&#8217;t confirm this right now, but I&#8217;m assuming it also transmits MIDI pitch bend messages when it plays notes in flux mode.
<p><strong>Quirks/problems:</strong> It has a stuck note issue when it doesn&#8217;t receive a note off message for a note. Let&#8217;s say you send a note on message for D4 and then a note on message for E4, and lastly a note off message for E4. This can happen in Renoise, for example. In this situation, D4 gets stuck, and a new D4 note is played as soon as you release all other keys. Sometimes multiple keys can get stuck, and you need to go through each key to depress each one.
</li>
<li><strong>Drums:</strong> It&#8217;s using the standard General MIDI specification for drums, which means the following notes on MIDI channel 10.<br />
<table border="1">
<thead>
<tr>
<td>Name  </td>
<td>Note number </td>
<td>Note name </td>
<td>GM drum name </td>
</tr>
</thead>
<tr>
<td>BD  </td>
<td>36 </td>
<td>C1 </td>
<td>Bass drum 1 </td>
</tr>
<tr>
<td>SN  </td>
<td>40 </td>
<td>E1 </td>
<td>Snare dum 2/Electric snare </td>
</tr>
<tr>
<td>HH  </td>
<td>42 </td>
<td>F#1 </td>
<td>Closed hi-hat</td>
</tr>
</table>
</li>
<li><strong>Control change messages (CC)</strong>: It can send and receive CC for all the knobs and switches marked green above. The parameters are mapped as follows:<br />
<table border="1">
<thead>
<tr>
<td>Name  </td>
<td>CC number </td>
<td>Values </td>
<td>GM parameter name </td>
</tr>
</thead>
<tr>
<td>LFO rate  </td>
<td>16 </td>
<td>– </td>
<td>General purpose controller 1  </td>
</tr>
<tr>
<td>LFO int.  </td>
<td>1 </td>
<td>– </td>
<td>Modulation wheel   </td>
</tr>
<tr>
<td>EG shape  </td>
<td>80 </td>
<td>32=decay<br />64=sustain<br />96=attack </td>
<td>General purpose controller 5  </td>
</tr>
<tr>
<td>LFO target  </td>
<td>81 </td>
<td>32=VCO<br />64=VCO+VCF<br />96=VCF </td>
<td>General purpose controller 6  </td>
</tr>
<tr>
<td>LFO mode  </td>
<td>82 </td>
<td>32=Fast<br />64=Slow<br />96=1shot </td>
<td>General purpose controller 7  </td>
</tr>
<tr>
<td>LFO wave  </td>
<td>83 </td>
<td>32=Saw<br />64=Triangle<br />96=Square </td>
<td>General purpose controller 8  </td>
</tr>
</table>
<p><strong>Quirks/problems:</strong> It&#8217;s practically useless as a MIDI control surface because it is really slow at sending CC messages. If you wiggle one of the knobs a few times really fast for a few seconds, it will continue to transmit CC commands for several seconds.</p>
<p>I&#8217;ve noticed that when controlling the LFO rate/int. knobs remotely, the value will sometimes jump back to the value that the knob is at. I&#8217;m guessing that this happens because there&#8217;s a small fluctuation in the voltage that the microcontroller will pick up as a change in the value. If you only want to control these parameters over MIDI, you can minimize this effect by turning these knobs fully counter-clockwise.
</li>
</ul>
<h2 id="Videos">Videos</h2>
<p>These are two videos showing me play around with MIDI in and MIDI out.</p>
<h3>MIDI in</h3>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/G9N7JE6u82w?fs=1&amp;hl=en_US&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/G9N7JE6u82w?fs=1&amp;hl=en_US&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<h3>MIDI out</h3>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/vhlE_gcvof8?fs=1&amp;hl=en_US&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vhlE_gcvof8?fs=1&amp;hl=en_US&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<h3>Video advertising this post, basically</h3>
<p>Music sequenced in Renoise, played back on Korg monotribe and fed back into Renoise&#8217;s effects, some distortion and some delay. The drums are not played by the monotribe, but are samples in Renoise.<br />
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/LvM0viQLFjo?fs=1&amp;hl=en_US&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/LvM0viQLFjo?fs=1&amp;hl=en_US&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<h2 id="Where_do_we_go_from_here_Final_thoughts">Where do we go from here?/Final thoughts</h2>
<p>Some people have been wondering why Korg didn&#8217;t just include MIDI support out of the box. First off, to be honest, I think the MIDI support is a bit buggy, and probably wasn&#8217;t ready to be released anyway. It might be something they implemented mostly for internal testing. Another possibility, which I don&#8217;t believe much in, is that they&#8217;re planning to release a MIDI-enabled &#8220;monotribe pro&#8221; later. I just don&#8217;t think that fits into Korg&#8217;s profile of how people will use the monotribe, so I don&#8217;t think there will be a pro version with MIDI.</p>
<p>But, phew! Hopefully this should be enough information to get some of you up and running and get MIDI working on your &#8216;tribes. So what can we use this for anyway? Hooking up the monotribe to a computer and just use it as an analogue synth, honestly doesn&#8217;t provide any real advantages over using, say, a good softsynth, in my opinion. The monotribe&#8217;s charm is its hands-on usage, so I think the modification will be most useful for syncing it with gear where it&#8217;s more convenient to use MIDI sync than the sync options at the back of the monotribe.</p>
<p>Another possibility for LSDj users, is to use <a href="http://chipmusic.org/forums/topic/3911/using-lsdj-as-a-midi-sequencer/">Arduinoboy+LSDj MIDI out</a>. You&#8217;ll be able to control the monotribe nicely and which will give you a nice analogue companion to LSDj&#8217;s digital sound.</p>
<p>Other than that, the fact that monotribe can be used with MIDI also opens up the possibility of an internal mod. For the price it&#8217;s sold for, it&#8217;s a fun toy but not an essential tool. If the thing could be extended to be more TB-303-ish (not going to hide my dreams) it would instantly become more appealing to a lot of people. My original idea was to replace the firmware on the unit&#8217;s own microcontroller, but that&#8217;s difficult and tedious. </p>
<p>My new idea idea is to add another microcontroller (&#8217;duino anyone?) which replaces the sequencer, and also gives the possibility to do things like slide (emulated with pitch bend) or accent (emulated by adjusting the LFO rate/intensity). You could also add a second LFO and all sorts of things. With some extra software and wires, this thing could become truly useful as a standalone unit&#8230;</p>
<p>Useful links:<br />
<a href="http://www.flickr.com/photos/gameboygenius/sets/72157627291262639/with/6035312304/">Board photos and more on Flickr</a><br />
<a href="http://www.youtube.com/user/Gameboygenius">My YouTube channel</a><br />
<a href="http://muffwiggler.com/forum/viewtopic.php?t=39099&#038;postdays=0&#038;postorder=asc&#038;start=0">Discussion on Muff Wiggler</a><br />
<a href="http://monomodder.blogspot.com/">Monomodder blog</a></p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=414" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/08/14/monotribe-midi-and-me/feed/</wfw:commentRss>
		</item>
		<item>
		<title>500 infernal terror!</title>
		<link>http://blog.gg8.se/wordpress/2011/08/08/500-infernal-terror/</link>
		<comments>http://blog.gg8.se/wordpress/2011/08/08/500-infernal-terror/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 20:36:31 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=415</guid>
		<description><![CDATA[My webhost recently started moving their customers to their new generation of servers, running LiteSpeed. This has caused me some grief the last few hours. One of my sites consistently showed a &#8220;403 access denied&#8221; error, seemingly no matter what I tried to do to remedy the problem. With some hard trying, I managed to [...]]]></description>
			<content:encoded><![CDATA[<p>My webhost recently started moving their customers to their new generation of servers, running LiteSpeed. This has caused me some grief the last few hours. <a href="http://packetsofknowledge.se/Main_Page">One of my sites</a> consistently showed a &#8220;403 access denied&#8221; error, seemingly no matter what I tried to do to remedy the problem. With some hard trying, I managed to make it display a &#8220;404 not found&#8221; instead, still seemingly randomly. </p>
<p><strong>It turns out</strong> there were two problems, both most likely caused by buggy interpretation of .htaccess files by LiteSpeed. The first problem came from these two lines:<br />
<code>Allow From All<br />
Order Allow,Deny</code><br />
As it turns out by experiment, LiteSpeed handles these statements differently from Apache. Apache will start off by making a list of all the applicable rules, and then evaluating them in the order specified in the Order statement. In this example, first all Allow rules will be evaluated, then all deny rules. If there are any matches, Deny will take precedence since it&#8217;s last in order. If there are no matches, Deny will also take precedence since it&#8217;s the second argument. Of course, in this case everyone will be allowed since there&#8217;s an <code>Allow From All</code> statement, unless there are matching <code>Deny</code> rules. This is <a href="http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order">well documented in the Apache manual</a> and (hopefully) well understood by web developers.</p>
<p>LiteSpeed on the other hand is dependent on <em>where</em> statements are placed in the source code. In the above example, the <code>Allow From all</code> statement is ignored, or possibly overridden by some implicit form of Deny From all. Not really sure&#8230; Moving <code>Allow From all</code> to after the <code>Order</code> statement will make it work. Also, changing the <code>Allow</code> statement to something more specific, like <code>Allow From 1.2.3.4</code> but still placing it before <code>Order</code> will suddenly make it trigger. Not sure what&#8217;s up with that. Perhaps the LiteSpeed authors are trying to make it work how they think <em>people think it will work</em>. Or maybe they&#8217;re trying to do some optimizations by trying to abort the evaluation of the file as early as possible. Or maybe they just don&#8217;t know how these rules are interpreted by Apache. In any case, fact of the matter is that it doesn&#8217;t work as it is supposed to.</p>
<p><strong>The next problem</strong> is how LiteSpeed handles errors in .htaccess files. It seems like whatever you do, you can&#8217;t get a 500 internal error from LiteSpeed if your .htaccess rules are incorrect. Completely invalid rules will be ignored, whereas as they would give a 500 internal on Apache. Malformed rules will give you a 404 not found instead of a 500 internal error, making it difficult to pinpoint the exact error. I&#8217;m not sure if this is a &#8220;feature&#8221; of LiteSpeed so they can say that their server will never have internal errors, or if it&#8217;s a secondary error similar to the <i>&#8220;Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request&#8221;</i> errors that you sometimes see on badly configured Apache servers. </p>
<p>The culprit this time was the following rule:<br />
<code>RewriteRule ^(.*)$ wiki/index.php?title=$1 [PT,L,QSA,B]</code><br />
LiteSpeed apparently doesn&#8217;t support the B modifier (escape characters like &#038; when building the query string) which caused the server to barf. However, since what I got was a 404 error, and not a 500, I thought the rule somehow rewrote the URI to something that didn&#8217;t exist. It was not until I replaced the B with a bunch of random characters that I understood what was going on.</p>
<p><strong>All in all</strong>, all of this may not seem like a very tough nut to crack, but there&#8217;s more. For some reason, an index.html file had its permission mask set to 400, or r&#8212;&#8212;&#8211;, which in UNIX persmission terms means that the file will only be readable by its owner, and not by users in the same group, or &#8220;anyone&#8221;. This was a placeholder page that the web host had put their, but I&#8217;m not sure how it got that permission mask. </p>
<p>When the rule works as it should, the root URL <code>http://packetsofknowledge.se/</code> should be rewritten to the MediaWiki index.php. However, when I tried simply deleting/renaming my .htaccess, I still got a 403 because of the permissions of the index.html. However, since I hadn&#8217;t noticed that, I assumed at that point that the issue maybe wasn&#8217;t .htaccess related. </p>
<p>To summarize, when you have different error sources, the number of ways something can fail increases exponentially.</p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=415" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/08/08/500-infernal-terror/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why dead horizontal lines are harder to fix&#8230;</title>
		<link>http://blog.gg8.se/wordpress/2011/07/21/why-dead-horizontal-lines-are-harder-to-fix/</link>
		<comments>http://blog.gg8.se/wordpress/2011/07/21/why-dead-horizontal-lines-are-harder-to-fix/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 15:29:26 +0000</pubDate>
		<dc:creator>nitro2k01</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.gg8.se/wordpress/?p=416</guid>
		<description><![CDATA[There&#8217;s a (relatively) well-known method of fixing dead lines on the DMG-01 (classic Gameboy) LCD screen which consists of dragging a hot soldering iron across the connection of the brown plastic connector with an epoxy blob, and the glass. The right spot in underneath where there&#8217;s normally a black rubber strip. This will reflow the [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a (relatively) well-known method of fixing dead lines on the DMG-01 (classic Gameboy) LCD screen which consists of dragging a hot soldering iron across the connection of the brown plastic connector with an epoxy blob, and the glass. The right spot in underneath where there&#8217;s normally a black rubber strip. This will reflow the glue, solder or whatever is used for the attachment, and the method can usually successfully fix dead vertical lines.</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/5959529012/" title="How not to fix dead horizontal lines on a DMG-01 by nitro2k01 (Gameboy Genius), on Flickr"><img class="imagebox" src="http://farm7.static.flickr.com/6009/5959529012_b5d70ea3d0.jpg" width="500" height="375" alt="How not to fix dead horizontal lines on a DMG-01"></a></p>
<p>Sometimes people ask whether horizontal lines can be fixed as well. I&#8217;ve always assumed that the connector on the right side of the screen, which would be at fault if there are dead vertical lines, is basically identical, and that the only problem with fixing horizontal lines is the more awkward position of the connection — the &#8220;ribbon&#8221; is connected on the bottom side of the LCD glass, so you need to fit the soldering iron into a small corner without damaging anything.</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/5958967513/" title="How not to fix dead horizontal lines on a DMG-01 by nitro2k01 (Gameboy Genius), on Flickr"><img class="imagebox" src="http://farm7.static.flickr.com/6130/5958967513_25b8dae083.jpg" width="500" height="375" alt="How not to fix dead horizontal lines on a DMG-01"></a></p>
<p>However, the ribbon connector on the right side is different and more fragile. If you look at the top image, you&#8217;ll see a connector that looks brown. Technically speaking, this is called a flexible PCB (printed circuit board.) Just like on a regular, rigid PCB — like the display daughterboard itself — you have copper traces for connections and a green solder mask. The black blob in the middle is an integrated circuit, not unlike the chips you would see on any other circuit board, only that this one is hidden within a blob made of epoxy, and the circuit on the chip is connected directly to the copper traces, rather than using external pins soldered to a circuit board.</p>
<p>The right side connector has a similar flexible PCB, but the last stretch of the connection is made by a flimsy white plastic material which is easily damaged by the heat from a soldering iron. The actual connectors are not made of copper but possibly carbon or some other conductive material. My advice is, do not try to fix dead horizontal lines. You&#8217;ll likely just mess up the connector as seen below.</p>
<p><a href="http://www.flickr.com/photos/gameboygenius/5958965957/" title="How not to fix dead horizontal lines on a DMG-01 by nitro2k01 (Gameboy Genius), on Flickr"><img class="imagebox" src="http://farm7.static.flickr.com/6004/5958965957_7cc7286e56.jpg" width="500" height="375" alt="How not to fix dead horizontal lines on a DMG-01"></a></p>
 <img src="http://blog.gg8.se/wordpress/wp-content/plugins/feed-statistics.php?view=1&post_id=416" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.gg8.se/wordpress/2011/07/21/why-dead-horizontal-lines-are-harder-to-fix/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

