- offset=(offset<<2)+4;
- uint16 *data16=(uint16*)&boot_track_data[offset];
- cdi_load_address=*data16++; cdi_load_address<<=16; cdi_load_address|=*data16++;
- cdi_code_length=*data16++; cdi_code_length<<=16; cdi_code_length|=*data16++;
- fprintf(log_get(),"cdi: load address: 0x%.8x\n",cdi_load_address);
- fprintf(log_get(),"cdi: length: 0x%.8x\n",cdi_code_length);
- fprintf(log_get(),"cdi: byte swapping boot code\n");
-
- for (uint32 i=0;i<(cdi_code_length>>1);i++)
+
+ offset = (offset << 2) + 4;
+ uint16 * data16 = (uint16 *)&boot_track_data[offset];
+ cdi_load_address = *data16++;
+ cdi_load_address <<= 16;
+ cdi_load_address |= *data16++;
+ cdi_code_length = *data16++;
+ cdi_code_length <<= 16;
+ cdi_code_length |= *data16++;
+ fprintf(log_get(), "CDI: Load address: %08X\n", cdi_load_address);
+ fprintf(log_get(), "CDI: Length: %08X\n", cdi_code_length);
+//No need for byte swapping any more...
+/* fprintf(log_get(), "cdi: byte swapping boot code\n");
+
+ for(uint32 i=0; i<(cdi_code_length >> 1); i++)