   digitalWrite(WR,HIGH);
   shiftout(address,data);
   digitalWrite(WR,LOW);
-  //delay(5);
   digitalWrite(WR,HIGH);
 }
 
 void shiftout(unsigned int address, byte data) {
-  
   byte lowbyte = address & 0xff;
   byte highbyte = address >> 8;
-  
+
   digitalWrite(LATCH,LOW);
   shiftOut(DATA,CLOCK,MSBFIRST,data);
   shiftOut(DATA,CLOCK,MSBFIRST,highbyte);

#define DATA  5    //SER

#define WR    2
#define OEDATA    A0  //_G DATA BUS
#define OEADDRESS A1  //_G ADDRESS BUS

#define OEVCBUS 6



 disableVCBus();
 enableSRAM();

 Serial.begin(9600);
 delay(100);

 Serial.println("writing data");
 enableSRAM();
 for (int i=0;i<ROMSIZE;i++) {
    write2RAM(i,pgm_read_byte(romImage+i));
 }
 disableSRAM();

 Serial.println("done");
 Serial.println("enable bus to VC4000");
 enableVCBus();
}

void loop() {
  digitalWrite(LED,HIGH);
  delay(300);
  digitalWrite(LED,LOW);
  delay(300);
}

void enableSRAM() {
