Permalink
Browse files

Added arbitrary rom crc calc delay as a temporay workaround for probl…

…em games.
  • Loading branch information...
RedGuyyyy committed Sep 12, 2018
1 parent 158cdb4 commit d4f49ac08478ef481e61834f85fc75fbfdf87aa0
Showing with 5 additions and 2 deletions.
  1. +1 −1 src/config
  2. +4 −1 src/snes.c
View
@@ -1,4 +1,4 @@
CONFIG_VERSION="1.8.0-sa1-v07"
CONFIG_FWVER=0xFEFFFFEA
CONFIG_FWVER=0xFEFFFFE9
#CONFIG_FWVER=0x44534E53
CONFIG_MCU_FOSC=12000000
View
@@ -490,7 +490,10 @@ void status_save_from_menu() {
// The full sram location is still loaded and saved. The restricted bounds are only used to detect when to save.
void recalculate_sram_range() {
if (!sram_crc_valid && sram_valid) {
printf("calculating rom hash: ");
// insert arbitrary delay to avoid startup problem in some games
delay_ms(2000);
printf("calculating rom hash (base=%06lx, size=%ld): ", SRAM_ROM_ADDR + romprops.load_address, sram_crc_romsize);
// there is a very small chance of collision. there are several ways to avoid this:
// - incorporate (concatenate) checksum16 or other information
// - use a better hash function like sha-256

0 comments on commit d4f49ac

Please sign in to comment.