janaboy74 / wfeditormk66

Watchface editor for MK66
GNU General Public License v3.0
8 stars 1 forks source link

compressed file is not only 0x02FF0100 #6

Open yoohose opened 6 months ago

yoohose commented 6 months ago

In API 「void watchface::parse()」, compressed watchface file is read for special process ↓ ※ down to line262: if(hdr.compress == ~((uint64_t)0xfd00fefful)... )

I tought that ~((uint64_t)0xfd00fefful) is indicate "some compressed format", until load another watch face file "D13183001.bin". This file has compress format 0xFFFFFF0D02FF0101 (Big endian) but, when I load this file, image was crashed. so next I insert ※ line262 to new compress format 0xFFFFFF0D02FF0101 and reload "D13183001.bin", this time Loaded image was fine.

so, may be ~((uint64_t)0xfd00fefful) is not only compressed format. there is more of compressed format in nowadays watchface files.

yoohose commented 6 months ago

This issue is need to more investigations. Each watchface file has different compress format.

yoohose commented 6 months ago

In QX7 model, I found pattern of compress format. I was compare 12 watchface files. Each files have compress format(64bit, Big endian) like this, ※ special process = down to line262: if(hdr.compress == ~((uint64_t)0xfd00fefful)... ) D5179001.bin -> 0xFFFFFFFF 01FF0101 (don't need special process) D7398001.bin -> 0xFFFFFFFF 01FF0101 (don't need special process) D7631001.bin -> 0xFFFFFFFF 01FF0101 (don't need special process) D10344001.bin -> 0xFFFFFF06 01FF0101 (don't need special process) D10663001.bin -> 0xFFFFFF12 01FF0101 (don't need special process) D10961001.bin -> 0xFFFFFF06 01FF0101 (don't need special process) D12946001.bin -> 0xFFFFFF0F 02FF0101 (need special process) D12947001.bin -> 0xFFFFFF0A 02FF0101 (need special process) D12948001.bin -> 0xFFFFFF0B 02FF0101 (need special process) D13182001.bin -> 0xFFFFFF05 02FF0101 (need special process) D13183001.bin -> 0xFFFFFF0D 02FF0101 (need special process) D13184001.bin -> 0xFFFFFF08 02FF0101 (need special process)

Result : compress format "0x???????? 02FF01??" is needed speical process. ※?? is don't care