mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-13 08:25:05 +01:00
V3.7: Add MX26L6420
thanks to Ice Man for testing
This commit is contained in:
parent
b250fffbc4
commit
f79c169782
@ -2,8 +2,8 @@
|
|||||||
Cartridge Reader for Arduino Mega2560
|
Cartridge Reader for Arduino Mega2560
|
||||||
|
|
||||||
Author: sanni
|
Author: sanni
|
||||||
Date: 05-09-2019
|
Date: 07-09-2019
|
||||||
Version: 3.6
|
Version: 3.7
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
||||||
@ -41,7 +41,7 @@
|
|||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
#include <SdFat.h>
|
#include <SdFat.h>
|
||||||
|
|
||||||
char ver[5] = "3.6";
|
char ver[5] = "3.7";
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Options
|
Options
|
||||||
@ -60,9 +60,6 @@ char ver[5] = "3.6";
|
|||||||
// Enable the second button
|
// Enable the second button
|
||||||
#define enable_Button2
|
#define enable_Button2
|
||||||
|
|
||||||
// Enable old 16-bit flash adapter menu
|
|
||||||
//#define enable_flash16
|
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Libraries
|
Libraries
|
||||||
*****************************************/
|
*****************************************/
|
||||||
|
@ -20,8 +20,8 @@ boolean hiROM = 1;
|
|||||||
*****************************************/
|
*****************************************/
|
||||||
// Flash start menu
|
// Flash start menu
|
||||||
static const char flashMenuItem1[] PROGMEM = "8bit Flash adapter";
|
static const char flashMenuItem1[] PROGMEM = "8bit Flash adapter";
|
||||||
static const char flashMenuItem2[] PROGMEM = "Eprom adapter(beta)";
|
static const char flashMenuItem2[] PROGMEM = "Eprom adapter";
|
||||||
static const char flashMenuItem3[] PROGMEM = "16bit Flash adapter";
|
static const char flashMenuItem3[] PROGMEM = "MX26L6420 adapter";
|
||||||
static const char* const menuOptionsFlash[] PROGMEM = {flashMenuItem1, flashMenuItem2, flashMenuItem3};
|
static const char* const menuOptionsFlash[] PROGMEM = {flashMenuItem1, flashMenuItem2, flashMenuItem3};
|
||||||
|
|
||||||
// 8bit Flash menu items
|
// 8bit Flash menu items
|
||||||
@ -57,13 +57,8 @@ void flashMenu() {
|
|||||||
// create menu with title and 3 options to choose from
|
// create menu with title and 3 options to choose from
|
||||||
unsigned char flashSlot;
|
unsigned char flashSlot;
|
||||||
// Copy menuOptions out of progmem
|
// Copy menuOptions out of progmem
|
||||||
#ifdef enable_flash16
|
|
||||||
convertPgm(menuOptionsFlash, 3);
|
convertPgm(menuOptionsFlash, 3);
|
||||||
flashSlot = question_box(F("Select adapter PCB"), menuOptions, 3, 0);
|
flashSlot = question_box(F("Select adapter PCB"), menuOptions, 3, 0);
|
||||||
#else
|
|
||||||
convertPgm(menuOptionsFlash, 2);
|
|
||||||
flashSlot = question_box(F("Select adapter PCB"), menuOptions, 2, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// wait for user choice to come back from the question box menu
|
// wait for user choice to come back from the question box menu
|
||||||
switch (flashSlot)
|
switch (flashSlot)
|
||||||
@ -280,7 +275,7 @@ void flashromMenu16() {
|
|||||||
if (strcmp(flashid, "C2F3") == 0) {
|
if (strcmp(flashid, "C2F3") == 0) {
|
||||||
writeFlash16_29F1601();
|
writeFlash16_29F1601();
|
||||||
}
|
}
|
||||||
else if ((strcmp(flashid, "C2C4") == 0) || (strcmp(flashid, "C249") == 0) || (strcmp(flashid, "C2A7") == 0) || (strcmp(flashid, "C2A8") == 0) || (strcmp(flashid, "C2C9") == 0) || (strcmp(flashid, "C2CB") == 0)) {
|
else if ((strcmp(flashid, "C2C4") == 0) || (strcmp(flashid, "C249") == 0) || (strcmp(flashid, "C2A7") == 0) || (strcmp(flashid, "C2A8") == 0) || (strcmp(flashid, "C2C9") == 0) || (strcmp(flashid, "C2CB") == 0) || (strcmp(flashid, "C2FC") == 0)) {
|
||||||
writeFlash16_29LV640();
|
writeFlash16_29LV640();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -559,6 +554,12 @@ void id_Flash16() {
|
|||||||
flashSize = 8388608;
|
flashSize = 8388608;
|
||||||
flashromType = 2;
|
flashromType = 2;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(flashid, "C2FC") == 0) {
|
||||||
|
println_Msg(F("MX26L6420 detected"));
|
||||||
|
println_Msg(F("ATTENTION 3.3V"));
|
||||||
|
flashSize = 8388608;
|
||||||
|
flashromType = 2;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
print_Error(F("Unknown flashrom"), true);
|
print_Error(F("Unknown flashrom"), true);
|
||||||
println_Msg(" ");
|
println_Msg(" ");
|
||||||
|
BIN
extras/pcb/26L6420_adapter.png
Normal file
BIN
extras/pcb/26L6420_adapter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
extras/pcb/26l6420_adapter.zip
Normal file
BIN
extras/pcb/26l6420_adapter.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user