 }
 
 //Write byte to data bus
-void cartWrite(byte data) {
+void writeDataBus(byte data) {
   digitalWrite(8, bitRead(data, 0));
   digitalWrite(9, bitRead(data, 1));
   for (int i = 2; i < 8; i++) {

  SPI.begin();
  SPI.setClockDivider(SPI_CLOCK_DIV2); //8MHz
  
  setDataBusDirection(INPUT);

  //setup cart control pins
  pinMode(snesCartPin, OUTPUT);

  }
}

//Set the data bus to output or input
// false => INPUT, true => OUTPUT 
void setDataBusDir(bool dir) {
  for (int p = 2; p <=9; p++){
    pinMode(p, dir);
  }
