This commit is contained in:
Lesserkuma 2023-04-14 20:15:02 +02:00
parent c475e722c4
commit be37fcf1d6
6 changed files with 5 additions and 8 deletions

BIN
.github/01.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -1075,7 +1075,7 @@ class FlashGBX_CLI():
if self.CONN.GetMode() == "AGB":
print("Using Save Type “{:s}”.".format(Util.AGB_Header_Save_Types[save_type]))
elif self.CONN.GetMode() == "DMG":
if rtc and header["mapper_raw"] in (0x10, 0xFE): # RTC of MBC3, HuC-3
if rtc and header["mapper_raw"] in (0x10, 0x110, 0xFE): # RTC of MBC3, HuC-3
print("Real Time Clock register values will also be written if applicable/possible.")
try:

View File

@ -1411,7 +1411,7 @@ class FlashGBX_GUI(QtWidgets.QWidget):
rtc = False
if self.CONN.INFO["has_rtc"]:
if self.CONN.GetMode() == "DMG" and mbc == 0x10 and not self.CONN.IsClkConnected():
if self.CONN.GetMode() == "DMG" and mbc in (0x10, 0x110) and not self.CONN.IsClkConnected():
rtc = False
else:
msg = "A Real Time Clock cartridge was detected. Do you want the cartridges Real Time Clock register values also to be saved?"
@ -1546,9 +1546,9 @@ class FlashGBX_GUI(QtWidgets.QWidget):
rtc = False
rtc_advance = False
if not test and self.CONN.INFO["has_rtc"]:
if self.CONN.GetMode() == "DMG" and mbc == 0x10 and not self.CONN.IsClkConnected():
if self.CONN.GetMode() == "DMG" and mbc in (0x10, 0x110) and not self.CONN.IsClkConnected():
rtc = False
elif (self.CONN.GetMode() == "DMG" and ((mbc == 0xFD and (filesize == save_size + 0x28 or erase)) or (mbc == 0xFE and (filesize == save_size + 0xC or erase)) or (self.CONN.IsClkConnected() and mbc == 0x10 and filesize == save_size + 0x30 or erase))) or \
elif (self.CONN.GetMode() == "DMG" and ((mbc == 0xFD and (filesize == save_size + 0x28 or erase)) or (mbc == 0xFE and (filesize == save_size + 0xC or erase)) or (self.CONN.IsClkConnected() and mbc in (0x10, 0x110) and filesize == save_size + 0x30 or erase))) or \
(self.CONN.GetMode() == "AGB" and (filesize == save_size + 0x10 or erase)):
msg = "A Real Time Clock cartridge was detected. Do you want the Real Time Clock register values to be also written?"
cb = QtWidgets.QCheckBox("&Adjust RTC", checked=True)

View File

@ -267,9 +267,6 @@ class DMG_MBC3(DMG_MBC):
def HasRTC(self):
dprint("Checking for RTC")
if self.MBC_ID != 16:
dprint("No RTC because wrong MBC ID", self.MBC_ID)
return False
self.EnableRAM(enable=False)
self.EnableRAM(enable=True)
self.LatchRTC()

View File

@ -9,7 +9,7 @@ from enum import Enum
APPNAME = "FlashGBX"
VERSION_PEP440 = "3.25"
VERSION = "v{:s}".format(VERSION_PEP440)
VERSION_TIMESTAMP = 1681494424
VERSION_TIMESTAMP = 1681495829
DEBUG = False
DEBUG_LOG = []
APP_PATH = ""

Binary file not shown.