Skip to content

Commit

Permalink
Showing progress bar when reading ROM
Browse files Browse the repository at this point in the history
  • Loading branch information
splash5 committed Feb 26, 2022
1 parent 4a0cb10 commit 92bca32
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cart_Reader/WS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ void readROM_WS(char *outPathBuf, size_t bufferSize)

// get correct starting rom bank
uint16_t bank = (256 - (cartSize >> 16));
uint32_t progress = 0;

draw_progressbar(0, cartSize);

// start reading rom
for (; bank <= 0xff; bank++)
Expand All @@ -517,7 +520,10 @@ void readROM_WS(char *outPathBuf, size_t bufferSize)
* ((uint16_t*)(sdBuffer + w)) = readWord_WS(0x20000 + addr + w);

myFile.write(sdBuffer, 512);
progress += 512;
}

draw_progressbar(progress, cartSize);
}

// turn off LEDs (only for BANC33)
Expand Down

0 comments on commit 92bca32

Please sign in to comment.