summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Fabio Priuli <etabeta78@users.noreply.github.com>2011-12-04 11:16:18 +0000
committer Fabio Priuli <etabeta78@users.noreply.github.com>2011-12-04 11:16:18 +0000
commit57b5ee3b286c791c5db98a377e918aa110eff7cd (patch)
treeb32a83a9d97d931bde3211f40c081b6126f0ce2e
parenta4a7c23c333f09cf4a7e39a58867bd61dee84456 (diff)
minor debugging. no whatsnew.
-rw-r--r--src/lib/formats/dsk_dsk.c7
-rw-r--r--src/mame/machine/md_cart.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/formats/dsk_dsk.c b/src/lib/formats/dsk_dsk.c
index 4cfad58c5c7..764937c92dc 100644
--- a/src/lib/formats/dsk_dsk.c
+++ b/src/lib/formats/dsk_dsk.c
@@ -211,6 +211,13 @@ FLOPPY_CONSTRUCT( dsk_dsk_construct )
}
floppy_image_read(floppy, header, 0, 0x100);
+#ifdef SPOT_DUPLICATES
+ // this allow to spot .dsk files with same data and different headers, making easier to debug softlists.
+ UINT32 temp_size = floppy_image_size(floppy);
+ UINT8 tmp_copy[temp_size - 0x100];
+ floppy_image_read(floppy,tmp_copy,0x100,temp_size - 0x100);
+ printf("CRC16: %d\n", ccitt_crc16(0xffff, tmp_copy, temp_size - 0x100));
+#endif
tag = (struct dskdsk_tag *) floppy_create_tag(floppy, sizeof(struct dskdsk_tag));
if (!tag)
diff --git a/src/mame/machine/md_cart.c b/src/mame/machine/md_cart.c
index 3655fde0485..1deeb97a5a2 100644
--- a/src/mame/machine/md_cart.c
+++ b/src/mame/machine/md_cart.c
@@ -1558,6 +1558,7 @@ static int megadrive_load_nonlist(device_image_interface &image)
/* is this a SMD file? */
if (genesis_is_SMD(&rawROM[0x2200], (unsigned)length))
{
+// printf("SMD!\n");
tmpROMnew = ROM;
tmpROM = ROM + 0x2000 + 512;
@@ -1589,6 +1590,7 @@ static int megadrive_load_nonlist(device_image_interface &image)
else if ((rawROM[0x2080] == 'E') && (rawROM[0x2081] == 'A') &&
(rawROM[0x2082] == 'M' || rawROM[0x2082] == 'G'))
{
+// printf("MD!\n");
tmpROMnew = global_alloc_array(unsigned char, length);
secondhalf = &tmpROMnew[length >> 1];