From 57b5ee3b286c791c5db98a377e918aa110eff7cd Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Sun, 4 Dec 2011 11:16:18 +0000 Subject: [PATCH] minor debugging. no whatsnew. --- src/lib/formats/dsk_dsk.c | 7 +++++++ src/mame/machine/md_cart.c | 2 ++ 2 files changed, 9 insertions(+) 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];