From 03bd177b5fbf18b07fb2f44df0221fd765e4cc95 Mon Sep 17 00:00:00 2001 From: timothy lamb Date: Sun, 26 Jul 2015 15:33:40 -0700 Subject: [PATCH] Release 1.0.3 from Google Code. --- Arduinoboy/Arduinoboy.ino | 6 +++--- Arduinoboy/Mode_MidiGb.ino | 27 ++++++++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Arduinoboy/Arduinoboy.ino b/Arduinoboy/Arduinoboy.ino index d7e7b09..322691a 100644 --- a/Arduinoboy/Arduinoboy.ino +++ b/Arduinoboy/Arduinoboy.ino @@ -10,8 +10,8 @@ *************************************************************************** *************************************************************************** * * - * Version: 1.0.2 * - * Date: Oct 12 2008 * + * Version: 1.0.3 * + * Date: Oct 22 2008 * * Name: Timothy Lamb * * Email: trash80@gmail.com * * * @@ -89,7 +89,7 @@ boolean usbMode = false; //to use usb for serial communication as oppose to MI int gameboyBitPauseLOW = 5; //Bit pause for gbmidi mode .... 1 to 10 /// tested working value: 5=GBA/SP/DMG01 --- int gameboyBitPauseHIGH = 1; //Bit pause for gbmidi mode .... 1 to 10 /// tested working value: 1=GBA/SP/DMG01 --- (note: roughly 4 microseconds off from Low do to code that writes to the serial line) -int gameboyBytePause= 10; //Byte pause for gbmidi mode .... 5 to 20 /// tested working value: 5=GBA/SP/GBC and 10=DMG +int gameboyBytePause= 20; //Byte pause for gbmidi mode .... 5 to 20 /// tested working value: 5=GBA/SP/GBC and 10=DMG /*************************************************************************** * Lets Assign our Arduino Pins ..... diff --git a/Arduinoboy/Mode_MidiGb.ino b/Arduinoboy/Mode_MidiGb.ino index 67c7169..769420f 100644 --- a/Arduinoboy/Mode_MidiGb.ino +++ b/Arduinoboy/Mode_MidiGb.ino @@ -34,9 +34,16 @@ void modeMidiGb() break; default: incomingMidiData[0] = incomingMidiByte; - midiValueMode = false; - midiAddressMode = true; - break; + midiNoteOffMode=true; + midiValueMode =false; + midiAddressMode=true; + if(incomingMidiData[0] < 0x90) { + incomingMidiData[0]+=0x10; + midiNoteOffMode =true; + } else { + midiNoteOffMode =false; + } + break; } } else if (midiAddressMode){ midiAddressMode = false; @@ -46,15 +53,17 @@ void modeMidiGb() incomingMidiData[2] = incomingMidiByte; midiAddressMode = true; midiValueMode = false; - addFSGameboyByte(incomingMidiData[0]); - addFSGameboyByte(incomingMidiData[1]); - addFSGameboyByte(incomingMidiData[2]); - blinkLight(incomingMidiData[0],incomingMidiData[2]); + if(midiNoteOffMode) incomingMidiData[2]=0x00; + addFSGameboyByte(incomingMidiData[0]); + addFSGameboyByte(incomingMidiData[1]); + addFSGameboyByte(incomingMidiData[2]); + blinkLight(incomingMidiData[0],incomingMidiData[2]); } + } else { + setMode(); // Check if mode button was depressed + updateBlinkLights(); } updateFSGameboyByteFrame(); // Send out Bytes to LSDJ - updateBlinkLights(); - setMode(); // Check if mode button was depressed } }