mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-15 01:15:06 +01:00
commit
e108d8d63d
@ -460,7 +460,7 @@ uint32_t calculateCRC(char* fileName, char* folder, unsigned long offset) {
|
|||||||
/******************************************
|
/******************************************
|
||||||
CRC Functions for Atari, Fairchild, Ody2, Arc, etc. modules
|
CRC Functions for Atari, Fairchild, Ody2, Arc, etc. modules
|
||||||
*****************************************/
|
*****************************************/
|
||||||
#if (defined(ENABLE_ODY2) || defined(ENABLE_ARC) || defined(ENABLE_FAIRCHILD) || defined(ENABLE_MSX) || defined(ENABLE_POKE) || defined(ENABLE_2600) || defined(ENABLE_7800) || defined(ENABLE_C64) || defined(ENABLE_VECTREX) || defined(ENABLE_NES) || defined(ENABLE_LYNX) || defined(ENABLE_ATARI8) || defined(ENABLE_BALLY) || defined(ENABLE_LEAP) || defined(ENABLE_LJ) || defined(ENABLE_LJPRO) || defined(ENABLE_PV1000) || defined(ENABLE_PYUUTA) || defined(ENABLE_RCA) || defined(ENABLE_TI99) || defined(ENABLE_TRS80) || defined(ENABLE_VIC20) || defined(ENABLE_VSMILE))
|
#if (defined(ENABLE_ODY2) || defined(ENABLE_ARC) || defined(ENABLE_FAIRCHILD) || defined(ENABLE_MSX) || defined(ENABLE_POKE) || defined(ENABLE_2600) || defined(ENABLE_7800) || defined(ENABLE_C64) || defined(ENABLE_VECTREX) || defined(ENABLE_NES) || defined(ENABLE_LYNX) || defined(ENABLE_ATARI8) || defined(ENABLE_BALLY) || defined(ENABLE_LEAP) || defined(ENABLE_LJ) || defined(ENABLE_LJPRO) || defined(ENABLE_PV1000) || defined(ENABLE_PYUUTA) || defined(ENABLE_RCA) || defined(ENABLE_TI99) || defined(ENABLE_TRS80) || defined(ENABLE_VIC20) || defined(ENABLE_VSMILE) || defined(ENABLE_CPS3))
|
||||||
|
|
||||||
void printCRC(char* checkFile, uint32_t* crcCopy, unsigned long offset) {
|
void printCRC(char* checkFile, uint32_t* crcCopy, unsigned long offset) {
|
||||||
uint32_t crc = calculateCRC(checkFile, folder, offset);
|
uint32_t crc = calculateCRC(checkFile, folder, offset);
|
||||||
@ -1122,8 +1122,9 @@ constexpr char modeItem38[] PROGMEM = "Tomy Pyuuta";
|
|||||||
constexpr char modeItem39[] PROGMEM = "TRS-80";
|
constexpr char modeItem39[] PROGMEM = "TRS-80";
|
||||||
constexpr char modeItem40[] PROGMEM = "Vtech V.Smile (3V)";
|
constexpr char modeItem40[] PROGMEM = "Vtech V.Smile (3V)";
|
||||||
constexpr char modeItem41[] PROGMEM = "Flashrom Programmer";
|
constexpr char modeItem41[] PROGMEM = "Flashrom Programmer";
|
||||||
constexpr char modeItem42[] PROGMEM = "Self Test (3V)";
|
constexpr char modeItem42[] PROGMEM = "CP System III";
|
||||||
constexpr char modeItem43[] PROGMEM = "About";
|
constexpr char modeItem43[] PROGMEM = "Self Test (3V)";
|
||||||
|
constexpr char modeItem44[] PROGMEM = "About";
|
||||||
|
|
||||||
static const char* const modeOptions[] PROGMEM = {
|
static const char* const modeOptions[] PROGMEM = {
|
||||||
#ifdef ENABLE_GBX
|
#ifdef ENABLE_GBX
|
||||||
@ -1249,10 +1250,13 @@ static const char* const modeOptions[] PROGMEM = {
|
|||||||
#ifdef ENABLE_FLASH8
|
#ifdef ENABLE_FLASH8
|
||||||
modeItem41,
|
modeItem41,
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_SELFTEST
|
#ifdef ENABLE_CPS3
|
||||||
modeItem42,
|
modeItem42,
|
||||||
#endif
|
#endif
|
||||||
modeItem43, FSTRING_RESET
|
#ifdef ENABLE_SELFTEST
|
||||||
|
modeItem43,
|
||||||
|
#endif
|
||||||
|
modeItem44, FSTRING_RESET
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1570,6 +1574,11 @@ void mainMenu() {
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_CPS3
|
||||||
|
case SYSTEM_MENU_CPS3:
|
||||||
|
return cpsMenu();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_SELFTEST
|
#ifdef ENABLE_SELFTEST
|
||||||
case SYSTEM_MENU_SELFTEST:
|
case SYSTEM_MENU_SELFTEST:
|
||||||
return selfTest();
|
return selfTest();
|
||||||
@ -3832,6 +3841,11 @@ void loop() {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_VSMILE
|
#ifdef ENABLE_VSMILE
|
||||||
case CORE_VSMILE: return vsmileMenu();
|
case CORE_VSMILE: return vsmileMenu();
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_CPS3
|
||||||
|
case CORE_CPS3_CART: return flashromCPS_Cartridge();
|
||||||
|
case CORE_CPS3_128SIMM: return flashromCPS_SIMM2x8();
|
||||||
|
case CORE_CPS3_64SIMM: return flashromCPS_SIMM4x8();
|
||||||
#endif
|
#endif
|
||||||
case CORE_MAX: return resetArduino();
|
case CORE_MAX: return resetArduino();
|
||||||
}
|
}
|
||||||
|
@ -390,6 +390,13 @@
|
|||||||
|
|
||||||
/****/
|
/****/
|
||||||
|
|
||||||
|
/* [ CP System III ------------------------------------------------ ]
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ENABLE_CPS3
|
||||||
|
|
||||||
|
/****/
|
||||||
|
|
||||||
/*==== FIRMWARE OPTIONS ===========================================*/
|
/*==== FIRMWARE OPTIONS ===========================================*/
|
||||||
|
|
||||||
/* [ Config File -------------------------------------------------- ]
|
/* [ Config File -------------------------------------------------- ]
|
||||||
|
@ -16,6 +16,7 @@ unsigned long blank;
|
|||||||
unsigned long sectorSize;
|
unsigned long sectorSize;
|
||||||
uint16_t bufferSize;
|
uint16_t bufferSize;
|
||||||
byte mapping = 0;
|
byte mapping = 0;
|
||||||
|
boolean byteCtrl = 0;
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Menu
|
Menu
|
||||||
@ -238,7 +239,7 @@ void flashromMenu8() {
|
|||||||
writeFlash29LV640();
|
writeFlash29LV640();
|
||||||
else if (flashid == 0x017E)
|
else if (flashid == 0x017E)
|
||||||
writeFlash29GL(sectorSize, bufferSize);
|
writeFlash29GL(sectorSize, bufferSize);
|
||||||
else if ((flashid == 0x0458) || (flashid == 0x0158) || (flashid == 0x01AB))
|
else if ((flashid == 0x0458) || (flashid == 0x0158) || (flashid == 0x01AB) || (flashid == 0x0422) || (flashid == 0x0423))
|
||||||
writeFlash29F800();
|
writeFlash29F800();
|
||||||
else if (flashid == 0x0) // Manual flash config, pick most common type
|
else if (flashid == 0x0) // Manual flash config, pick most common type
|
||||||
writeFlash29LV640();
|
writeFlash29LV640();
|
||||||
@ -576,7 +577,7 @@ idtheflash:
|
|||||||
flashSize = 2097152;
|
flashSize = 2097152;
|
||||||
flashromType = 1;
|
flashromType = 1;
|
||||||
} else if (flashid == 0x04AD) {
|
} else if (flashid == 0x04AD) {
|
||||||
println_Msg(F("AM29F016D detected"));
|
println_Msg(F("MBM29F016A detected"));
|
||||||
flashSize = 2097152;
|
flashSize = 2097152;
|
||||||
flashromType = 1;
|
flashromType = 1;
|
||||||
} else if (flashid == 0x04D4) {
|
} else if (flashid == 0x04D4) {
|
||||||
@ -595,6 +596,14 @@ idtheflash:
|
|||||||
println_Msg(F("AM29F400AB detected"));
|
println_Msg(F("AM29F400AB detected"));
|
||||||
flashSize = 131072 * 4;
|
flashSize = 131072 * 4;
|
||||||
flashromType = 2;
|
flashromType = 2;
|
||||||
|
} else if (flashid == 0x0423) {
|
||||||
|
println_Msg(F("MBM29F400TC detected"));
|
||||||
|
flashSize = 131072 * 4;
|
||||||
|
flashromType = 2;
|
||||||
|
} else if (flashid == 0x0422) {
|
||||||
|
println_Msg(F("MBM29F400BC detected"));
|
||||||
|
flashSize = 131072 * 4;
|
||||||
|
flashromType = 2;
|
||||||
} else if (flashid == 0x0158) {
|
} else if (flashid == 0x0158) {
|
||||||
println_Msg(F("AM29F800BB detected"));
|
println_Msg(F("AM29F800BB detected"));
|
||||||
flashSize = 1048576;
|
flashSize = 1048576;
|
||||||
@ -1207,8 +1216,13 @@ byte readByte_Flash(unsigned long myAddress) {
|
|||||||
"nop\n\t"
|
"nop\n\t"
|
||||||
"nop\n\t");
|
"nop\n\t");
|
||||||
|
|
||||||
|
if (byteCtrl) {
|
||||||
|
// Setting OE(PH1) LOW
|
||||||
|
PORTH &= ~(1 << 1);
|
||||||
|
} else {
|
||||||
// Setting OE(PH1) OE_SNS(PH3) LOW
|
// Setting OE(PH1) OE_SNS(PH3) LOW
|
||||||
PORTH &= ~((1 << 1) | (1 << 3));
|
PORTH &= ~((1 << 1) | (1 << 3));
|
||||||
|
}
|
||||||
|
|
||||||
__asm__("nop\n\t"
|
__asm__("nop\n\t"
|
||||||
"nop\n\t"
|
"nop\n\t"
|
||||||
@ -1220,8 +1234,13 @@ byte readByte_Flash(unsigned long myAddress) {
|
|||||||
// Read
|
// Read
|
||||||
byte tempByte = PINC;
|
byte tempByte = PINC;
|
||||||
|
|
||||||
|
if (byteCtrl) {
|
||||||
|
// Setting OE(PH1) HIGH
|
||||||
|
PORTH |= (1 << 1);
|
||||||
|
} else {
|
||||||
// Setting OE(PH1) OE_SNS(PH3) HIGH
|
// Setting OE(PH1) OE_SNS(PH3) HIGH
|
||||||
PORTH |= (1 << 1) | (1 << 3);
|
PORTH |= (1 << 1) | (1 << 3);
|
||||||
|
}
|
||||||
__asm__("nop\n\t"
|
__asm__("nop\n\t"
|
||||||
"nop\n\t"
|
"nop\n\t"
|
||||||
"nop\n\t"
|
"nop\n\t"
|
||||||
@ -1507,8 +1526,13 @@ int busyCheck29F032(uint32_t addr, byte c) {
|
|||||||
// Set data pins to input
|
// Set data pins to input
|
||||||
dataIn8();
|
dataIn8();
|
||||||
|
|
||||||
|
if (byteCtrl) {
|
||||||
|
// Setting OE(PH1) CE(PH6)LOW
|
||||||
|
PORTH &= ~((1 << 1) | (1 << 6));
|
||||||
|
} else {
|
||||||
// Setting OE(PH1) OE_SNS(PH3) CE(PH6)LOW
|
// Setting OE(PH1) OE_SNS(PH3) CE(PH6)LOW
|
||||||
PORTH &= ~((1 << 1) | (1 << 3) | (1 << 6));
|
PORTH &= ~((1 << 1) | (1 << 3) | (1 << 6));
|
||||||
|
}
|
||||||
// Setting WE(PH4) WE_SNES(PH5) HIGH
|
// Setting WE(PH4) WE_SNES(PH5) HIGH
|
||||||
PORTH |= (1 << 4) | (1 << 5);
|
PORTH |= (1 << 4) | (1 << 5);
|
||||||
|
|
||||||
@ -1537,8 +1561,13 @@ int busyCheck29F032(uint32_t addr, byte c) {
|
|||||||
// Set data pins to output
|
// Set data pins to output
|
||||||
dataOut();
|
dataOut();
|
||||||
|
|
||||||
|
if (byteCtrl) {
|
||||||
|
// Setting OE(PH1) HIGH
|
||||||
|
PORTH |= (1 << 1);
|
||||||
|
} else {
|
||||||
// Setting OE(PH1) OE_SNS(PH3) HIGH
|
// Setting OE(PH1) OE_SNS(PH3) HIGH
|
||||||
PORTH |= (1 << 1) | (1 << 3);
|
PORTH |= (1 << 1) | (1 << 3);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/******************************************
|
/******************************************
|
||||||
@ -2425,11 +2454,11 @@ void printFlash16(int numBytes) {
|
|||||||
byte right_byte = (currWord >> 8) & 0xFF;
|
byte right_byte = (currWord >> 8) & 0xFF;
|
||||||
|
|
||||||
|
|
||||||
sprintf(buf, "%.2x", left_byte);
|
sprintf(buf, "%.2X", left_byte);
|
||||||
// Now print the significant bits
|
// Now print the significant bits
|
||||||
print_Msg(buf);
|
print_Msg(buf);
|
||||||
|
|
||||||
sprintf(buf, "%.2x", right_byte);
|
sprintf(buf, "%.2X", right_byte);
|
||||||
// Now print the significant bits
|
// Now print the significant bits
|
||||||
print_Msg(buf);
|
print_Msg(buf);
|
||||||
}
|
}
|
||||||
|
1630
Cart_Reader/FLASH_CPS3.ino
Normal file
1630
Cart_Reader/FLASH_CPS3.ino
Normal file
File diff suppressed because it is too large
Load Diff
@ -268,6 +268,13 @@ enum CORES: uint8_t {
|
|||||||
# endif
|
# endif
|
||||||
# ifdef ENABLE_VSMILE
|
# ifdef ENABLE_VSMILE
|
||||||
CORE_VSMILE,
|
CORE_VSMILE,
|
||||||
|
# endif
|
||||||
|
# ifdef ENABLE_CPS3
|
||||||
|
CORE_CPS3_CART,
|
||||||
|
CORE_CPS3_64SIMM,
|
||||||
|
CORE_CPS3_128SIMM,
|
||||||
|
CORE_CPS3_512SIMM,
|
||||||
|
CORE_CPS3_01SIMM,
|
||||||
# endif
|
# endif
|
||||||
CORE_MAX // Always last
|
CORE_MAX // Always last
|
||||||
};
|
};
|
||||||
@ -396,6 +403,9 @@ enum SYSTEM_MENU: uint8_t {
|
|||||||
# if defined(ENABLE_FLASH8)
|
# if defined(ENABLE_FLASH8)
|
||||||
SYSTEM_MENU_FLASH,
|
SYSTEM_MENU_FLASH,
|
||||||
# endif
|
# endif
|
||||||
|
# if defined(ENABLE_CPS3)
|
||||||
|
SYSTEM_MENU_CPS3,
|
||||||
|
# endif
|
||||||
# if defined(ENABLE_SELFTEST)
|
# if defined(ENABLE_SELFTEST)
|
||||||
SYSTEM_MENU_SELFTEST,
|
SYSTEM_MENU_SELFTEST,
|
||||||
# endif
|
# endif
|
||||||
|
92
sd/cps3.txt
Normal file
92
sd/cps3.txt
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
Warzard (Japan).u2
|
||||||
|
F8E2F0C6,1FEDB,868584838281808F,0000,0000,0,0000
|
||||||
|
|
||||||
|
Red Earth (Europe).u2
|
||||||
|
02E0F336,1FEDB,868584838281808F,0000,0000,0,0000
|
||||||
|
|
||||||
|
Red Earth (Asia, NO CD).u2
|
||||||
|
7A4F0851,00000,868584838281808F,0000,0000,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (Japan).u2
|
||||||
|
74205250,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (Asia).u2
|
||||||
|
CBD28DE7,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (Europe).u2
|
||||||
|
27699DDC,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (USA).u2
|
||||||
|
FB172A8E,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (Hispanic).u2
|
||||||
|
D2B3CD48,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (Asia, NO CD, Set 1).u2
|
||||||
|
CA2B715F,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III New Generation (Asia, NO CD, Set 2).u2
|
||||||
|
73E32463,1FECB,B4B7B6B1B0B3B2BD,1FECC,D2D3,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 2nd Impact Giant Attack (Japan).u2
|
||||||
|
FAEA0A3E,1FECB,A9AAABACADAEAFA0,1FECC,BCBD,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 2nd Impact Giant Attack (USA)
|
||||||
|
75DD72E0,1FECB,A9AAABACADAEAFA0,1FECC,BCBD,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 2nd Impact Giant Attack (Hispanic).u2
|
||||||
|
5C799526,1FECB,A9AAABACADAEAFA0,1FECC,BCBD,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 2nd Impact Giant Attack (Asia, NO CD).u2
|
||||||
|
FD297C0D,1FECB,A9AAABACADAEAFA0,1FECC,BCBD,0,0000
|
||||||
|
|
||||||
|
JoJo no Kimyou na Bouken (Japan).u2
|
||||||
|
02778F60,1FECB,0C0F0E09080B0A05,1FECC,B4B5,0,0000
|
||||||
|
|
||||||
|
JoJo's Venture (Asia).u2
|
||||||
|
789AA72A,1FECB,0C0F0E09080B0A05,1FECC,B4B5,0,0000
|
||||||
|
|
||||||
|
JoJo's Venture (Asia, NO CD).u2
|
||||||
|
05B4F953,1FECB,0C0F0E09080B0A05,1FECC,B4B5,0,0000
|
||||||
|
|
||||||
|
JoJo's Venture (Europe).u2
|
||||||
|
513E40EC,1FECB,0C0F0E09080B0A05,1FECC,B4B5,0,0000
|
||||||
|
|
||||||
|
JoJo's Venture (USA).u2
|
||||||
|
8D40F7BE,1FECB,0C0F0E09080B0A05,1FECC,B4B5,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 3rd Strike Fight for the Future (Japan).u2
|
||||||
|
63F23D1F,1FECB,6063626564676669,1FECC,3031,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 3rd Strike Fight for the Future (Japan, NO CD).u2
|
||||||
|
1EDC6366,1FECB,6063626564676669,1FECC,3031,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 3rd Strike Fight for the Future (Europe).u2
|
||||||
|
30BBF293,1FECB,6063626564676669,1FECC,3031,0,0000
|
||||||
|
|
||||||
|
Street Fighter III 3rd Strike Fight for the Future (USA).u2
|
||||||
|
ECC545C1,1FECB,6063626564676669,1FECC,3031,0,0000
|
||||||
|
|
||||||
|
JoJo no Kimyou na Bouken Mirai e no Isan (Japan).u2
|
||||||
|
3085478C,1FECB,2B28292E2F2C2D22,1FECC,6B6A,0,0000
|
||||||
|
|
||||||
|
JoJo no Kimyou na Bouken Mirai e no Isan (Japan, NO CD).u2
|
||||||
|
4DAB19F5,1FECB,2B28292E2F2C2D22,1FECC,6B6A,0,0000
|
||||||
|
|
||||||
|
JoJo's Bizarre Adventure (Europe).u2
|
||||||
|
63CC8800,1FECB,2B28292E2F2C2D22,1FECC,6B6A,0,0000
|
||||||
|
|
||||||
|
JoJo's Bizarre Adventure (Europe, NO CD).u2
|
||||||
|
1EE2D679,1FECB,2B28292E2F2C2D22,1FECC,6B6A,0,0000
|
||||||
|
|
||||||
|
UltraBIOS for custom SH2 AUTOSELECT v1.0 CD.u2
|
||||||
|
4D938388,20733,B1B2B3B4B5B6B7B8,1FECC,BCBD,1,1FC5
|
||||||
|
|
||||||
|
UltraBIOS for custom SH2 AUTOSELECT v1.0 NOCD.u2
|
||||||
|
30BDDDF1,20733,B1B2B3B4B5B6B7B8,1FECC,BCBD,1,1FC5
|
||||||
|
|
||||||
|
UltraBIOS for standard SH2 AUTOSELECT v1.0 CD.u2
|
||||||
|
89DD398B,20733,0102030405060708,1FECC,0001,1,3089
|
||||||
|
|
||||||
|
UltraBIOS for standard SH2 AUTOSELECT v1.0 CD.u2
|
||||||
|
F4F367F2,20733,0102030405060708,1FECC,0001,1,3089
|
Loading…
Reference in New Issue
Block a user