Skip to content

Commit

Permalink
3.35
Browse files Browse the repository at this point in the history
  • Loading branch information
lesserkuma committed Nov 25, 2023
1 parent c12b1de commit 7c09455
Show file tree
Hide file tree
Showing 14 changed files with 318 additions and 39 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Release notes
### v3.35 (released 2023-11-25)
- Added support for DRV with 29LV320DB and ALTERA CPLD *(thanks TheNFCookie)*
- Added support for HC007-BGA-V2 with M29W640 *(thanks LucentW)*
- Added support for reading and writing the save data of some GBA multigame bootleg cartridges
- Updated the Game Boy and Game Boy Advance lookup databases for save types, ROM sizes and checksums

### v3.34 (released 2023-09-26)
- Minor bug fixes and improvements

Expand Down
4 changes: 2 additions & 2 deletions FlashGBX/FlashGBX_CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def run(self):

args = self.ARGS["argparsed"]
config_path = Util.formatPathOS(Util.CONFIG_PATH)
print("Configuration directory: {:s}\n".format(config_path))
print("Configuration folder: {:s}\n".format(config_path))

# Ask interactively if no args set
if args.action is None:
Expand Down Expand Up @@ -961,7 +961,7 @@ def FlashROM(self, args, header):
if answer != "n":
fix_bootlogo = bootlogo
else:
Util.dprint("Couldn’t find boot logo file in configuration directory.")
Util.dprint("Couldn’t find boot logo file in configuration folder.")

if not hdr["header_checksum_correct"] and (self.CONN.GetMode() == "AGB" or (self.CONN.GetMode() == "DMG" and mbc not in (0x203, 0x205))):
print("{:s}WARNING: The ROM file you selected will not boot on actual hardware due to an invalid header checksum (expected 0x{:02X} instead of 0x{:02X}).{:s}".format(ANSI.YELLOW, hdr["header_checksum_calc"], hdr["header_checksum"], ANSI.RESET))
Expand Down
22 changes: 11 additions & 11 deletions FlashGBX/FlashGBX_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def __init__(self, args):
self.mnuConfig.addSeparator()
self.mnuConfig.addAction("Re-&enable suppressed messages", self.ReEnableMessages)
self.mnuConfig.addSeparator()
self.mnuConfig.addAction("Show &configuration directory", self.OpenPath)
self.mnuConfig.addAction("Open &config folder", self.OpenPath)
self.mnuConfig.actions()[0].setCheckable(True)
self.mnuConfig.actions()[1].setCheckable(True)
self.mnuConfig.actions()[2].setCheckable(True)
Expand Down Expand Up @@ -604,7 +604,9 @@ def ReEnableMessages(self):
def OpenPath(self, path=None):
if path is None:
path = Util.CONFIG_PATH
self.WriteDebugLogOnShiftKey()
kbmod = QtWidgets.QApplication.keyboardModifiers()
if kbmod != QtCore.Qt.ShiftModifier:
self.WriteDebugLog()
path = 'file://{0:s}'.format(path)
try:
if platform.system() == "Windows":
Expand All @@ -615,11 +617,6 @@ def OpenPath(self, path=None):
subprocess.Popen(["xdg-open", path])
except:
QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "The path is:\n{:s}".format(path), QtWidgets.QMessageBox.Ok)

def WriteDebugLogOnShiftKey(self, event=None):
kbmod = QtWidgets.QApplication.keyboardModifiers()
if kbmod == QtCore.Qt.ShiftModifier:
self.WriteDebugLog()

def WriteDebugLog(self, event=None):
try:
Expand Down Expand Up @@ -910,7 +907,7 @@ def FinishOperation(self):
else:
button_dump_report = msgbox.addButton(" Generate Dump &Report ", QtWidgets.QMessageBox.ActionRole)

button_open_dir = msgbox.addButton(" Open &Directory ", QtWidgets.QMessageBox.ActionRole)
button_open_dir = msgbox.addButton(" Open Fol&der ", QtWidgets.QMessageBox.ActionRole)

if self.CONN.GetMode() == "DMG":
if self.CONN.INFO["rom_checksum"] == self.CONN.INFO["rom_checksum_calc"]:
Expand Down Expand Up @@ -1025,7 +1022,7 @@ def FinishOperation(self):
return

