====== Firmware ====== ---- ===== Name of the file with firmware ===== |< 100% >| || @red: | The Unicard firmware is distributed in files "unicard.app". If there is additional text after "unicard", it marks the type of computer the firmware is intended for. Currently (as of 05/2021), Unicard firmware is available for 4 types of SHARP computers: |< 50% 30% >| ^ Computer type ^ Firmware Name ^ | MZ700 EU (07/2018) |@#D6EFC2:{{:unicard:firmware:unicard700_EU.zip}}| | MZ700 JP (07/2018) |@#D6EFC2:{{:unicard:firmware:unicard700_JP.zip}}| | MZ800 v0.23 (05/2021) |@#D6EFC2:{{:unicard:firmware:unicard800.zip}}| | MZ1500 v0.23 (05/2021) |@#D6EFC2:{{:unicard:firmware:unicard1500.zip}}| \\ When updating firmware it is necessary to work with extracted files **unicard*.app**. ---- ===== Firmware Update ===== |< 100% >| || @red: | The firmware update is done by the Unicard without the need for a JTAG programmer. All you need is a SHARP computer with a Unicard and a prepared SD card. If the Unicard firmware has different parameters than the new firmware on the SD card, the bootloader will update the firmware automatically after turning on the computer. ==== Preparing the SD card ==== - format the SD card to file system FAT32 - choose correct firmware based on the computer type (//unicard700_EU.app, unicard700_JP.app, unicard800.app, unicard1500.app//) - copy firmware to SD card's root - rename firmware to ** unicard.app ** ==== Update ==== Insert the SD card into the SHARP computer and turn it on. If everything is OK, you will see information about the update's progress on the monitor. After it is finished, a standard booting of the computer will occur. File **unicard.app** can be left in the SD card's root. If the bootloader finds a match between the current firmware and the firmware on the SD card, it will not update. [{{unicard:firmware:unicardfw_update.jpg|//Progress of the Unicard firmware update//}}] ==== Limitations of firmware update ==== There are two limitations for firmware update: * the checksum of the firmware must match * the parameters of the new firmware must be different from the parameters of the current Unicard's firmware \\ If needed, it is no problem to update an older version of the firmware over the newer one. ---- ===== The structure of the firmware files ===== |< 100% >| || @red: | Every file containig Unicard firmware is composed of a header of 512byte and its own coded firmware. [{{unicard:firmware:unicardfw_head_hex.jpg|//The header of the Unicard firmware//}}] ==== Description of the header's structure ==== ^ Offset ^ Meaning ^ Contents ^ Length ^ | 0 byte | identification signature | @#00a2e8:**UNICARD_** | 8 byte | | 9 byte | version | @#00a2e8:**n** | 1 byte | | 10 byte | separator of version and subversion | @#00a2e8:**.** | 1 byte | | 11 byte | subversion | @#00a2e8:**nn** | 2 byte | | 13 byte | file size including header (unsigned long) | @#00a2e8:** nn nn nn nn** | 4 byte | | 17 byte | checksum of the firmware file (unsigned long) | @#00a2e8:** nn nn nn nn** | 4 byte | | 21 byte | CR LF | @#00a2e8:**0D0A** | 2 byte | | 23 byte | identification of computer **MZ_ID** - currently: * // MZ700_EU// * // MZ700_JP// * // MZ800 // * // MZ1500 // | @#00a2e8:**MZ_ID** | depends on the length of MZ_ID | | 23 byte + length of MZ_ID | CR LF | @#00a2e8:**0D0A** | 2 byte | | 23 byte + length of MZ_ID + 2 byte | unused | @#00a2e8:**free** | what is left to 512 byte | The reader may send a suggestion on using the free bytes in the firmware header. Current idea from Bohouš - which modification, who translated it; what did they have for lunch and what the weather was like, as well as a forecast for the following week. I suggested an ode to Bohouš, leaving some space for a few praising rhymes for Mikeš and Martin :-D. ==== Firmware structure description ==== From the 513. byte (0x0200H), there is the Unicard firmware code itself. This code is encrypted, the firmware therefore cannot be dirrecty reviewed. As mentioned in the header's description, the file contains a checksum, which prevents any possibility of a damaged firmware being used to update. When updating, the check sum is compared and if it does not match with the checksum mentioned in the header, the update will not happen.