diff --git a/CHANGES.md b/CHANGES.md index f47eb2b..7583c4d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,7 @@ # Release notes +### v4.0.1 (released 2024-06-30) +- Bug fixes *(thanks marv17, RibShark)* + ### v4.0 (released 2024-06-30) - Updated GBxCart RW firmware to version R42+L12 (improves flash cart compatibility) - Improved support for M5M29-39VF512 with M5M29HD528 *(thanks marv17)* @@ -16,7 +19,7 @@ - Added support for GBFlash RTC with MX29LV320EB *(thanks simonK)* - Added support for GBFlash 1M FLASH RTC (AGB-R1M-02V3) - Added support for GBA Movie Player v2 CF (SST39VF400A) -- Added support for the GBflash v1.2 and v1.3 hardware device *(thanks simonK)* +- Added support for the GBflash hardware device *(thanks simonK)* - Added support for M36XXX_32A_EARTH with M36L0R8060B *(thanks Herax)* - Added support for BUNG Doctor GB Card 4M *(thanks chobby)* - Added support for BUNG Doctor GB Card 16M *(thanks chobby)* @@ -24,7 +27,7 @@ - Added support for the Joey Jr hardware device *(thanks BennVenn)* - Confirmed support for F0088_2G_BGA48 with F0088H0 - Added support for DVP DRV with MX29LV320CB *(thanks Lu)* -- The insideGadgets’ firmware protocol of older GBxCart RW devices (Mini, v1.2, v1.3 and older) is no longer supported +- The insideGadgets’ firmware protocol of older GBxCart RW devices (Mini, v1.2 and older) is no longer supported - Minor bug fixes and improvements *(thanks aronson, simonK, marv17)* ### v3.37 (released 2024-03-01) diff --git a/FlashGBX/LK_Device.py b/FlashGBX/LK_Device.py index fb075b0..529e9e6 100644 --- a/FlashGBX/LK_Device.py +++ b/FlashGBX/LK_Device.py @@ -409,7 +409,7 @@ class LK_Device(ABC): def _try_write(self, data, retries=5): while retries > 0: - ack = self._write(data, wait=self.FW["fw_ver"] >= 12) + ack = self._write(data, wait=True) if "from_user" in self.CANCEL_ARGS and self.CANCEL_ARGS["from_user"]: return False if ack is not False: @@ -532,8 +532,11 @@ class LK_Device(ABC): buffer.extend(struct.pack(">I", key)) buffer.extend(struct.pack(">I", value)) - self._try_write(buffer) - + if self.FW["fw_ver"] >= 12: + self._try_write(buffer) + else: + self._write(buffer) + def _cart_read(self, address, length=0, agb_save_flash=False): if self.MODE == "DMG": if length == 0: @@ -595,7 +598,10 @@ class LK_Device(ABC): buffer.extend(struct.pack(">I", address >> 1)) buffer.extend(struct.pack(">H", value & 0xFFFF)) - self._try_write(buffer) + if self.FW["fw_ver"] >= 12: + self._try_write(buffer) + else: + self._write(buffer) if self.MODE == "DMG" and sram: self._set_fw_variable("DMG_WRITE_CS_PULSE", 0) @@ -2523,6 +2529,7 @@ class LK_Device(ABC): self.INFO["dump_info"]["vf_addr_reorder"] = addr_reorder self.INFO["dump_info"]["vf_value_reorder"] = value_reorder + self.INFO["dump_info"]["agb_read_method"] = self.AGB_READ_METHODS[self.AGB_READ_METHOD] else: self.INFO["dump_info"]["agb_read_method"] = self.AGB_READ_METHODS[self.AGB_READ_METHOD] diff --git a/FlashGBX/Util.py b/FlashGBX/Util.py index b3dec79..7fbd772 100644 --- a/FlashGBX/Util.py +++ b/FlashGBX/Util.py @@ -8,9 +8,9 @@ from enum import Enum # Common constants APPNAME = "FlashGBX" -VERSION_PEP440 = "4.0" +VERSION_PEP440 = "4.0.1" VERSION = "v{:s}".format(VERSION_PEP440) -VERSION_TIMESTAMP = 1719702722 +VERSION_TIMESTAMP = 1719742346 DEBUG = False DEBUG_LOG = [] APP_PATH = "" diff --git a/FlashGBX/hw_GBxCartRW.py b/FlashGBX/hw_GBxCartRW.py index fd42544..a8e6b7d 100644 --- a/FlashGBX/hw_GBxCartRW.py +++ b/FlashGBX/hw_GBxCartRW.py @@ -191,7 +191,7 @@ class GbxDevice(LK_Device): if self.FW["fw_ver"] >= 12: temp = bytearray([self.DEVICE_CMD["QUERY_CART_PWR"]]) self._get_fw_variable("CART_MODE") - else: + elif self.CanPowerCycleCart(): temp = bytearray([self.DEVICE_CMD["OFW_QUERY_CART_PWR"]]) self._write(temp) self._read(1) diff --git a/FlashGBX/res/fw_GBFlash.zip b/FlashGBX/res/fw_GBFlash.zip index 0c069b0..eb39d5a 100644 Binary files a/FlashGBX/res/fw_GBFlash.zip and b/FlashGBX/res/fw_GBFlash.zip differ diff --git a/FlashGBX/res/fw_GBxCart_RW_v1_4.zip b/FlashGBX/res/fw_GBxCart_RW_v1_4.zip index 9e64cf6..eb999cf 100644 Binary files a/FlashGBX/res/fw_GBxCart_RW_v1_4.zip and b/FlashGBX/res/fw_GBxCart_RW_v1_4.zip differ diff --git a/FlashGBX/res/fw_GBxCart_RW_v1_4a.zip b/FlashGBX/res/fw_GBxCart_RW_v1_4a.zip index 3cd3c31..4b29b94 100644 Binary files a/FlashGBX/res/fw_GBxCart_RW_v1_4a.zip and b/FlashGBX/res/fw_GBxCart_RW_v1_4a.zip differ diff --git a/FlashGBX/res/fw_JoeyJr.zip b/FlashGBX/res/fw_JoeyJr.zip index 302a86f..56a5620 100644 Binary files a/FlashGBX/res/fw_JoeyJr.zip and b/FlashGBX/res/fw_JoeyJr.zip differ diff --git a/README.md b/README.md index 031221b..f179318 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ for [Windows](https://github.com/lesserkuma/FlashGBX/releases), [Linux](https:// ### Compatible cartridge reader/writer hardware -- [GBxCart RW](https://www.gbxcart.com/) (tested with v1.4, v1.4a and v1.4c) +- [GBxCart RW](https://www.gbxcart.com/) (tested with v1.3, v1.4, v1.4a and v1.4c) - [GBFlash](https://github.com/simonkwng/GBFlash) (tested with v1.2 and v1.3) - [Joey Jr](https://bennvenn.myshopify.com/collections/game-cart-to-pc-interface/products/usb-gb-c-cart-dumper-the-joey-jr) (tested with V2++) diff --git a/setup.py b/setup.py index 87cac6c..0df197e 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,9 @@ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read( setuptools.setup( name="FlashGBX", - version="4.0", + version="4.0.1", author="Lesserkuma", - description="Reads and writes Game Boy and Game Boy Advance cartridge data using the GBxCart RW by insideGadgets", + description="Reads and writes Game Boy and Game Boy Advance cartridge data", url="https://github.com/lesserkuma/FlashGBX", packages=setuptools.find_packages(), install_requires=['pyserial>=3.5', 'Pillow', 'setuptools', 'requests', 'python-dateutil'],