From b369318a32000536264fcd1d5c5c12f0b39008d4 Mon Sep 17 00:00:00 2001 From: sanni Date: Fri, 2 Feb 2018 10:52:05 +0100 Subject: [PATCH] V30I: Add option to enable/disable N64 CRC32 checking In Cart_Reader.ino line 71 change "boolean n64crc = 1" to "boolean n64crc = 0" to disable the CRC32 check when dumping roms. This is useful if you rather calculate the checksums on your much faster computer. Calculating the CRC32 is enabled by default now and can take quite some time. --- Cart_Reader/Cart_Reader.ino | 12 +++++++++--- Cart_Reader/N64.ino | 12 +++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index fdbb6f3..a9e969f 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -2,8 +2,8 @@ Cartridge Reader for Arduino Mega2560 Author: sanni - Date: 2018-01-09 - Version: V30H + Date: 2018-02-02 + Version: V30I SD lib: https://github.com/greiman/SdFat LCD lib: https://github.com/adafruit/Adafruit_SSD1306 @@ -35,7 +35,7 @@ infinest - help with GB Memory cart **********************************************************************************/ -char ver[5] = "V30H"; +char ver[5] = "V30I"; /****************************************** Define Starting Point @@ -64,6 +64,12 @@ char ver[5] = "V30H"; #define sdSpeed SPI_FULL_SPEED //#define sdSpeed SPI_HALF_SPEED +/****************************************** + Options +******************************************/ +// If set to 1 then the crc32 checksum will be calculated after reading a N64 rom +boolean n64crc = 1; + /****************************************** Libraries *****************************************/ diff --git a/Cart_Reader/N64.ino b/Cart_Reader/N64.ino index d17ee2d..bddb605 100644 --- a/Cart_Reader/N64.ino +++ b/Cart_Reader/N64.ino @@ -2082,7 +2082,7 @@ void readRom_N64() { foldern = foldern + 1; EEPROM_writeAnything(10, foldern); - //readn64rom: +readn64rom: // Open file on sd card if (!myFile.open(fileName, O_RDWR | O_CREAT)) { print_Error(F("SD Error"), true); @@ -2111,7 +2111,8 @@ void readRom_N64() { // Close the file: myFile.close(); - /*calcn64crc: + if (n64crc) { +calcn64crc: // Calculate Checksum and convert to string println_Msg(F("Calculating CRC..")); display_Update(); @@ -2125,10 +2126,6 @@ void readRom_N64() { if (searchCRC(crcStr)) { // Dump was a known good rom println_Msg(F("Checksum matches")); - println_Msg(F("")); - println_Msg(F("Press Button...")); - display_Update(); - wait(); } else { // Dump was bad or unknown @@ -2184,7 +2181,8 @@ void readRom_N64() { break; } } - display_Update();*/ + display_Update(); + } println_Msg(F("Done.")); println_Msg(F("")); println_Msg(F("Press Button..."));