From 326d37cebd88942d54d30fb400d0ee63119c7f19 Mon Sep 17 00:00:00 2001 From: sanni Date: Fri, 12 May 2017 16:08:55 +0200 Subject: [PATCH] V24B: Use game code for SNES titles with all japanese name --- Cart_Reader/Cart_Reader.ino | 6 +++--- Cart_Reader/SNES.ino | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 5dab67e..e3d6a4b 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: 2017-05-08 - Version: V24 + Date: 2017-05-12 + Version: V24B SD lib: https://github.com/greiman/SdFat LCD lib: https://github.com/adafruit/Adafruit_SSD1306 @@ -34,7 +34,7 @@ YamaArashi - GBA flashrom bank switch command **********************************************************************************/ -char ver[5] = "V24"; +char ver[5] = "V24B"; /****************************************** Define Output diff --git a/Cart_Reader/SNES.ino b/Cart_Reader/SNES.ino index 23c4767..0684b59 100644 --- a/Cart_Reader/SNES.ino +++ b/Cart_Reader/SNES.ino @@ -570,6 +570,18 @@ boolean checkcart_SNES() { myLength++; } } + // If name consists out of all japanese characters use game code + if (myLength == 0) { + // Get rom code + romName[0] = 'S'; + romName[1] = 'H'; + romName[2] = 'V'; + romName[3] = 'C'; + romName[4] = '-'; + for (unsigned int i = 0; i < 4; i++) { + romName[i + 5] = readBank_SNES(0, 0xFFB2 + i); + } + } // Read sramSizeExp byte sramSizeExp;