if "last_path" in self.CONN.INFO:
button_open_dir = msgbox.addButton(" Open &Directory ", QtWidgets.QMessageBox.ActionRole)
button_open_dir = msgbox.addButton(" Open Fol&der ", QtWidgets.QMessageBox.ActionRole)
msgbox.setText("The save data backup is complete!" + msg_te)
msgbox.exec()
if "last_path" in self.CONN.INFO and msgbox.clickedButton() == button_open_dir:
Expand Down Expand Up @@ -1368,7 +1365,7 @@ def FlashROM(self, dpath=""):
elif msgbox.clickedButton() == button_2:
pass
else:
Util.dprint("Couldn’t find boot logo file in configuration directory.")
Util.dprint("Couldn’t find boot logo file in configuration folder.")
msgbox = QtWidgets.QMessageBox(parent=self, icon=QtWidgets.QMessageBox.Warning, windowTitle="{:s} {:s}".format(APPNAME, VERSION), text=msg_text)
msgbox.setStandardButtons(QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel)
msgbox.setDefaultButton(QtWidgets.QMessageBox.Cancel)
Expand Down Expand Up @@ -1431,6 +1428,7 @@ def BackupRAM(self):
path = Util.GenerateFileName(mode=self.CONN.GetMode(), header=self.CONN.INFO, settings=self.SETTINGS)
path = os.path.splitext(path)[0]
path += "{:s}.sav".format(path_datetime)
cart_type = 0
if self.CONN.GetMode() == "DMG":
setting_name = "LastDirSaveDataDMG"
last_dir = self.SETTINGS.value(setting_name)
Expand All @@ -1440,6 +1438,7 @@ def BackupRAM(self):
if save_type == 0:
QtWidgets.QMessageBox.critical(self, "{:s} {:s}".format(APPNAME, VERSION), "No save type was selected.", QtWidgets.QMessageBox.Ok)
return
cart_type = self.cmbDMGCartridgeTypeResult.currentIndex()
#save_size = Util.DMG_Header_RAM_Sizes_Flasher_Map[Util.DMG_Header_RAM_Sizes_Map.index(save_type)]

elif self.CONN.GetMode() == "AGB":
Expand All @@ -1451,6 +1450,7 @@ def BackupRAM(self):
if save_type == 0:
QtWidgets.QMessageBox.warning(self, "{:s} {:s}".format(APPNAME, VERSION), "No save type was selected.", QtWidgets.QMessageBox.Ok)
return
cart_type = self.cmbAGBCartridgeTypeResult.currentIndex()
#save_size = Util.AGB_Header_Save_Sizes[save_type]
else:
return
Expand Down Expand Up @@ -1515,7 +1515,7 @@ def BackupRAM(self):
args.update(bl_args)
self.CONN.BackupROM(fncSetProgress=self.PROGRESS.SetProgress, args=args)
else:
args = { "path":path, "mbc":mbc, "save_type":save_type, "rtc":rtc, "verify_read":verify_read }
args = { "path":path, "mbc":mbc, "save_type":save_type, "rtc":rtc, "verify_read":verify_read, "cart_type":cart_type }
self.CONN.BackupRAM(fncSetProgress=self.PROGRESS.SetProgress, args=args)

self.grpStatus.setTitle("Transfer Status")
Expand Down
15 changes: 3 additions & 12 deletions FlashGBX/RomFileAGB.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@ def GetHeader(self, unchanged=False):
data["save_type"] = None
data["save_size"] = 0

# 3D Memory (GBA Video 64 MB)
data["3d_memory"] = False
# if (data["game_title"] == "DISNEYVOL002" and data["game_code"] == "MDSE" and data["header_checksum"] == 0x58) or \
# (data["game_title"] == "SHARKS TALE" and data["game_code"] == "MSAE" and data["header_checksum"] == 0x98) or \
# (data["game_title"] == "SHARKS TALE" and data["game_code"] == "MSAE" and data["header_checksum"] == 0x97) or \
# (data["game_title"] == "SHREK MOVIE" and data["game_code"] == "MSKE" and data["header_checksum"] == 0x83) or \
# (data["game_title"] == "SHREK MOVIE" and data["game_code"] == "MSKE" and data["header_checksum"] == 0x82) or \
# (data["game_title"] == "SHREKSHARK21" and data["game_code"] == "MSTE" and data["header_checksum"] == 0x3E) or \
# (data["game_title"] == "SHREK2MOVIE" and data["game_code"] == "M2SE" and data["header_checksum"] == 0x8A) or \
# (data["game_title"] == "SHREK2MOVIE" and data["game_code"] == "M2SE" and data["header_checksum"] == 0x89):
# data["3d_memory"] = True

