     Store(USERID+3,SWAP16(0xE12F)); delay(5);
     Store(CONFIG1, SWAP16(0xE4C9)); delay(5);
     Store(CONFIG2, SWAP16(0xFBFF)); delay(5);
+
+    // CODE
+
+    Serial.print("Trying to open ");
+    Serial.println(filename);
+    File f = SPIFFS.open(filename, "r");
+    if (!f) {
+      Serial.print("Couldn't open ");
+      Serial.println(filename);
+    }
+    while(f.available()) {
+      uint8_t d_len;
+      uint16_t d_addr;
+      uint8_t d_typ;
+      String s = f.readStringUntil('\n');
+      Serial.println(s);
+      d_len=HexDec2(s[1],s[2]);
+      d_addr=HexDec4(s[3],s[4],s[5],s[6]);
+      d_typ=HexDec2(s[7],s[8]);
+      Serial.printf("len=%02x addres=%04x type=%02x\n",d_len,d_addr,d_typ);
+      if (d_typ==0x00) {
+        for (uint8_t i=0; i<d_len*2; i+=4) {              
+          Store(d_addr/2+i/4,HexDec4(s[11+i],s[12+i],s[9+i],s[10+i]));
+        }
+      }
+    }
+    f.close();
+  
     RESET_HIGH;
     strcpy(html,"<h1>FLASH DONE</h1><a href=\"/\">Back</a>");
     server.send(200, "text/html", html);

}


File UploadFile;
String filename;
File fsUploadFile;
String webString;

//
//



void handleFileUpload() {
  if(server.uri() != "/upload") return;
  Serial.println("handleFileUpload()"); 
  HTTPUpload& upload = server.upload();
  if(upload.status == UPLOAD_FILE_START){
    filename = upload.filename;
    filename = "/payloads/"+filename;
    Serial.print("Uploading file "); 
    Serial.println(filename);
    fsUploadFile = SPIFFS.open(filename, "w");
  }
  else if(upload.status == UPLOAD_FILE_WRITE){
    if(fsUploadFile)
