|
@@ -131,8 +131,11 @@ bool scsiDiskProgramRomDrive(const char *filename, int scsi_id, int blocksize, S
|
|
|
hdr.blocksize = blocksize;
|
|
hdr.blocksize = blocksize;
|
|
|
hdr.drivetype = type;
|
|
hdr.drivetype = type;
|
|
|
|
|
|
|
|
|
|
+ memset(scsiDev.data, 0, PLATFORM_ROMDRIVE_PAGE_SIZE);
|
|
|
|
|
+ memcpy(scsiDev.data, &hdr, sizeof(hdr));
|
|
|
|
|
+
|
|
|
// Program the drive metadata header
|
|
// Program the drive metadata header
|
|
|
- if (!platform_write_romdrive((const uint8_t*)&hdr, 0, PLATFORM_ROMDRIVE_PAGE_SIZE))
|
|
|
|
|
|
|
+ if (!platform_write_romdrive(scsiDev.data, 0, PLATFORM_ROMDRIVE_PAGE_SIZE))
|
|
|
{
|
|
{
|
|
|
logmsg("---- Failed to program ROM drive header");
|
|
logmsg("---- Failed to program ROM drive header");
|
|
|
file.close();
|
|
file.close();
|
|
@@ -175,4 +178,4 @@ bool romDriveRead(uint8_t *buf, uint32_t start, uint32_t count)
|
|
|
return platform_read_romdrive(buf, start + PLATFORM_ROMDRIVE_PAGE_SIZE, count);
|
|
return platform_read_romdrive(buf, start + PLATFORM_ROMDRIVE_PAGE_SIZE, count);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif
|