# 8M FLASH DACS
data["dacs_8m"] = False
if (data["game_title"] == "NGC-HIKARU3" and data["game_code"] == "GHTJ" and data["header_checksum"] == 0xB3):
Expand All @@ -112,6 +100,9 @@ def GetHeader(self, unchanged=False):
data["unchanged"] = copy.copy(data)
self.DATA = data
data["db"] = self.GetDatabaseEntry()

# 3D Memory (GBA Video 64 MB)
data["3d_memory"] = False
if data["db"] is not None and "3d" in data["db"]:
data["3d_memory"] = data["db"]["3d"]

Expand Down
4 changes: 2 additions & 2 deletions FlashGBX/Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

# Common constants
APPNAME = "FlashGBX"
VERSION_PEP440 = "3.34"
VERSION_PEP440 = "3.35"
VERSION = "v{:s}".format(VERSION_PEP440)
VERSION_TIMESTAMP = 1695720959
VERSION_TIMESTAMP = 1700872410
DEBUG = False
DEBUG_LOG = []
APP_PATH = ""
Expand Down
24 changes: 18 additions & 6 deletions FlashGBX/config/db_AGB.json
Original file line number Diff line number Diff line change
Expand Up @@ -17008,6 +17008,18 @@
"lg": "En",
"rg": "USA"
},
"82ef3fc0ac580cc4773ed2cfd76d6f6b21edfe1e": {
"gn": "Rockman EXE 4 - Tournament Blue Moon",
"ne": "(Japan) (Rev 1)",
"gc": "B4BJ",
"rc": 1889255175,
"rs": 8388608,
"st": 3,
"ss": 32768,
"rv": "Rev 1",
"lg": "Ja",
"rg": "Japan"
},
"d77b0c9c0c0f57d689805d2830d4638fee84d056": {
"gn": "Rockman EXE 4 - Tournament Blue Moon",
"ne": "(Japan)",
Expand Down Expand Up @@ -32052,8 +32064,8 @@
"gn": "AGB Aging Cartridge",
"ne": "(World) (v1.0) (Test Program)",
"gc": "TCHK",
"rc": 3210032432,
"rs": 2097152,
"rc": 3538423347,
"rs": 4194304,
"st": 1,
"ss": 512,
"rv": "v1.0",
Expand All @@ -32076,8 +32088,8 @@
"gn": "AGS Aging Cartridge",
"ne": "(World) (Rev 3) (v9.0) (Test Program)",
"gc": "TCHK",
"rc": 778659949,
"rs": 2097152,
"rc": 1481358791,
"rs": 4194304,
"st": 1,
"ss": 512,
"rv": "Rev 3",
Expand All @@ -32088,8 +32100,8 @@
"gn": "AGS Aging Cartridge",
"ne": "(World) (Rev 1) (v7.0) (Test Program)",
"gc": "TCHK",
"rc": 3149310304,
"rs": 2097152,
"rc": 3782087520,
"rs": 4194304,
"st": 1,
"ss": 512,
"rv": "Rev 1",
Expand Down
49 changes: 49 additions & 0 deletions FlashGBX/config/db_DMG.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
"lg": "En",
"rg": "USA"
},
"dc52b66850f63b354f5aaec225902be58923f89a": {
"gn": "Humans, The",
"ne": "(USA) (QUByte Classics)",
"gc": "",
"rc": 1166077064,
"rs": 262144,
"lg": "En",
"rg": "USA"
},
"a8e6ef37e84a9190a7c23244f98379fd2488db5a": {
"gn": "M&M's Minis Madness",
"ne": "(USA) (Sample)",
Expand Down Expand Up @@ -152,6 +161,16 @@
"lg": "En",
"rg": "USA"
},
"32ccbcbd4edd7cd5a391f0b85b9dde79b427cff7": {
"gn": "SGB Test Program",
"ne": "(World) (1994.4) (Demo) (SGB Enhanced)",
"gc": "",
"rc": 2304814109,
"rs": 49152,
"rv": "1994.4",
"lg": "En",
"rg": "World"
},
"81fc6bc03e7e094ba544d8d9c1f684271939865b": {
"gn": "Shantae",
"ne": "(World) (GBA Enhanced) (Switch)",
Expand Down Expand Up @@ -206,6 +225,26 @@
"lg": "En",
"rg": "USA"
},
"affa8b29cfe1addebb6b436566dc5eeb4fce04e3": {
"gn": "Zelda no Densetsu - Yume o Miru Shima",
"ne": "(Japan) (Rev 1) (Demo) (Special Version)",
"gc": "",
"rc": 3166706074,
"rs": 524288,
"rv": "Rev 1",
"lg": "Ja",
"rg": "Japan"
},
"4c6867774bf7936969ffcae71511a1546df15490": {
"gn": "Zelda no Densetsu - Yume o Miru Shima DX",
"ne": "(Japan) (Rev 1) (Demo) (Special Version 2) (GB Compatible)",
"gc": "",
"rc": 3859812658,
"rs": 1048576,
"rv": "Rev 1",
"lg": "Ja",
"rg": "Japan"
},
"49127b4b99e43568ae9d83089c57fc81068f9654": {
"gn": "Mani 4 in 1 - Tetris + Alleyway + Yakuman + Tennis",
"ne": "(China) (Ja)",
Expand Down Expand Up @@ -20929,6 +20968,16 @@
"lg": "Ja",
"rg": "Japan"
},
"2861fc1debb7191f1f966597d3f823953e37795b": {
"gn": "Jetsons, The - Robot Panic",
"ne": "(USA, Europe) (Rev 1)",
"gc": "DMG-JSE",
"rc": 3426275085,
"rs": 131072,
"rv": "Rev 1",
"lg": "En",
"rg": "USA, Europe"
},
"e20196d19e705dadef444ba7a04b14a1d4df7070": {
"gn": "Jetsons, The - Robot Panic",
"ne": "(USA, Europe)",
Expand Down
91 changes: 91 additions & 0 deletions FlashGBX/config/fc_DMG_29LV320DB.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"type":"DMG",
"names":[
"DRV with 29LV320DB and ALTERA CPLD"
],
"flash_ids":[
[ 0xC1, 0xC1, 0xA8, 0xA8 ]
],
"voltage":3.3,
"flash_size":0x400000,
"start_addr":0x4000,
"first_bank":0,
"write_pin":"WR",
"sector_size_from_cfi":true,
"chip_erase_timeout":120,
"mbc":"manual",
"command_set":"AMD",
"commands":{
"reset":[
[ 0x4000, 0xF0 ]
],
"read_identifier":[
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ 0x4AAA, 0x90 ]
],
"read_cfi":[
[ 0x4AAA, 0x98 ]
],
"chip_erase":[
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ 0x4AAA, 0x80 ],
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ 0x4AAA, 0x10 ]
],
"chip_erase_wait_for":[
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ 0, 0xFF, 0xFF ]
],
"sector_erase":[
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ 0x4AAA, 0x80 ],
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ "SA", 0x30 ]
],
"sector_erase_wait_for":[
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ "SA", 0xFF, 0xFF ]
],
"buffer_write":[
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ "SA", 0x26 ],
[ "SA", "BS" ],
[ "PA", "PD" ],
[ "SA", 0x2A ]
],
"buffer_write_wait_for":[
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ "SA", "PD", 0xFFFF ]
],
"single_write":[
[ 0x4AAA, 0xA9 ],
[ 0x4555, 0x56 ],
[ 0x4AAA, 0xA0 ],
[ "PA", "PD" ]
],
"single_write_wait_for":[
[ null, null, null ],
[ null, null, null ],
[ null, null, null ],
[ null, null, null ]
]
}
}
Loading

0 comments on commit 7c09455

Please sign in to comment.