From 5451aeb39bd0951bc0abd538b2b546f21ccdcc3b Mon Sep 17 00:00:00 2001 From: optixx Date: Thu, 17 Sep 2009 19:57:25 +0200 Subject: [PATCH] make crc check optional --- avr/usbload/config.h | 2 ++ avr/usbload/main.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/avr/usbload/config.h b/avr/usbload/config.h index 0eb647e..2c9f7be 100644 --- a/avr/usbload/config.h +++ b/avr/usbload/config.h @@ -47,4 +47,6 @@ #define HW_VERSION "2.6" #define SW_VERSION "1.0" +#define DO_CRC_CHECK 1 + #endif diff --git a/avr/usbload/main.c b/avr/usbload/main.c index 73fc651..52be688 100644 --- a/avr/usbload/main.c +++ b/avr/usbload/main.c @@ -278,7 +278,7 @@ void boot_startup_rom(uint16_t init_delay) rle_decode(&_rom, ROM_BUFFER_SIZE, 0x000000); info_P(PSTR("\n")); -#if 0 +#if DO_CRC_CHECK dump_memory(0x010000 - 0x100, 0x010000); uint16_t crc; crc = crc_check_bulk_memory((uint32_t)0x000000,0x010000, 0x010000); @@ -355,6 +355,11 @@ int main(void) shared_memory_scratchpad_region_tx_restore(); shared_memory_scratchpad_region_rx_restore(); #endif + +#if DO_CRC_CHECK + info_P(PSTR("-->CRC Checkn")); + crc_check_bulk_memory(0x000000, req_addr, req_bank_size); +#endif info_P(PSTR("-->Switch TO SNES\n")); set_rom_mode();