   //begin spi
   SPI.begin();
   SPI.setClockDivider(SPI_CLOCK_DIV2); //8MHz
-  
+
   setDataBusDir(INPUT);
 
   //setup cart control pins


const int AddressLatchPin = 10;

const int snesCartPin = A4; //Cart pin 49 - aka /CS, /ROMSEL, /Cart - Goes low when reading ROM
const int snesReadPin = A3; //Cart pin 23 - aka /RD - Address bus read
const int snesWritePin = A2; //Cart pin 54 - aka /WR - Address bus write
const int snesResetPin = A1; //Cart pin 26 - SNES reset pin. Goes high when reading cart

typedef enum COMMANDS {
  CTRL,

        Serial.write(readDataBus());

        /* We must break out of the loop this way because of the potential case
         * where addresses 0x0000 - 0xffff (inclusive) must be used. A standard
         * loop won't work because it will overflow the 16 bit unsigned int.
         */
        if (addr == endAddr) {
