mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-23 13:09:17 +01:00
Add progressbar to SMS
This commit is contained in:
parent
dccc99c0ad
commit
c9a9e5872e
@ -410,7 +410,6 @@ void mdCartMenu() {
|
||||
resetArduino();
|
||||
break;
|
||||
}
|
||||
println_Msg(F(""));
|
||||
println_Msg(F("Press Button..."));
|
||||
display_Update();
|
||||
wait();
|
||||
@ -1294,10 +1293,13 @@ void readROM_MD() {
|
||||
//println_Msg(F("s"));
|
||||
//display_Update();
|
||||
|
||||
println_Msg(F("Calculating checksum..."));
|
||||
display_Update();
|
||||
|
||||
// Calculate and compare CRC32 with no-intro
|
||||
compareCRC("md.txt");
|
||||
|
||||
// print Checksum
|
||||
// Calculate internal checksum
|
||||
if (chksum == calcCKS) {
|
||||
println_Msg(F("Internal checksum OK"));
|
||||
display_Update();
|
||||
|
@ -557,6 +557,11 @@ void readROM_SMS() {
|
||||
bankSize = cartSize;
|
||||
}
|
||||
|
||||
//Initialize progress bar
|
||||
uint32_t processedProgressBar = 0;
|
||||
uint32_t totalProgressBar = (uint32_t)(cartSize);
|
||||
draw_progressbar(0, totalProgressBar);
|
||||
|
||||
for (byte currBank = 0x0; currBank < (cartSize / bankSize); currBank++) {
|
||||
// Write current 16KB bank to slot 2 register 0xFFFF
|
||||
if (!raphnet_mode_sg1000) {
|
||||
@ -588,6 +593,10 @@ void readROM_SMS() {
|
||||
// }
|
||||
myFile.write(sdBuffer, 512);
|
||||
}
|
||||
|
||||
// update progress bar
|
||||
processedProgressBar += bankSize;
|
||||
draw_progressbar(processedProgressBar, totalProgressBar);
|
||||
}
|
||||
// Close the file:
|
||||
myFile.close();
|
||||
|
Loading…
Reference in New Issue
Block a user