   }
   buf_pos += byte_count / 4;
 
-  // Endian swap.  Is there a better way than doing this?  The ROM data on disk on the host machine
-  // is big-endian.
-  for (uint32_t pos = 0; pos < (range_end - range_start); ++pos) {
-    read_buf[pos] =
-      ((read_buf[pos] & 0xFF000000L) >> 24)
-      | ((read_buf[pos] & 0xFF0000L) >> 8)
-      | ((read_buf[pos] & 0xFF00L) << 8)
-      | ((read_buf[pos] & 0xFFL) << 24);
-  }
+  // Endian swap.  Disabled this because I think the data coming from the host may
+  // already have the correct endianness.
+
+  // for (uint32_t pos = 0; pos < (range_end - range_start); ++pos) {
+  //   read_buf[pos] =
+  //     ((read_buf[pos] & 0xFF000000L) >> 24)
+  //     | ((read_buf[pos] & 0xFF0000L) >> 8)
+  //     | ((read_buf[pos] & 0xFF00L) << 8)
+  //     | ((read_buf[pos] & 0xFFL) << 24);
+  // }
 
   return true;
 }

  }
  // leave flash accessible by host machine
  flash_unlock();
}

uint32_t chip_size() {

        chip_end = chip_size();
        Serial.print("Program whole chip.  Size = ");
        Serial.println(chip_end * 2);  // Because we actually have double this
        program_range(0, chip_end / 2);  // Program chip_end/2 words
        flash_unlock();
        reset();
        break;
