Default mgb midi channel

249 views
Skip to first unread message

Jesse

unread,
Sep 15, 2009, 1:19:01 PM9/15/09
to Arduinoboy
I would like to change the default midi channel on the arduinoboy from
1 to 6 so the channels would be:

6: p1
7: p2
8: wav
9: noise

I want to run midines on the out/thru of the arduinoboy and want to
leave the midines channels on their defaults of 1-5.

I looked around in the arduinoboy code but couldn't find anything when
searching for 'channel' that pertained to this plus it would be nice
to have that info on this discussion.

Jesse

trash80

unread,
Sep 15, 2009, 2:13:01 PM9/15/09
to ardui...@googlegroups.com
this is for mGB... replace the original function... (I hope this works)

void modeMidiGb()
{
  while(1){                                //Loop foreverrrr
    if (Serial.available() > 0) {          //If MIDI is sending
      incomingMidiByte = Serial.read();    //Get the byte sent from MIDI
     
      //if(!usbMode) Serial.print(incomingMidiByte, BYTE); //Echo the Byte to MIDI Output
      if(incomingMidiByte > 0x7F) {   
        switch (incomingMidiByte & 0xF0) {
          case 0xF0:
            midiValueMode = false;
            break;
          default:
            incomingMidiData[0] = incomingMidiByte;
            midiValueMode  =false;
            midiAddressMode=true;
           break;
        }
      } else if (midiAddressMode){
        midiAddressMode = false;
        midiValueMode = true;
        incomingMidiData[1] = incomingMidiByte;
      } else if (midiValueMode) {
        incomingMidiData[2] = incomingMidiByte;
        midiAddressMode = true;
        midiValueMode = false;
       
        if((incomingMidiData[0] & 0x0F) > 0x04) {
          sendFSByteToGameboy((incomingMidiData[0] - 0x05));
          delayMicroseconds(120);
          sendFSByteToGameboy(incomingMidiData[1]);
          delayMicroseconds(120);
          sendFSByteToGameboy(incomingMidiData[2]);
        }
       blinkLight((incomingMidiData[0] - 0x05),incomingMidiData[2]);
      }
     
    } else {
      setMode();                // Check if mode button was depressed
      updateBlinkLights();

Jesse Andersen

unread,
Sep 15, 2009, 2:16:04 PM9/15/09
to ardui...@googlegroups.com
thanks! I'll try it when I have a moment.

Ove Ridé

unread,
Sep 15, 2009, 8:23:48 PM9/15/09
to ardui...@googlegroups.com
Hello Jesse. It just so happens to be that Mr 80 have given me the
opportunity to take a look at the mGB code. And I needed this feature
myself. So here it is. This rar contains 3 ROMs which each listens to
5 MIDI channels. 1-5, 6-10, 11-15. The channel numbers are printed
above each channel in this version. The fifth channel number is for
the poly mode.
<http://gameboydev.org/files/mGB/mgb_1_3_0-multichannel.rar>

For a future hacked version I'm also planning to let the user set the
channel on the Gameboy, and also make mGB better at co-existing with
LSDj. But that's for later.

2009/9/15 Jesse <goj...@gmail.com>:
--
/Ove

-----BEGIN 2ROT13 MESSAGE-----
Blog:
<http://gameboygenius.8bitcollective.com/>
SKRIVA på Lysator. Ditt Ahrvid-fria alternativ:
<http://lists.lysator.liu.se/mailman/listinfo/korkek?SKRIVA?>
Sätt på ett par flipflops, vippa på rumpan
och gör det här till en minnesvärd sommar!
-----END 2ROT13 MESSAGE-----

Ove Ridé

unread,
Sep 15, 2009, 8:25:14 PM9/15/09
to ardui...@googlegroups.com
BTW, note that this version should be used with the regular version of
Arduinoboy, not with the changes trash80 showed in a previous mail.

2009/9/16 Ove Ridé <nitr...@gmail.com>:

søren andreasen

unread,
Oct 2, 2013, 5:23:12 PM10/2/13
to ardui...@googlegroups.com
Hi,

I'm trying to hook up 2 gameboys (with mgb on each) to 1 arduinoboy, and I would reaally love to have a look at these 3 roms you speak of.
The link doesn't seem to work anymore. Do you still have them lying around perhaps?


Best,
Reply all
Reply to author
Forward
0 new messages