aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsanni <[email protected]>2023-01-16 09:18:07 +0100
committerGitHub <[email protected]>2023-01-16 09:18:07 +0100
commitd6a4be2348f69d906e323dedc2ba55d38a46ce45 (patch)
tree6bba0f997af21d921d362a639ec1e1a0f96143b3
parent978fc80287975ac10bf4901aba91284499348b55 (diff)
parentf471a7e3945330f9445344c6bae3f35b693359c1 (diff)
downloadcartreader-d6a4be2348f69d906e323dedc2ba55d38a46ce45.tar.gz
cartreader-d6a4be2348f69d906e323dedc2ba55d38a46ce45.zip
Merge pull request #684 from PsyK0p4T/master
Add progress bar
-rw-r--r--Cart_Reader/VBOY.ino10
1 files changed, 8 insertions, 2 deletions
diff --git a/Cart_Reader/VBOY.ino b/Cart_Reader/VBOY.ino
index 44d9926..e81f006 100644
--- a/Cart_Reader/VBOY.ino
+++ b/Cart_Reader/VBOY.ino
@@ -326,7 +326,6 @@ void getCartInfo_VB() {
case 0x5245: // RE = Red Alarm
case 0x4833: // H3 = Vertical Force
case 0x5642: // VB = Virtual Bowling
- case 0x5646: // VF = Virtual Fishing
case 0x4A56: // JV = Virtual Lab
case 0x5650: // VP = Virtual League Baseball/Virtual Pro Yakyuu '95
cartSize = 0x100000; // 1MB
@@ -336,6 +335,7 @@ void getCartInfo_VB() {
case 0x4750: // GP = Galactic Pinball
case 0x5344: // SD = SD Gundam Dimension War
case 0x5442: // TB = Teleroboxer
+ case 0x5646: // VF = Virtual Fishing
cartSize = 0x100000; // 1MB
sramSize = 0x2000; // 8KB
break;
@@ -434,6 +434,8 @@ void readROM_VB() {
}
word d = 0;
+ uint32_t progress = 0;
+ draw_progressbar(0, cartSize);
// HYPER FIGHTING FIX
// VIRTUAL BOY ADDRESSING IS TOP DOWN
// ONLY FOR HYPER FIGHTING PLUGIN WITH ALL ADDRESS LINES CONNECTED
@@ -450,6 +452,8 @@ void readROM_VB() {
}
myFile.write(sdBuffer, 512);
d = 0;
+ progress += 512;
+ draw_progressbar(progress, cartSize);
}
} else {
for (unsigned long currBuffer = 0; currBuffer < cartSize / 2; currBuffer += 256) {
@@ -462,6 +466,8 @@ void readROM_VB() {
}
myFile.write(sdBuffer, 512);
d = 0;
+ progress += 512;
+ draw_progressbar(progress, cartSize);
}
}
myFile.close();
@@ -563,4 +569,4 @@ unsigned long verifySRAM_VB() {
#endif
//******************************************
// End of File
-//****************************************** \ No newline at end of file
+//******************************************