mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-24 05:29:17 +01:00
Progress bar added
Progress bar added during ROM dump Few wordings edited
This commit is contained in:
parent
e02a8e49df
commit
b3653b99f6
@ -147,10 +147,10 @@ void printCartInfo_NGP() {
|
|||||||
print_Msg(F("Name: "));
|
print_Msg(F("Name: "));
|
||||||
println_Msg(romName);
|
println_Msg(romName);
|
||||||
|
|
||||||
print_Msg(F("ID: "));
|
print_Msg(F("App ID: "));
|
||||||
println_Msg(cartID);
|
println_Msg(cartID);
|
||||||
|
|
||||||
print_Msg(F("Version: "));
|
print_Msg(F("App version: "));
|
||||||
println_Msg(ngpRomVersion);
|
println_Msg(ngpRomVersion);
|
||||||
|
|
||||||
print_Msg(F("System: "));
|
print_Msg(F("System: "));
|
||||||
@ -161,7 +161,7 @@ void printCartInfo_NGP() {
|
|||||||
else
|
else
|
||||||
println_Msg(F("Unknown"));
|
println_Msg(F("Unknown"));
|
||||||
|
|
||||||
print_Msg(F("Rom Size: "));
|
print_Msg(F("ROM Size: "));
|
||||||
if (cartSize == 0) {
|
if (cartSize == 0) {
|
||||||
println_Msg(F("Unknown"));
|
println_Msg(F("Unknown"));
|
||||||
}
|
}
|
||||||
@ -226,6 +226,8 @@ void readROM_NGP(char *outPathBuf, size_t bufferSize) {
|
|||||||
|
|
||||||
// read rom
|
// read rom
|
||||||
dataIn();
|
dataIn();
|
||||||
|
uint32_t progress = 0;
|
||||||
|
draw_progressbar(0, cartSize);
|
||||||
for (uint32_t addr = 0; addr < cartSize; addr += 512) {
|
for (uint32_t addr = 0; addr < cartSize; addr += 512) {
|
||||||
// blink LED
|
// blink LED
|
||||||
if ((addr & ((1 << 14) - 1)) == 0)
|
if ((addr & ((1 << 14) - 1)) == 0)
|
||||||
@ -236,6 +238,8 @@ void readROM_NGP(char *outPathBuf, size_t bufferSize) {
|
|||||||
sdBuffer[i] = readByte_NGP(addr + i);
|
sdBuffer[i] = readByte_NGP(addr + i);
|
||||||
|
|
||||||
myFile.write(sdBuffer, 512);
|
myFile.write(sdBuffer, 512);
|
||||||
|
progress += 512;
|
||||||
|
draw_progressbar(progress, cartSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
myFile.close();
|
myFile.close();
|
||||||
@ -243,7 +247,6 @@ void readROM_NGP(char *outPathBuf, size_t bufferSize) {
|
|||||||
|
|
||||||
void scanChip_NGP() {
|
void scanChip_NGP() {
|
||||||
display_Clear();
|
display_Clear();
|
||||||
//uint32_t block_addr = 0;
|
|
||||||
uint32_t block_addr = 0;
|
uint32_t block_addr = 0;
|
||||||
|
|
||||||
// generate name of report file
|
// generate name of report file
|
||||||
@ -269,9 +272,9 @@ void scanChip_NGP() {
|
|||||||
EEPROM_writeAnything(0, foldern);
|
EEPROM_writeAnything(0, foldern);
|
||||||
|
|
||||||
// write software info to report file
|
// write software info to report file
|
||||||
myFile.println("Game: " + String(romName));
|
myFile.println("Name: " + String(romName));
|
||||||
myFile.println("ID: " + String(cartID));
|
myFile.println("App ID: " + String(cartID));
|
||||||
myFile.println("Version: " + String(ngpRomVersion));
|
myFile.println("App version: " + String(ngpRomVersion));
|
||||||
myFile.println("");
|
myFile.println("");
|
||||||
|
|
||||||
// write chip info to report file
|
// write chip info to report file
|
||||||
@ -292,7 +295,7 @@ void scanChip_NGP() {
|
|||||||
uint32_t addrMax;
|
uint32_t addrMax;
|
||||||
uint8_t sectorID = 0;
|
uint8_t sectorID = 0;
|
||||||
|
|
||||||
// skip the 2nd 16Mbits chip
|
// For 32Mbits carts, skip the 2nd 16Mbits chip
|
||||||
if (cartSize == 4194304) {
|
if (cartSize == 4194304) {
|
||||||
myFile.println("Warning: this cart is 32Mbits. Only the first 16Mbits chip will be scanned.");
|
myFile.println("Warning: this cart is 32Mbits. Only the first 16Mbits chip will be scanned.");
|
||||||
myFile.println("");
|
myFile.println("");
|
||||||
|
Loading…
Reference in New Issue
Block a user