Skip to content

Commit

Permalink
Release 0.8.7 from Google Code.
Browse files Browse the repository at this point in the history
  • Loading branch information
trash80 committed Jul 26, 2015
1 parent 5b60926 commit 72f9310
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
17 changes: 15 additions & 2 deletions Arduinoboy/Arduinoboy.ino
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
/***************************************************************************
* A R D U I N O B O Y *
***************************************************************************
* __ _ __ *
* ____ __________/ /_ __(_)___ ____ / /_ ____ __ __ *
* / __ `/ ___/ __ / / / / / __ \/ __ \/ __ \/ __ \/ / / / *
* / /_/ / / / /_/ / /_/ / / / / / /_/ / /_/ / /_/ / /_/ / *
* \__,_/_/ \__,_/\__,_/_/_/ /_/\____/_.___/\____/\__, / *
* /____/ *
* *
* Version: 0.8.6 *
***************************************************************************
***************************************************************************
* *
* Version: 0.8.7 *
* Date: March 07 2008 *
* Name: Timothy Lamb *
* Email: [email protected] *
* *
***************************************************************************
***************************************************************************
* *
* Notes: *
* Pins have changed from the original diagram, expect build *
* instructions to follow here soon: *
Expand Down Expand Up @@ -107,6 +119,7 @@ boolean statusLedBlink =false;
int countLSDJTicks = 0; //for loop int (we need to cycle 8 pulses)
int countSyncTime = 0;
int countSyncSteps = 0;
int countSyncPulse = 0;
int countGbClockTicks =0;
int countClockPause =0;
int countIncommingMidiByte =0;
Expand Down
12 changes: 6 additions & 6 deletions Arduinoboy/Mode.ino
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,30 @@ void switchMode()

void sequencerStart()
{
digitalWrite(pinLeds[3], HIGH);
digitalWrite(pinStatusLed, LOW);
sequencerStarted = true;
countSyncPulse = 0;
countSyncTime = 0;
}

void sequencerStop()
{
digitalWrite(pinLeds[3], LOW);
digitalWrite(pinStatusLed, HIGH);
midiSyncEffectsTime = false;
sequencerStarted = false;
countSyncPulse = 0;
countSyncTime = 0;
}

void updateStatusLed()
{
if(statusLedIsOn) {
countStatusLedOn++;
if(countStatusLedOn > 5000) {
if(countStatusLedOn > 3000) {
countStatusLedOn = 0;
digitalWrite(pinStatusLed,LOW);
statusLedIsOn = false;
} else if (statusLedBlink && countStatusLedOn == 1) {
digitalWrite(pinStatusLed,LOW);
} else if (statusLedBlink && countStatusLedOn > 2000) {
} else if (statusLedBlink && countStatusLedOn > 1000) {
statusLedBlink = false;
digitalWrite(pinStatusLed,HIGH);
}
Expand Down
5 changes: 1 addition & 4 deletions Arduinoboy/Mode_LSDJ_Keyboard.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

void modeLSDJKeyboardSetup()
{
pinMode(pinGBClock,OUTPUT);
addGameboyByte(0);
for(int rst=0;rst<5;rst++) addGameboyByte(keyboardOctDn);
for(int rst=0;rst<41;rst++) addGameboyByte(keyboardInsDn);
Expand Down Expand Up @@ -44,11 +45,7 @@ void modeLSDJKeyboard()
incomingMidiData[0] = incomingMidiByte - 48;
break;
default:
midiNoteOnMode = false;
midiProgramChange = false;
incomingMidiData[1] = false;
break;

}
} else if(midiNoteOnMode) {
if(!incomingMidiData[1]) {
Expand Down
6 changes: 5 additions & 1 deletion Arduinoboy/Mode_LSDJ_MasterSync.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ void modeLSDJMasterSyncSetup()
void modeLSDJMasterSync()
{
while(1){
setMode();
readgbClockLine = digitalRead(pinGBClock); //Read gameboy's clock line
if(readgbClockLine) {
while(readgbClockLine) {
Expand All @@ -32,6 +31,7 @@ void modeLSDJMasterSync()
readgbClockLine = digitalRead(pinGBClock);
setMode();
}
updateStatusLed();
countClockPause = 0;
countGbClockTicks++;
if(countGbClockTicks == 8) {
Expand All @@ -41,11 +41,15 @@ void modeLSDJMasterSync()
sequencerStart();
}
Serial.print(0xF8, BYTE);
if(!countSyncPulse) statusLedOn();
countSyncPulse++;
countSyncPulse = countSyncPulse % 24;
}
}
if (Serial.available() > 0) {
incomingMidiByte = Serial.read();
Serial.print(incomingMidiByte, BYTE);
}
setMode();
}
}
8 changes: 7 additions & 1 deletion Arduinoboy/Mode_LSDJ_SlaveSync.ino
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ void modeLSDJSlaveSyncSetup()
void modeLSDJSlaveSync()
{
while(1){
setMode();
if (Serial.available() > 0) {
incomingMidiByte = Serial.read();
Serial.print(incomingMidiByte, BYTE);
Expand All @@ -36,6 +35,9 @@ void modeLSDJSlaveSync()
countSyncTime++;
countSyncTime = countSyncTime % countSyncSteps;
}
if(!countSyncPulse) statusLedOn();
countSyncPulse++;
countSyncPulse = countSyncPulse % 24;
break;
case 0xFA: // Transport Start Message
case 0xFB: // Transport Continue Message
Expand All @@ -61,6 +63,10 @@ void modeLSDJSlaveSync()
}
}
setMode();
updateStatusLed();
} else {
setMode();
updateStatusLed();
}

}
Expand Down

0 comments on commit 72f9310

Please sign in to comment.