shooking / ZoomPedalFun

A collection of tips and tricks for Zoom B1On, B1XFour and G1XFour pedals.
Creative Commons Zero v1.0 Universal
65 stars 3 forks source link

CRC checks #21

Closed shooking closed 2 years ago

shooking commented 2 years ago

Hi @mungewell

I recalled your excellent discussion on Zoom CRCs here: https://github.com/Barsik-Barbosik/Zoom-Firmware-Editor/issues/16

I am playing with the Zoom MS-70 CDR at the moment. I suspect I might need to calc a CRC. Anywhere I can crib from the zoom-zt2? somefiles.zip

In the zip should be currentPatch.bin -> straight from the pedal. and NEWTEMPO.bin with has injected same tempo but I somehow need 4 more bytes

so wondering if


pi@raspberrypi:~/Software/ZoomPedalMS70CDR $ hexdump -C currentPatch.bin 
00000000  f0 52 00 61 28 00 00 00  00 00 00 00 00 00 00 00  |.R.a(...........|
00000010  00 00 00 00 00 04 00 00  00 00 70 00 00 42 0c 0c  |..........p..B..|
00000020  58 00 1c 20 40 00 06 00  00 00 00 00 00 24 00 21  |X.. @........$.!|
00000030  00 00 52 01 1c 10 00 1c  10 45 06 00 00 00 00 00  |..R......E......|
00000040  00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 08 00 00  |................|
00000080  00 40 0c 0f 45 00 6d 70  74 79 20 54 45 00 20 49  |.@..E.mpty TE. I|
00000090  00 f7                                             |..|
``
00 20 49 00 is the CRC of the above crap.
It wasnt so clear to me if one takes these raw bytes from just after the 0x28 until I run out of bytes (end of the name or !)

Thanks in anticipation.
shooking commented 2 years ago

Solved ... dont code when drinking your own homebrew, with tired eyes, when a 1 and i look alike

    cout << remainderBytes << " left.\n";
    for (size_t i = 0; i < remainderBytes; i++)
    {
        packed.push_back(unpacked[7 * numLoops + i]);
        /*
        cout << setfill ('0') << setw (2) << hex << (0xFF & unpacked[7 * numLoops + i]);
        cout << endl;
        */
    }

work so much better then packed.push_back(unpacked[7 * numLoops + 1]);