diff --git a/CHANGES.md b/CHANGES.md index cbc3aa3..f934395 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,12 @@ # Release notes +### v2.3 (released 2021-06-08) +- Added support for AGB-E05-06L with 29LV128DBT2C-90Q *(thanks marv17)* +- Nintendo Power GB Memory Cartridges will now be unlocked properly even if they’re stuck in erase mode *(thanks Grender for testing)* +- Confirmed support for SD007_TSOP_48BALL_V10 with GL032M10BFIR3 *(thanks Mr_V)* +- Added support for 2006_TSOP_64BALL_6106 with W29GL128SH9B *(thanks marv17)* +- Fixed support for insideGadgets 1 MB, 128 KB SRAM *(thanks AlexiG)* +- The [setup package](https://github.com/lesserkuma/FlashGBX/releases) now includes the CH341 USB serial driver for insideGadgets GBxCart RW devices + ### v2.2 (released 2021-06-03) - Added support for insideGadgets 2 MB, 32 KB FRAM, v1.0 *(thanks t5b6_de)* - Added support for SD007_TSOP_29LV017D with M29W320DT *(thanks marv17)* diff --git a/FlashGBX/FlashGBX.py b/FlashGBX/FlashGBX.py index 7ce18fb..d30353f 100644 --- a/FlashGBX/FlashGBX.py +++ b/FlashGBX/FlashGBX.py @@ -33,7 +33,7 @@ def LoadConfig(args): (config_version, fc_files) = ReadConfigFiles(args=args) if config_version != Util.VERSION: # Rename old files that have since been replaced/renamed/merged - deprecated_files = [ "fc_AGB_M36L0R705.txt", "fc_AGB_TEST.txt", "fc_DMG_TEST.txt", "fc_AGB_Nintendo_E201850.txt", "fc_AGB_Nintendo_E201868.txt", "config.ini", "fc_DMG_MX29LV320ABTC.txt", "fc_DMG_iG_4MB_MBC3_RTC.txt", "fc_AGB_Flash2Advance.txt" ] + deprecated_files = [ "fc_AGB_M36L0R705.txt", "fc_AGB_TEST.txt", "fc_DMG_TEST.txt", "fc_AGB_Nintendo_E201850.txt", "fc_AGB_Nintendo_E201868.txt", "config.ini", "fc_DMG_MX29LV320ABTC.txt", "fc_DMG_iG_4MB_MBC3_RTC.txt", "fc_AGB_Flash2Advance.txt", "fc_AGB_MX29LV640_AUDIO.txt" ] for file in deprecated_files: if os.path.exists(config_path + "/" + file): os.rename(config_path + "/" + file, config_path + "/" + file + "_" + datetime.datetime.now().strftime("%Y%m%d%H%M%S") + ".bak") @@ -79,8 +79,8 @@ def main(portableMode=False): os.environ['QT_MAC_WANTS_LAYER'] = '1' print("{:s} {:s} by Lesserkuma".format(Util.APPNAME, Util.VERSION)) + print("https://github.com/lesserkuma/FlashGBX") print("\nDISCLAIMER: This software is provided as-is and the developer is not responsible for any damage that is caused by the use of it. Use at your own risk!") - print("\nFor troubleshooting please visit https://github.com/lesserkuma/FlashGBX\n") if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): app_path = os.path.dirname(sys.executable) diff --git a/FlashGBX/FlashGBX_GUI.py b/FlashGBX/FlashGBX_GUI.py index 66176f9..8f5e8da 100644 --- a/FlashGBX/FlashGBX_GUI.py +++ b/FlashGBX/FlashGBX_GUI.py @@ -486,6 +486,7 @@ class FlashGBX_GUI(QtWidgets.QWidget): self.SETTINGS.setValue("UpdateCheck", "disabled") if update_check and update_check.lower() == "enabled": + print("") if ".dev" in VERSION_PEP440: type = "test " url = "https://test.pypi.org/pypi/FlashGBX/json" @@ -933,7 +934,7 @@ class FlashGBX_GUI(QtWidgets.QWidget): if answer == QtWidgets.QMessageBox.Yes: (flash_id, cfi_s, cfi) = self.CONN.CheckFlashChip(limitVoltage) if cfi_s == "": - QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "Flash chip query result:
" + flash_id + "There was no Common Flash Interface (CFI) response from the cartridge. It may be too old, not reflashable or the cartridge may not be seated correctly.", QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "Flash chip query result:
" + flash_id + "This cartridge does not provide Common Flash Interface (CFI) information.", QtWidgets.QMessageBox.Ok) else: QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "Flash chip query result:
" + flash_id + "
" + str(cfi_s) + "", QtWidgets.QMessageBox.Ok) with open(self.CONFIG_PATH + "/cfi.bin", "wb") as f: f.write(cfi['raw']) @@ -999,7 +1000,7 @@ class FlashGBX_GUI(QtWidgets.QWidget): if msgbox.clickedButton() == button_cfi: (flash_id, cfi_s, cfi) = self.CONN.CheckFlashChip(limitVoltage=limitVoltage, cart_type=cart_types[1][cart_type] if cart_type != 0 else None) if cfi_s == "" or cfi == False: - QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "Flash chip query result:
" + flash_id + "There was no Common Flash Interface (CFI) response from the cartridge. If a flash chip exists on the cartridge PCB, it may be too old or require unique unlocking and handling.", QtWidgets.QMessageBox.Ok) + QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "Flash chip query result:
" + flash_id + "This cartridge does not provide Common Flash Interface (CFI) information.", QtWidgets.QMessageBox.Ok) else: QtWidgets.QMessageBox.information(self, "{:s} {:s}".format(APPNAME, VERSION), "Flash chip query result:
" + flash_id + "
" + str(cfi_s) + "", QtWidgets.QMessageBox.Ok) with open(self.CONFIG_PATH + "/cfi.bin", "wb") as f: f.write(cfi['raw']) diff --git a/FlashGBX/Flashcart.py b/FlashGBX/Flashcart.py index d6716c3..5ee4eca 100644 --- a/FlashGBX/Flashcart.py +++ b/FlashGBX/Flashcart.py @@ -699,7 +699,7 @@ class Flashcart_DMG_MMSA(Flashcart): [ 0x120, 0x09 ], [ 0x121, 0xAA ], [ 0x122, 0x55 ], - [ 0x13F, 0xa5 ], + [ 0x13F, 0xA5 ], ] self.CartWrite(cmds) # Re-Enable writes to MBC registers @@ -720,6 +720,16 @@ class Flashcart_DMG_MMSA(Flashcart): self.CartWrite(cmds) self.CartWrite([[ 0x2100, 0x01 ]]) + # Suspend potential previous erase + cmds = [ + [ 0x120, 0x0F ], + [ 0x125, 0x00 ], + [ 0x126, 0x00 ], + [ 0x127, 0xB0 ], + [ 0x13F, 0xA5 ], + ] + self.CartWrite(cmds) + # Unlock Hidden Sector cmds = [ [ 0x120, 0x0F ], diff --git a/FlashGBX/Util.py b/FlashGBX/Util.py index 6ba3790..aa7656a 100644 --- a/FlashGBX/Util.py +++ b/FlashGBX/Util.py @@ -7,7 +7,7 @@ from enum import Enum # Common constants APPNAME = "FlashGBX" -VERSION_PEP440 = "2.2" +VERSION_PEP440 = "2.3" VERSION = "v{:s}".format(VERSION_PEP440) DEBUG = False diff --git a/FlashGBX/config/fc_AGB_29LV128DT.txt b/FlashGBX/config/fc_AGB_29LV128DT.txt index 8f7fcc9..7262ba3 100644 --- a/FlashGBX/config/fc_AGB_29LV128DT.txt +++ b/FlashGBX/config/fc_AGB_29LV128DT.txt @@ -2,16 +2,18 @@ "type":"AGB", "names":[ "AGB-E08-09 with 29LV128DTMC-90Q", - "AGB-E05-01 with MX29GL128FHT2I-90G" + "AGB-E05-01 with MX29GL128FHT2I-90G", + "AGB-E05-06L with 29LV128DBT2C-90Q" ], "flash_ids":[ [ 0xC1, 0x00, 0x7D, 0x22 ], - [ 0xC1, 0x00, 0x7D, 0x22 ] + [ 0xC1, 0x00, 0x7D, 0x22 ], + [ 0xC1, 0x00, 0x79, 0x22 ] ], "voltage":3.3, "flash_size":0x1000000, "sector_size_from_cfi":true, - "chip_erase_timeout":120, + "chip_erase_timeout":150, "command_set":"AMD", "commands":{ "reset":[ diff --git a/FlashGBX/config/fc_AGB_MSP55LV128M.txt b/FlashGBX/config/fc_AGB_MSP55LV128M.txt index 0730ad8..670a862 100644 --- a/FlashGBX/config/fc_AGB_MSP55LV128M.txt +++ b/FlashGBX/config/fc_AGB_MSP55LV128M.txt @@ -7,7 +7,8 @@ "BX2006_TSOP_64BALL with GL128S", "BX2006_TSOPBGA_0106 with M29W640GB6AZA6", "AGB-E05-02 with M29W128GH", - "AGB-E05-02 with M29W128FH" + "AGB-E05-02 with M29W128FH", + "2006_TSOP_64BALL_6106 with W29GL128SH9B" ], "flash_ids":[ [ 0x02, 0x00, 0x7D, 0x22 ], @@ -16,7 +17,8 @@ [ 0x02, 0x00, 0x7D, 0x22 ], [ 0x20, 0x00, 0x7D, 0x22 ], [ 0x20, 0x00, 0x7D, 0x22 ], - [ 0x20, 0x00, 0x7D, 0x22 ] + [ 0x20, 0x00, 0x7D, 0x22 ], + [ 0xEF, 0x00, 0x7D, 0x22 ] ], "voltage":3.3, "flash_size":0x1000000, diff --git a/FlashGBX/config/fc_DMG_AM29F032_AUDIO.txt b/FlashGBX/config/fc_DMG_AM29F032_AUDIO.txt index 3c8fa47..2f0fcf5 100644 --- a/FlashGBX/config/fc_DMG_AM29F032_AUDIO.txt +++ b/FlashGBX/config/fc_DMG_AM29F032_AUDIO.txt @@ -14,6 +14,7 @@ "first_bank":1, "write_pin":"AUDIO", "chip_erase_timeout":60, + "sector_size":0x10000, "command_set":"AMD", "commands":{ "reset":[ @@ -27,21 +28,21 @@ "read_cfi":[ [ 0x555, 0x98 ] ], - "chip_erase":[ + "sector_erase":[ [ 0x555, 0xAA ], [ 0x2AA, 0x55 ], [ 0x555, 0x80 ], [ 0x555, 0xAA ], [ 0x2AA, 0x55 ], - [ 0x555, 0x10 ] + [ "SA", 0x30 ] ], - "chip_erase_wait_for":[ + "sector_erase_wait_for":[ [ null, null, null ], [ null, null, null ], [ null, null, null ], [ null, null, null ], [ null, null, null ], - [ 0, 0xFF, 0xFF ] + [ "SA", 0xFF, 0xFF ] ], "single_write":[ [ 0x555, 0xAA ], diff --git a/FlashGBX/config/fc_DMG_M29W320DT.txt b/FlashGBX/config/fc_DMG_M29W320DT.txt index 26121ef..e5aaacf 100644 --- a/FlashGBX/config/fc_DMG_M29W320DT.txt +++ b/FlashGBX/config/fc_DMG_M29W320DT.txt @@ -2,11 +2,13 @@ "type":"DMG", "names":[ "SD007_TSOP_29LV017D with M29W320DT", - "SD007_TSOP_48BALL_V10 with M29W320DT" + "SD007_TSOP_48BALL_V10 with M29W320DT", + "SD007_TSOP_48BALL_V10 with GL032M10BFIR3" ], "flash_ids":[ [ 0x02, 0x02, 0x7D, 0x7D ], - [ 0x20, 0x20, 0xC9, 0xC9 ] + [ 0x20, 0x20, 0xC9, 0xC9 ], + [ 0x02, 0x02, 0x7D, 0x7D ] ], "voltage":3.3, "flash_size":0x400000, diff --git a/FlashGBX/config/fc_AGB_MX29LV640_AUDIO.txt b/FlashGBX/config/fc_DMG_MX29LV640_AUDIO.txt similarity index 100% rename from FlashGBX/config/fc_AGB_MX29LV640_AUDIO.txt rename to FlashGBX/config/fc_DMG_MX29LV640_AUDIO.txt diff --git a/FlashGBX/config/fc_DMG_Retrostage.txt b/FlashGBX/config/fc_DMG_Retrostage.txt new file mode 100644 index 0000000..dc83ecc --- /dev/null +++ b/FlashGBX/config/fc_DMG_Retrostage.txt @@ -0,0 +1,11 @@ +{ + "type":"DMG", + "names":[ + "Retrostage GameBoy Blaster" + ], + "flash_ids":[], + "voltage":5, + "write_pin":"", + "command_set":"", + "commands":{} +} diff --git a/FlashGBX/config/fc_DMG_iG_1MB.txt b/FlashGBX/config/fc_DMG_iG_1MB.txt index 26be455..4a5032e 100644 --- a/FlashGBX/config/fc_DMG_iG_1MB.txt +++ b/FlashGBX/config/fc_DMG_iG_1MB.txt @@ -4,7 +4,8 @@ "insideGadgets 1 MB, 128 KB SRAM" ], "flash_ids":[ - [ 0xC2, 0xC2, 0x58, 0x58 ] + [ 0xC2, 0xC2, 0x58, 0x58 ], + [ 0xC2, 0xC2, 0xD6, 0xD6 ] ], "voltage":5, "flash_size":0x100000, @@ -18,17 +19,17 @@ [ 0, 0xF0 ] ], "read_identifier":[ - [ 0x555, 0xAA ], - [ 0x2AA, 0x55 ], - [ 0x555, 0x90 ] + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0x90 ] ], "chip_erase":[ - [ 0x555, 0xAA ], - [ 0x2AA, 0x55 ], - [ 0x555, 0x80 ], - [ 0x555, 0xAA ], - [ 0x2AA, 0x55 ], - [ 0x555, 0x10 ] + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0x80 ], + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0x10 ] ], "chip_erase_wait_for":[ [ null, null, null ], @@ -39,9 +40,9 @@ [ 0, 0xFF, 0xFF ] ], "single_write":[ - [ 0x555, 0xAA ], - [ 0x2AA, 0x55 ], - [ 0x555, 0xA0 ], + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0xA0 ], [ "PA", "PD" ] ], "single_write_wait_for":[ diff --git a/FlashGBX/config/fc_DMG_iG_8MB.txt b/FlashGBX/config/fc_DMG_iG_8MB.txt new file mode 100644 index 0000000..61b0565 --- /dev/null +++ b/FlashGBX/config/fc_DMG_iG_8MB.txt @@ -0,0 +1,87 @@ +{ + "type":"DMG", + "names":[ + "insideGadgets 8 MB" + ], + "flash_ids":[ + [ 0x01, 0x01, 0x7E, 0x7E ] + ], + "voltage":3.3, + "flash_size":0x800000, + "start_addr":0x4000, + "first_bank":0, + "write_pin":"WR", + "sector_size_from_cfi":true, + "chip_erase_timeout":60, + "command_set":"AMD", + "commands":{ + "reset":[ + [ 0x0, 0xF0 ] + ], + "read_identifier":[ + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0x90 ] + ], + "chip_erase":[ + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0x80 ], + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 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":[ + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0x80 ], + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ "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":[ + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ "SA", 0x25 ], + [ "SA", "BS" ], + [ "PA", "PD" ], + [ "SA", 0x29 ] + ], + "buffer_write_wait_for":[ + [ null, null, null ], + [ null, null, null ], + [ null, null, null ], + [ null, null, null ], + [ null, null, null ], + [ "SA", "PD", 0xFFFF ] + ], + "single_write":[ + [ 0xAAA, 0xAA ], + [ 0x555, 0x55 ], + [ 0xAAA, 0xA0 ], + [ "PA", "PD" ] + ], + "single_write_wait_for":[ + [ null, null, null ], + [ null, null, null ], + [ null, null, null ], + [ null, null, null ] + ] + } +} diff --git a/FlashGBX/config/fc_DMG_iG_Power_Cart.txt b/FlashGBX/config/fc_DMG_iG_Power_Cart.txt new file mode 100644 index 0000000..25e2524 --- /dev/null +++ b/FlashGBX/config/fc_DMG_iG_Power_Cart.txt @@ -0,0 +1,11 @@ +{ + "type":"DMG", + "names":[ + "insideGadgets Power Cart 1 MB, 128 KB SRAM" + ], + "flash_ids":[], + "voltage":5, + "write_pin":"", + "command_set":"", + "commands":{} +} diff --git a/FlashGBX/fw_GBxCartRW_v1_3.py b/FlashGBX/fw_GBxCartRW_v1_3.py index 909a734..9ce5051 100644 --- a/FlashGBX/fw_GBxCartRW_v1_3.py +++ b/FlashGBX/fw_GBxCartRW_v1_3.py @@ -211,8 +211,6 @@ class FirmwareUpdater(QtWidgets.QDialog): fn = None text = "The following firmware will now be written to your GBxCart v1.3 device: