mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-25 04:21:53 +01:00
replace 5200 and ARC cart selection code with code used in NES, COLV & INTV
This commit is contained in:
parent
06d5f28d0c
commit
9909fdafb3
@ -136,7 +136,6 @@ void a5200Menu() {
|
||||
case 0:
|
||||
// Select Cart
|
||||
setCart_5200();
|
||||
wait();
|
||||
setup_5200();
|
||||
break;
|
||||
|
||||
@ -632,258 +631,44 @@ setmapper:
|
||||
//******************************************
|
||||
// CART SELECT CODE
|
||||
//******************************************
|
||||
struct database_entry_5200 {
|
||||
byte gameMapper;
|
||||
byte gameSize;
|
||||
};
|
||||
|
||||
FsFile a5200csvFile;
|
||||
char a5200game[39]; // title
|
||||
char a5200mm[3]; // mapper
|
||||
char a5200rr[3]; // romsize
|
||||
char a5200ll[4]; // linelength (previous line)
|
||||
unsigned long a5200csvpos; // CSV File Position
|
||||
char a5200cartCSV[] = "5200.txt"; // CSV List
|
||||
char a5200csvEND[] = "EOF"; // CSV End Marker for scrolling
|
||||
void readDataLine_5200(FsFile& database, struct database_entry_5200* entry) {
|
||||
// Read mapper
|
||||
entry->gameMapper = database.read() - 48;
|
||||
|
||||
bool readLine_5200(FsFile& f, char* line, size_t maxLen) {
|
||||
for (size_t n = 0; n < maxLen; n++) {
|
||||
int c = f.read();
|
||||
if (c < 0 && n == 0) return false; // EOF
|
||||
if (c < 0 || c == '\n') {
|
||||
line[n] = 0;
|
||||
return true;
|
||||
}
|
||||
line[n] = c;
|
||||
}
|
||||
return false; // line too long
|
||||
}
|
||||
// Skip over semicolon
|
||||
database.seekCur(1);
|
||||
|
||||
bool readVals_5200(char* a5200game, char* a5200mm, char* a5200rr, char* a5200ll) {
|
||||
char line[44];
|
||||
a5200csvpos = a5200csvFile.position();
|
||||
if (!readLine_5200(a5200csvFile, line, sizeof(line))) {
|
||||
return false; // EOF or too long
|
||||
}
|
||||
char* comma = strtok(line, ",");
|
||||
int x = 0;
|
||||
while (comma != NULL) {
|
||||
if (x == 0)
|
||||
strcpy(a5200game, comma);
|
||||
else if (x == 1)
|
||||
strcpy(a5200mm, comma);
|
||||
else if (x == 2)
|
||||
strcpy(a5200rr, comma);
|
||||
else if (x == 3)
|
||||
strcpy(a5200ll, comma);
|
||||
comma = strtok(NULL, ",");
|
||||
x += 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Read rom size
|
||||
entry->gameSize = database.read() - 48;
|
||||
|
||||
bool getCartListInfo_5200() {
|
||||
bool buttonreleased = 0;
|
||||
bool cartselected = 0;
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F(" HOLD TO FAST CYCLE"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(F("HOLD BUTTON TO FAST CYCLE"));
|
||||
#endif
|
||||
delay(2000);
|
||||
#if defined(ENABLE_OLED)
|
||||
buttonVal1 = (PIND & (1 << 7)); // PD7
|
||||
#elif defined(ENABLE_LCD)
|
||||
boolean buttonVal1 = (PING & (1 << 2)); //PG2
|
||||
#endif
|
||||
if (buttonVal1 == LOW) { // Button Held - Fast Cycle
|
||||
while (1) { // Scroll Game List
|
||||
while (readVals_5200(a5200game, a5200mm, a5200rr, a5200ll)) {
|
||||
if (strcmp(a5200csvEND, a5200game) == 0) {
|
||||
a5200csvFile.seek(0); // Restart
|
||||
} else {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F("CART TITLE:"));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(a5200game);
|
||||
display_Update();
|
||||
#else
|
||||
Serial.print(F("CART TITLE:"));
|
||||
Serial.println(a5200game);
|
||||
#endif
|
||||
#if defined(ENABLE_OLED)
|
||||
buttonVal1 = (PIND & (1 << 7)); // PD7
|
||||
#elif defined(ENABLE_LCD)
|
||||
buttonVal1 = (PING & (1 << 2)); //PG2
|
||||
#endif
|
||||
if (buttonVal1 == HIGH) { // Button Released
|
||||
buttonreleased = 1;
|
||||
break;
|
||||
}
|
||||
if (buttonreleased) {
|
||||
buttonreleased = 0; // Reset Flag
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(ENABLE_OLED)
|
||||
buttonVal1 = (PIND & (1 << 7)); // PD7
|
||||
#elif defined(ENABLE_LCD)
|
||||
buttonVal1 = (PING & (1 << 2)); //PG2
|
||||
#endif
|
||||
if (buttonVal1 == HIGH) // Button Released
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display.setCursor(0, 56);
|
||||
println_Msg(F("FAST CYCLE OFF"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
Serial.println(F("FAST CYCLE OFF"));
|
||||
Serial.println(F("PRESS BUTTON TO STEP FORWARD"));
|
||||
Serial.println(F("DOUBLE CLICK TO STEP BACK"));
|
||||
Serial.println(F("HOLD TO SELECT"));
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
#endif
|
||||
while (readVals_5200(a5200game, a5200mm, a5200rr, a5200ll)) {
|
||||
if (strcmp(a5200csvEND, a5200game) == 0) {
|
||||
a5200csvFile.seek(0); // Restart
|
||||
} else {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F("CART TITLE:"));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(a5200game);
|
||||
display.setCursor(0, 48);
|
||||
#if defined(ENABLE_OLED)
|
||||
print_STR(press_to_change_STR, 1);
|
||||
print_STR(right_to_select_STR, 1);
|
||||
#elif defined(ENABLE_LCD)
|
||||
print_STR(rotate_to_change_STR, 1);
|
||||
print_STR(press_to_select_STR, 1);
|
||||
#endif
|
||||
display_Update();
|
||||
#else
|
||||
Serial.print(F("CART TITLE:"));
|
||||
Serial.println(a5200game);
|
||||
#endif
|
||||
while (1) { // Single Step
|
||||
uint8_t b = checkButton();
|
||||
if (b == 1) { // Continue (press)
|
||||
break;
|
||||
}
|
||||
if (b == 2) { // Reset to Start of List (doubleclick)
|
||||
byte prevline = strtol(a5200ll, NULL, 10);
|
||||
a5200csvpos -= prevline;
|
||||
a5200csvFile.seek(a5200csvpos);
|
||||
break;
|
||||
}
|
||||
if (b == 3) { // Long Press - Select Cart (hold)
|
||||
new5200mapper = strtol(a5200mm, NULL, 10);
|
||||
new5200size = strtol(a5200rr, NULL, 10);
|
||||
EEPROM_writeAnything(7, new5200mapper);
|
||||
EEPROM_writeAnything(8, new5200size);
|
||||
cartselected = 1; // SELECTION MADE
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
println_Msg(F("SELECTION MADE"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(F("SELECTION MADE"));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartselected) {
|
||||
cartselected = 0; // Reset Flag
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(FS(FSTRING_END_OF_FILE));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_END_OF_FILE));
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void checkCSV_5200() {
|
||||
if (getCartListInfo_5200()) {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(FS(FSTRING_CART_SELECTED));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(a5200game);
|
||||
display_Update();
|
||||
// Display Settings
|
||||
display.setCursor(0, 56);
|
||||
print_Msg(F("CODE: M"));
|
||||
print_Msg(new5200mapper);
|
||||
print_Msg(F("/R"));
|
||||
println_Msg(new5200size);
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
Serial.println(FS(FSTRING_CART_SELECTED));
|
||||
Serial.println(a5200game);
|
||||
// Display Settings
|
||||
Serial.print(F("CODE: M"));
|
||||
Serial.print(new5200mapper);
|
||||
Serial.print(F("/R"));
|
||||
Serial.println(new5200size);
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
#endif
|
||||
} else {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display.setCursor(0, 56);
|
||||
println_Msg(FS(FSTRING_NO_SELECTION));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_NO_SELECTION));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void checkSize_5200() {
|
||||
EEPROM_readAnything(7, a5200mapper);
|
||||
for (int i = 0; i < a5200mapcount; i++) {
|
||||
a5200index = i * 3;
|
||||
if (a5200mapper == pgm_read_byte(a5200mapsize + a5200index)) {
|
||||
a5200size = pgm_read_byte(a5200mapsize + a5200index + 1);
|
||||
EEPROM_writeAnything(8, a5200size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Skip rest of line
|
||||
database.seekCur(2);
|
||||
}
|
||||
|
||||
void setCart_5200() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(a5200cartCSV);
|
||||
display_Update();
|
||||
#endif
|
||||
//go to root
|
||||
sd.chdir();
|
||||
sprintf(folder, "5200/CSV");
|
||||
sd.chdir(folder); // Switch Folder
|
||||
a5200csvFile = sd.open(a5200cartCSV, O_READ);
|
||||
if (!a5200csvFile) {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F("CSV FILE NOT FOUND!"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(F("CSV FILE NOT FOUND!"));
|
||||
#endif
|
||||
while (1) {
|
||||
if (checkButton() != 0)
|
||||
setup_5200();
|
||||
|
||||
struct database_entry_5200 entry;
|
||||
|
||||
// Select starting letter
|
||||
byte myLetter = starting_letter();
|
||||
|
||||
// Open database
|
||||
if (myFile.open("5200.txt", O_READ)) {
|
||||
seek_first_letter_in_database(myFile, myLetter);
|
||||
|
||||
if(checkCartSelection(myFile, &readDataLine_5200, &entry)) {
|
||||
EEPROM_writeAnything(7, entry.gameMapper);
|
||||
EEPROM_writeAnything(8, entry.gameSize);
|
||||
}
|
||||
} else {
|
||||
print_FatalError(F("Database file not found"));
|
||||
}
|
||||
checkCSV_5200();
|
||||
a5200csvFile.close();
|
||||
}
|
||||
#endif
|
||||
|
@ -100,7 +100,6 @@ void arcMenu() {
|
||||
case 0:
|
||||
// Select Cart
|
||||
setCart_ARC();
|
||||
wait();
|
||||
setup_ARC();
|
||||
break;
|
||||
|
||||
@ -336,239 +335,33 @@ void checkStatus_ARC() {
|
||||
//******************************************
|
||||
// CART SELECT CODE
|
||||
//******************************************
|
||||
void readDataLine_ARC(FsFile& database, byte* gameSize) {
|
||||
// Read rom size
|
||||
(*gameSize) = database.read() - 48;
|
||||
|
||||
FsFile arccsvFile;
|
||||
char arcgame[20]; // title
|
||||
char arcrr[3]; // romsize
|
||||
char arcll[4]; // linelength (previous line)
|
||||
unsigned long arccsvpos; // CSV File Position
|
||||
char arccartCSV[] = "arccart.txt"; // CSV List
|
||||
char arccsvEND[] = "EOF"; // CSV End Marker for scrolling
|
||||
|
||||
bool readLine_ARC(FsFile& f, char* line, size_t maxLen) {
|
||||
for (size_t n = 0; n < maxLen; n++) {
|
||||
int c = f.read();
|
||||
if (c < 0 && n == 0) return false; // EOF
|
||||
if (c < 0 || c == '\n') {
|
||||
line[n] = 0;
|
||||
return true;
|
||||
}
|
||||
line[n] = c;
|
||||
}
|
||||
return false; // line too long
|
||||
}
|
||||
|
||||
bool readVals_ARC(char* arcgame, char* arcrr, char* arcll) {
|
||||
char line[26];
|
||||
arccsvpos = arccsvFile.position();
|
||||
if (!readLine_ARC(arccsvFile, line, sizeof(line))) {
|
||||
return false; // EOF or too long
|
||||
}
|
||||
char* comma = strtok(line, ",");
|
||||
int x = 0;
|
||||
while (comma != NULL) {
|
||||
if (x == 0)
|
||||
strcpy(arcgame, comma);
|
||||
else if (x == 1)
|
||||
strcpy(arcrr, comma);
|
||||
else if (x == 2)
|
||||
strcpy(arcll, comma);
|
||||
comma = strtok(NULL, ",");
|
||||
x += 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool getCartListInfo_ARC() {
|
||||
bool buttonreleased = 0;
|
||||
bool cartselected = 0;
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F(" HOLD TO FAST CYCLE"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(F("HOLD BUTTON TO FAST CYCLE"));
|
||||
#endif
|
||||
delay(2000);
|
||||
#if defined(ENABLE_OLED)
|
||||
buttonVal1 = (PIND & (1 << 7)); // PD7
|
||||
#elif defined(ENABLE_LCD)
|
||||
boolean buttonVal1 = (PING & (1 << 2)); //PG2
|
||||
#endif
|
||||
if (buttonVal1 == LOW) { // Button Held - Fast Cycle
|
||||
while (1) { // Scroll Game List
|
||||
while (readVals_ARC(arcgame, arcrr, arcll)) {
|
||||
if (strcmp(arccsvEND, arcgame) == 0) {
|
||||
arccsvFile.seek(0); // Restart
|
||||
} else {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F("CART TITLE:"));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(arcgame);
|
||||
display_Update();
|
||||
#else
|
||||
Serial.print(F("CART TITLE:"));
|
||||
Serial.println(arcgame);
|
||||
#endif
|
||||
#if defined(ENABLE_OLED)
|
||||
buttonVal1 = (PIND & (1 << 7)); // PD7
|
||||
#elif defined(ENABLE_LCD)
|
||||
buttonVal1 = (PING & (1 << 2)); //PG2
|
||||
#endif
|
||||
if (buttonVal1 == HIGH) { // Button Released
|
||||
buttonreleased = 1;
|
||||
break;
|
||||
}
|
||||
if (buttonreleased) {
|
||||
buttonreleased = 0; // Reset Flag
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(ENABLE_OLED)
|
||||
buttonVal1 = (PIND & (1 << 7)); // PD7
|
||||
#elif defined(ENABLE_LCD)
|
||||
buttonVal1 = (PING & (1 << 2)); //PG2
|
||||
#endif
|
||||
if (buttonVal1 == HIGH) // Button Released
|
||||
break;
|
||||
}
|
||||
}
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display.setCursor(0, 56);
|
||||
println_Msg(F("FAST CYCLE OFF"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
Serial.println(F("FAST CYCLE OFF"));
|
||||
Serial.println(F("PRESS BUTTON TO STEP FORWARD"));
|
||||
Serial.println(F("DOUBLE CLICK TO STEP BACK"));
|
||||
Serial.println(F("HOLD TO SELECT"));
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
#endif
|
||||
while (readVals_ARC(arcgame, arcrr, arcll)) {
|
||||
if (strcmp(arccsvEND, arcgame) == 0) {
|
||||
arccsvFile.seek(0); // Restart
|
||||
} else {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F("CART TITLE:"));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(arcgame);
|
||||
display.setCursor(0, 48);
|
||||
#if defined(ENABLE_OLED)
|
||||
print_STR(press_to_change_STR, 1);
|
||||
print_STR(right_to_select_STR, 1);
|
||||
#elif defined(ENABLE_LCD)
|
||||
print_STR(rotate_to_change_STR, 1);
|
||||
print_STR(press_to_select_STR, 1);
|
||||
#endif
|
||||
display_Update();
|
||||
#else
|
||||
Serial.print(F("CART TITLE:"));
|
||||
Serial.println(arcgame);
|
||||
#endif
|
||||
while (1) { // Single Step
|
||||
uint8_t b = checkButton();
|
||||
if (b == 1) { // Continue (press)
|
||||
break;
|
||||
}
|
||||
if (b == 2) { // Reset to Start of List (doubleclick)
|
||||
byte prevline = strtol(arcll, NULL, 10);
|
||||
arccsvpos -= prevline;
|
||||
arccsvFile.seek(arccsvpos);
|
||||
break;
|
||||
}
|
||||
if (b == 3) { // Long Press - Select Cart (hold)
|
||||
newarcsize = strtol(arcrr, NULL, 10);
|
||||
EEPROM_writeAnything(8, newarcsize);
|
||||
cartselected = 1; // SELECTION MADE
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
println_Msg(F("SELECTION MADE"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(F("SELECTION MADE"));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cartselected) {
|
||||
cartselected = 0; // Reset Flag
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(FS(FSTRING_END_OF_FILE));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_END_OF_FILE));
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void checkCSV_ARC() {
|
||||
if (getCartListInfo_ARC()) {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(FS(FSTRING_CART_SELECTED));
|
||||
println_Msg(FS(FSTRING_EMPTY));
|
||||
println_Msg(arcgame);
|
||||
display_Update();
|
||||
// Display Settings
|
||||
display.setCursor(0, 56);
|
||||
print_Msg(F("CODE: R"));
|
||||
println_Msg(newarcsize);
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
Serial.println(FS(FSTRING_CART_SELECTED));
|
||||
Serial.println(arcgame);
|
||||
// Display Settings
|
||||
Serial.print(F("CODE: R"));
|
||||
Serial.println(newarcsize);
|
||||
Serial.println(FS(FSTRING_EMPTY));
|
||||
#endif
|
||||
} else {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display.setCursor(0, 56);
|
||||
println_Msg(FS(FSTRING_NO_SELECTION));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(FS(FSTRING_NO_SELECTION));
|
||||
#endif
|
||||
}
|
||||
// Skip rest of line
|
||||
database.seekCur(2);
|
||||
}
|
||||
|
||||
void setCart_ARC() {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(arccartCSV);
|
||||
display_Update();
|
||||
#endif
|
||||
//go to root
|
||||
sd.chdir();
|
||||
sprintf(folder, "ARC/CSV");
|
||||
sd.chdir(folder); // Switch Folder
|
||||
arccsvFile = sd.open(arccartCSV, O_READ);
|
||||
if (!arccsvFile) {
|
||||
#if (defined(ENABLE_OLED) || defined(ENABLE_LCD))
|
||||
display_Clear();
|
||||
println_Msg(F("CSV FILE NOT FOUND!"));
|
||||
display_Update();
|
||||
#else
|
||||
Serial.println(F("CSV FILE NOT FOUND!"));
|
||||
#endif
|
||||
while (1) {
|
||||
if (checkButton() != 0)
|
||||
setup_ARC();
|
||||
}
|
||||
}
|
||||
checkCSV_ARC();
|
||||
|
||||
arccsvFile.close();
|
||||
byte gameSize;
|
||||
|
||||
// Select starting letter
|
||||
//byte myLetter = starting_letter();
|
||||
|
||||
// Open database
|
||||
if (myFile.open("arccart.txt", O_READ)) {
|
||||
// seek_first_letter_in_database(myFile, myLetter);
|
||||
|
||||
if(checkCartSelection(myFile, &readDataLine_ARC, &gameSize)) {
|
||||
EEPROM_writeAnything(8, gameSize);
|
||||
}
|
||||
} else {
|
||||
print_FatalError(F("Database file not found"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//******************************************
|
||||
|
@ -370,23 +370,18 @@ struct database_entry_COL {
|
||||
};
|
||||
|
||||
void readDataLine_COL(FsFile& database, struct database_entry_COL* entry) {
|
||||
char tempStr2[2];
|
||||
|
||||
// Read CRC32 checksum
|
||||
sprintf(checksumStr, "%c", database.read());
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
sprintf(tempStr2, "%c", database.read());
|
||||
strcat(checksumStr, tempStr2);
|
||||
for (byte i = 0; i < 8; i++) {
|
||||
checksumStr[i] = char(database.read());
|
||||
}
|
||||
|
||||
// Skip over semicolon
|
||||
database.seekCur(1);
|
||||
|
||||
// Read CRC32 of first 512 bytes
|
||||
sprintf(entry->crc_search, "%c", database.read());
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
sprintf(tempStr2, "%c", database.read());
|
||||
strcat(entry->crc_search, tempStr2);
|
||||
for (byte i = 0; i < 8; i++) {
|
||||
entry->crc_search[i] = char(database.read());
|
||||
}
|
||||
|
||||
// Skip over semicolon
|
||||
|
@ -764,23 +764,18 @@ struct database_entry_INTV {
|
||||
};
|
||||
|
||||
void readDataLine_INTV(FsFile& database, struct database_entry_INTV* entry) {
|
||||
char tempStr2[2];
|
||||
|
||||
// Read CRC32 checksum
|
||||
sprintf(checksumStr, "%c", database.read());
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
sprintf(tempStr2, "%c", database.read());
|
||||
strcat(checksumStr, tempStr2);
|
||||
for (byte i = 0; i < 8; i++) {
|
||||
checksumStr[i] = char(database.read());
|
||||
}
|
||||
|
||||
// Skip over semicolon
|
||||
database.seekCur(1);
|
||||
|
||||
// Read CRC32 of first 512 bytes
|
||||
sprintf(entry->crc_search, "%c", database.read());
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
sprintf(tempStr2, "%c", database.read());
|
||||
strcat(entry->crc_search, tempStr2);
|
||||
for (byte i = 0; i < 8; i++) {
|
||||
entry->crc_search[i] = char(database.read());
|
||||
}
|
||||
|
||||
// Skip over semicolon
|
||||
|
@ -384,23 +384,18 @@ struct database_entry_WSV {
|
||||
};
|
||||
|
||||
void readDataLine_WSV(FsFile& database, struct database_entry_WSV* entry) {
|
||||
char tempStr2[2];
|
||||
|
||||
// Read CRC32 checksum
|
||||
sprintf(checksumStr, "%c", database.read());
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
sprintf(tempStr2, "%c", database.read());
|
||||
strcat(checksumStr, tempStr2);
|
||||
for (byte i = 0; i < 8; i++) {
|
||||
checksumStr[i] = char(database.read());
|
||||
}
|
||||
|
||||
// Skip over semicolon
|
||||
database.seekCur(1);
|
||||
|
||||
// Read CRC32 of first 512 bytes
|
||||
sprintf(entry->crc_search, "%c", database.read());
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
sprintf(tempStr2, "%c", database.read());
|
||||
strcat(entry->crc_search, tempStr2);
|
||||
for (byte i = 0; i < 8; i++) {
|
||||
entry->crc_search[i] = char(database.read());
|
||||
}
|
||||
|
||||
// Skip over semicolon
|
||||
|
301
sd/5200.txt
301
sd/5200.txt
@ -1,76 +1,225 @@
|
||||
Activision Decathlon,0,2,0
|
||||
Astro Chase,1,2,28
|
||||
Atari PAM - Pete's Test,0,1,20
|
||||
Atari PAM Diagnostics,1,2,32
|
||||
Atari PAM System Test,0,1,30
|
||||
Ballblazer,0,3,30
|
||||
Beamrider,0,2,19
|
||||
BerZerk,0,2,18
|
||||
Blue Print,0,2,16
|
||||
Boogie,0,0,19
|
||||
Bounty Bob Strikes Back!,2,4,15
|
||||
Buck Rogers,1,2,33
|
||||
Centipede,1,2,20
|
||||
Choplifter!,0,2,18
|
||||
Congo Bongo,1,2,20
|
||||
Countermeasure,1,2,20
|
||||
Defender,1,2,23
|
||||
Dig Dug,1,2,17
|
||||
Dreadnaught Factor,0,1,16
|
||||
Frogger,0,1,27
|
||||
Frogger II,1,2,16
|
||||
Galaxian,0,1,19
|
||||
Gorf,0,1,17
|
||||
Gremlins,0,3,13
|
||||
Gyruss,1,2,17
|
||||
H.E.R.O.,0,2,15
|
||||
James Bond 007,1,2,17
|
||||
Joust,1,2,23
|
||||
Jungle Hunt,1,2,14
|
||||
Kaboom!,0,0,20
|
||||
Kangaroo,1,2,16
|
||||
Keystone Kapers,0,1,17
|
||||
K-Razy Shoot-Out,0,1,24
|
||||
Mario Bros.,0,3,25
|
||||
MegaMania,0,1,20
|
||||
Meteorites,0,2,18
|
||||
Miner 2049er,0,2,19
|
||||
Missile Command,0,1,21
|
||||
Montezuma's Revenge,1,2,24
|
||||
Moon Patrol,0,2,28
|
||||
Mountain King,0,1,20
|
||||
Mr. Do!'s Castle,0,1,22
|
||||
Ms. Pac-Man,1,2,25
|
||||
Pac-Man,1,2,20
|
||||
Pengo,0,3,16
|
||||
Pitfall II,0,2,14
|
||||
Pitfall!,0,1,19
|
||||
Pole Position,1,2,17
|
||||
Popeye,1,2,22
|
||||
Q-bert,0,1,15
|
||||
QIX,1,2,15
|
||||
Quest for Quintana Roo,0,2,12
|
||||
RealSports Baseball,0,3,31
|
||||
RealSports Basketball,0,3,28
|
||||
RealSports Football,1,2,30
|
||||
RealSports Soccer,1,2,28
|
||||
RealSports Tennis,1,2,26
|
||||
Rescue on Fractalus!,0,3,26
|
||||
River Raid,0,1,29
|
||||
Robotron 2084,0,2,19
|
||||
Space Dungeon,1,2,22
|
||||
Space Invaders,0,1,22
|
||||
Space Shuttle,0,2,23
|
||||
Star Raiders,1,2,22
|
||||
Star Trek,1,2,21
|
||||
Star Wars - Return of the Jedi,0,1,18
|
||||
Star Wars - The Arcade Game,1,2,39
|
||||
Super Breakout,0,0,36
|
||||
Super Cobra,0,1,23
|
||||
Vanguard,0,3,20
|
||||
Wizard of Wor,0,2,17
|
||||
Yellow Submarine,0,0,22
|
||||
Zaxxon,0,3,25
|
||||
Zenji,0,1,15
|
||||
Zone Ranger,0,2,14
|
||||
EOF,0,0,0
|
||||
Activision Decathlon
|
||||
0,2
|
||||
|
||||
Astro Chase
|
||||
1,2
|
||||
|
||||
Atari PAM - Pete's Test
|
||||
0,1
|
||||
|
||||
Atari PAM Diagnostics
|
||||
1,2
|
||||
|
||||
Atari PAM System Test
|
||||
0,1
|
||||
|
||||
Ballblazer
|
||||
0,3
|
||||
|
||||
Beamrider
|
||||
0,2
|
||||
|
||||
BerZerk
|
||||
0,2
|
||||
|
||||
Blue Print
|
||||
0,2
|
||||
|
||||
Boogie
|
||||
0,0
|
||||
|
||||
Bounty Bob Strikes Back!
|
||||
2,4
|
||||
|
||||
Buck Rogers
|
||||
1,2
|
||||
|
||||
Centipede
|
||||
1,2
|
||||
|
||||
Choplifter!
|
||||
0,2
|
||||
|
||||
Congo Bongo
|
||||
1,2
|
||||
|
||||
Countermeasure
|
||||
1,2
|
||||
|
||||
Defender
|
||||
1,2
|
||||
|
||||
Dig Dug
|
||||
1,2
|
||||
|
||||
Dreadnaught Factor
|
||||
0,1
|
||||
|
||||
Frogger
|
||||
0,1
|
||||
|
||||
Frogger II
|
||||
1,2
|
||||
|
||||
Galaxian
|
||||
0,1
|
||||
|
||||
Gorf
|
||||
0,1
|
||||
|
||||
Gremlins
|
||||
0,3
|
||||
|
||||
Gyruss
|
||||
1,2
|
||||
|
||||
H.E.R.O.
|
||||
0,2
|
||||
|
||||
James Bond 007
|
||||
1,2
|
||||
|
||||
Joust
|
||||
1,2
|
||||
|
||||
Jungle Hunt
|
||||
1,2
|
||||
|
||||
Kaboom!
|
||||
0,0
|
||||
|
||||
Kangaroo
|
||||
1,2
|
||||
|
||||
Keystone Kapers
|
||||
0,1
|
||||
|
||||
K-Razy Shoot-Out
|
||||
0,1
|
||||
|
||||
Mario Bros.
|
||||
0,3
|
||||
|
||||
MegaMania
|
||||
0,1
|
||||
|
||||
Meteorites
|
||||
0,2
|
||||
|
||||
Miner 2049er
|
||||
0,2
|
||||
|
||||
Missile Command
|
||||
0,1
|
||||
|
||||
Montezuma's Revenge
|
||||
1,2
|
||||
|
||||
Moon Patrol
|
||||
0,2
|
||||
|
||||
Mountain King
|
||||
0,1
|
||||
|
||||
Mr. Do!'s Castle
|
||||
0,1
|
||||
|
||||
Ms. Pac-Man
|
||||
1,2
|
||||
|
||||
Pac-Man
|
||||
1,2
|
||||
|
||||
Pengo
|
||||
0,3
|
||||
|
||||
Pitfall II
|
||||
0,2
|
||||
|
||||
Pitfall!
|
||||
0,1
|
||||
|
||||
Pole Position
|
||||
1,2
|
||||
|
||||
Popeye
|
||||
1,2
|
||||
|
||||
Q-bert
|
||||
0,1
|
||||
|
||||
QIX
|
||||
1,2
|
||||
|
||||
Quest for Quintana Roo
|
||||
0,2
|
||||
|
||||
RealSports Baseball
|
||||
0,3
|
||||
|
||||
RealSports Basketball
|
||||
0,3
|
||||
|
||||
RealSports Football
|
||||
1,2
|
||||
|
||||
RealSports Soccer
|
||||
1,2
|
||||
|
||||
RealSports Tennis
|
||||
1,2
|
||||
|
||||
Rescue on Fractalus!
|
||||
0,3
|
||||
|
||||
River Raid
|
||||
0,1
|
||||
|
||||
Robotron 2084
|
||||
0,2
|
||||
|
||||
Space Dungeon
|
||||
1,2
|
||||
|
||||
Space Invaders
|
||||
0,1
|
||||
|
||||
Space Shuttle
|
||||
0,2
|
||||
|
||||
Star Raiders
|
||||
1,2
|
||||
|
||||
Star Trek
|
||||
1,2
|
||||
|
||||
Star Wars - Return of the Jedi
|
||||
0,1
|
||||
|
||||
Star Wars - The Arcade Game
|
||||
1,2
|
||||
|
||||
Super Breakout
|
||||
0,0
|
||||
|
||||
Super Cobra
|
||||
0,1
|
||||
|
||||
Vanguard
|
||||
0,3
|
||||
|
||||
Wizard of Wor
|
||||
0,2
|
||||
|
||||
Yellow Submarine
|
||||
0,0
|
||||
|
||||
Zaxxon
|
||||
0,3
|
||||
|
||||
Zenji
|
||||
0,1
|
||||
|
||||
Zone Ranger
|
||||
0,2
|
||||
|
||||
|
193
sd/arccart.txt
193
sd/arccart.txt
@ -1,49 +1,144 @@
|
||||
3D Bowling,1,0
|
||||
3D Soccer,3,16
|
||||
Alien Invaders,1,16
|
||||
American Football,2,21
|
||||
Astro Invader,3,24
|
||||
Autorace,3,20
|
||||
Baseball,1,15
|
||||
Basketball,1,15
|
||||
Blackjack and Poker,1,17
|
||||
Boxing,1,26
|
||||
Brain Quiz,1,13
|
||||
Breakaway,1,17
|
||||
Capture,0,16
|
||||
Cat Trax,1,14
|
||||
Circus,1,15
|
||||
Combat,3,13
|
||||
Crazy Climber,1,13
|
||||
Crazy Gobbler,0,20
|
||||
Escape,1,20
|
||||
Funky Fish,3,13
|
||||
Golf,3,17
|
||||
Grand Slam Tennis,3,11
|
||||
Hobo,3,24
|
||||
Horse Racing,1,11
|
||||
Jump Bug,3,19
|
||||
Jungler,3,15
|
||||
Missile War,1,14
|
||||
Monaco Grand Prix,1,18
|
||||
Nibblemen,1,24
|
||||
Ocean Battle,1,16
|
||||
Parashooter,1,19
|
||||
Pleiades,3,18
|
||||
R2D Tank,1,15
|
||||
Red Clash,3,15
|
||||
Robot Killer,1,16
|
||||
Route 16,3,19
|
||||
Soccer,3,15
|
||||
Space Attack,1,13
|
||||
Space Mission,1,19
|
||||
Space Raiders,1,20
|
||||
Space Squadron,1,20
|
||||
Space Vultures,2,21
|
||||
Spiders,3,21
|
||||
Star Chess,1,14
|
||||
Super Gobbler,1,17
|
||||
Tanks a Lot,1,20
|
||||
The End,1,18
|
||||
Turtles,3,14
|
||||
EOF,0,0
|
||||
3D Bowling
|
||||
1
|
||||
|
||||
3D Soccer
|
||||
3
|
||||
|
||||
Alien Invaders
|
||||
1
|
||||
|
||||
American Football
|
||||
2
|
||||
|
||||
Astro Invader
|
||||
3
|
||||
|
||||
Autorace
|
||||
3
|
||||
|
||||
Baseball
|
||||
1
|
||||
|
||||
Basketball
|
||||
1
|
||||
|
||||
Blackjack and Poker
|
||||
1
|
||||
|
||||
Boxing
|
||||
1
|
||||
|
||||
Brain Quiz
|
||||
1
|
||||
|
||||
Breakaway
|
||||
1
|
||||
|
||||
Capture
|
||||
0
|
||||
|
||||
Cat Trax
|
||||
1
|
||||
|
||||
Circus
|
||||
1
|
||||
|
||||
Combat
|
||||
3
|
||||
|
||||
Crazy Climber
|
||||
1
|
||||
|
||||
Crazy Gobbler
|
||||
0
|
||||
|
||||
Escape
|
||||
1
|
||||
|
||||
Funky Fish
|
||||
3
|
||||
|
||||
Golf
|
||||
3
|
||||
|
||||
Grand Slam Tennis
|
||||
3
|
||||
|
||||
Hobo
|
||||
3
|
||||
|
||||
Horse Racing
|
||||
1
|
||||
|
||||
Jump Bug
|
||||
3
|
||||
|
||||
Jungler
|
||||
3
|
||||
|
||||
Missile War
|
||||
1
|
||||
|
||||
Monaco Grand Prix
|
||||
1
|
||||
|
||||
Nibblemen
|
||||
1
|
||||
|
||||
Ocean Battle
|
||||
1
|
||||
|
||||
Parashooter
|
||||
1
|
||||
|
||||
Pleiades
|
||||
3
|
||||
|
||||
R2D Tank
|
||||
1
|
||||
|
||||
Red Clash
|
||||
3
|
||||
|
||||
Robot Killer
|
||||
1
|
||||
|
||||
Route 16
|
||||
3
|
||||
|
||||
Soccer
|
||||
3
|
||||
|
||||
Space Attack
|
||||
1
|
||||
|
||||
Space Mission
|
||||
1
|
||||
|
||||
Space Raiders
|
||||
1
|
||||
|
||||
Space Squadron
|
||||
1
|
||||
|
||||
Space Vultures
|
||||
2
|
||||
|
||||
Spiders
|
||||
3
|
||||
|
||||
Star Chess
|
||||
1
|
||||
|
||||
Super Gobbler
|
||||
1
|
||||
|
||||
Tanks a Lot
|
||||
1
|
||||
|
||||
The End
|
||||
1
|
||||
|
||||
Turtles
|
||||
3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user