shooking / ZoomPedalFun

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

Decoding GCE-3 mode switch #1

Open mungewell opened 3 years ago

mungewell commented 3 years ago

Line 44 is sending a patch, similar to G1Four but offsets different. https://github.com/shooking/ZoomPedalFun/blob/main/GCE-3/InitialModeChangingExperiments/ChangeToG1Four.txt#L44

ChangeToG1Four_line44.py.txt

simon@thevoid:~/zoom-zt2-sdw-github$ python3 ChangeToG1Four_line44.py
Packet Length: 886
Stated Length: 760
Block Length: 760
compute CRC32: 0x73a8137e
Checksum OK 0x8c57ec81
00000000: 50 54 43 46 50 01 00 00  01 00 00 00 06 00 00 00  PTCFP...........
00000010: 10 00 00 00 00 00 00 00  00 00 4D 53 20 48 69 47  ..........MS HiG
00000020: 61 69 6E 20 40 00 00 03  11 00 00 04 01 00 00 00  ain @...........
00000030: 10 00 00 05 40 00 00 01  70 00 00 09 54 58 4A 31  ....@...p...TXJ1
00000040: 2C 00 00 00 4D 53 20 38  30 30 82 F0 8E 67 82 C1  ,...MS 800...g..
00000050: 82 BD 83 58 83 5E 83 93  83 5F 81 5B 83 68 82 C8  ...X.^..._.[.h..
00000060: 98 63 82 DD 83 54 83 45  83 93 83 68 81 42 00 00  .c...T.E...h.B..
00000070: 54 58 45 31 2C 00 00 00  54 68 69 73 20 73 74 61  TXE1,...This sta
00000080: 6E 64 61 72 64 20 64 69  73 74 6F 72 74 69 6F 6E  ndard distortion
00000090: 20 73 6F 75 6E 64 20 75  73 65 73 20 4D 53 20 38   sound uses MS 8
000000A0: 30 30 2E 00 45 44 54 42  90 00 00 00 81 00 00 C6  00..EDTB........
000000B0: 03 C8 40 0D F0 00 00 00  00 00 00 00 00 00 00 00  ..@.............
000000C0: 00 00 00 00 23 00 00 48  00 D0 00 0C 18 01 0F 2C  ....#..H.......,
000000D0: 19 09 00 00 00 00 00 00  00 00 00 00 03 00 00 00  ................
000000E0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000000F0: 00 00 00 00 21 00 00 0A  00 C8 40 0F DC 00 00 00  ....!.....@.....
00000100: 00 00 00 00 00 00 00 00  00 00 00 00 81 00 00 02  ................
00000110: 00 90 81 07 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000120: 00 00 00 00 E1 00 00 12  01 70 80 04 00 00 00 00  .........p......
00000130: 00 00 00 00 00 00 00 00  00 00 00 00 50 50 52 4D  ............PPRM
00000140: 0C 00 00 00 00 00 00 00  00 00 00 00 11 00 00 00  ................
00000150: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000160: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000170: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000180: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000190: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001D0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001E0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000001F0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000200: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000210: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000220: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000230: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000240: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000250: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000260: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000270: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000280: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
00000290: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002D0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002E0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
000002F0: 00 00 00 00 00 00 00 00                           ........
Block: None
mungewell commented 3 years ago

Line 14 appears to be a 'ZSPF' file, a format I have not seen before but looks like a list of effects. Block continues in next packets. https://github.com/shooking/ZoomPedalFun/blob/main/GCE-3/InitialModeChangingExperiments/ChangeToG1Four.txt#L14

In packed form

00000000  f0 52 00 6e 60 23 10 07  00 00 00 78 05 00 00 00  |.R.n`#.....x....|
00000010  04 5a 53 50 46 68 00 00  00 00 48 44 49 46 24 00  |.ZSPFh....HDIF$.|
00000020  00 00 00 0c 00 00 00 00  00 00 66 43 05 05 05 01  |..........fC....|
00000030  00 04 00 00 00 00 00 00  00 00 32 00 01 00 0a 00  |..........2.....|
00000040  00 00 00 00 00 00 00 5a  00 49 46 00 60 00 00 00  |.......Z.IF.`...|
00000050  00 02 00 00 00 00 00 00  00 00 01 00 00 00 00 00  |................|
00000060  10 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 00 00 00  |................|
00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 02 00 00 00  |................|
000000b0  00 00 00 00 00 50 49 46  00 00 20 00 00 00 01 00  |.....PIF.. .....|
000000c0  00 00 00 00 00 00 00 10  00 00 00 00 00 00 00 00  |................|
000000d0  00 07 00 00 00 00 00 00  00 00 41 50 49 46 38 00  |..........APIF8.|
000000e0  00 00 00 50 44 50 00 10  00 00 00 00 00 01 00 00  |...PDP..........|
000000f0  00 00 00 00 00 42 44 50  00 00 10 00 00 00 01 01  |.....BDP........|
00000100  00 00 00 00 00 00 00 47  00 44 50 00 10 00 00 00  |.......G.DP.....|
00000110  00 00 00 00 00 00 00 00  00 00 5a 44 4c 54 30 0c  |..........ZDLT0.|
00000120  00 00 00 5a 54 59 50 10  00 00 00 00 43 4f 4d 50  |...ZTYP.....COMP|
00000130  00 2e 5a 44 32 00 00 00  04 00 00 27 19 40 5a 54  |..ZD2......'.@ZT|
00000140  00 59 50 10 00 00 00 52  00 41 43 4b 43 4f 4d 50  |.YP....R.ACKCOMP|
00000150  00 2e 5a 44 32 00 27 19  40 40 5a 54 59 50 10 00  |..ZD2.'.@@ZTYP..|
00000160  00 00 00 53 4c 57 41 54  00 4b 2e 5a 44 32 00 00  |...SLWAT.K.ZD2..|
00000170  08 00 27 19 40 5a 54 59  00 50 10 00 00 00 5a 4e  |..'.@ZTY.P....ZN|
00000180  00 52 2e 5a 44 32 00 00  01 00 00 00 00 27 19 40  |.R.ZD2.......'.@|
00000190  00 5a 54 59 50 10 00 00  00 00 4d 55 54 45 53 57  |.ZTYP.....MUTESW|
000001a0  00 2e 5a 44 32 00 00 00  10 27 19 40 5a 54 59 50  |..ZD2....'.@ZTYP|
000001b0  00 10 00 00 00 47 52 41  00 59 43 4f 4d 50 2e 5a  |.....GRA.YCOMP.Z|
000001c0  02 44 32 00 27 19 40 5a  00 54 59 50 10 00 00 00  |.D2.'.@Z.TYP....|
000001d0  00 4e 5f 47 41 54 45 2e  00 5a 44 32 00 00 00 27  |.N_GATE..ZD2...'|
000001e0  20 19 40 5a 54 59 50 10  00 00 00 00 4f 50 54 43  | .@ZTYP.....OPTC|
000001f0  00 4f 4d 50 2e 5a 44 32  04 00 00 27 19 40 5a 54  |.OMP.ZD2...'.@ZT|
00000200  00 59 50 10 00 00 00 42  00 4c 41 43 4b 4f 50 54  |.YP....B.LACKOPT|
00000210  00 2e 5a 44 32 00 27 19  40 40 5a 54 59 50 10 00  |..ZD2.'.@@ZTYP..|
00000220  00 00 00 4c 4d 54 31 31  00 37 36 2e 5a 44 32 00  |...LMT11.76.ZD2.|
00000230  08 00 27 19 40 5a 54 59  00 50 10 00 00 00 41 55  |..'.@ZTY.P....AU|
00000240  00 54 4f 57 41 48 2e 5a  01 44 32 00 00 27 19 40  |.TOWAH.Z.D2..'.@|
00000250  00 5a 54 59 50 10 00 00  00 00 52 45 53 4f 4e 41  |.ZTYP.....RESONA|
00000260  00 4e 43 2e 5a 44 32 00  10 27 19 40 5a 54 59 50  |.NC.ZD2..'.@ZTYP|
00000270  00 10 00 00 00 43 52 59  00 2e 5a 44 32 00 00 00  |.....CRY..ZD2...|
00000280  02 00 00 00 27 19 40 5a  00 54 59 50 10 00 00 00  |....'.@Z.TYP....|
00000290  00 53 45 51 46 4c 54 52  00 2e 5a 44 32 00 00 27  |.SEQFLTR..ZD2..'|
000002a0  20 19 40 5a 54 59 50 10  00 00 00 00 47 54 5f 47  | .@ZTYP.....GT_G|
000002b0  00 45 51 31 55 2e 5a 44  04 32 00 27 19 40 5a 54  |.EQ1U.ZD.2.'.@ZT|
000002c0  00 59 50 10 00 00 00 47  00 54 47 45 51 37 31 55  |.YP....G.TGEQ71U|
000002d0  00 2e 5a 44 32 00 27 19  40 40 5a 54 59 50 10 00  |..ZD2.'.@@ZTYP..|
000002e0  00 00 00 53 54 47 54 47  00 45 31 55 2e 5a 44 32  |...STGTG.E1U.ZD2|
000002f0  08 00 27 19 40 5a 54 59  00 50 10 00 00 00 50 41  |..'.@ZTY.P....PA|
00000300  00 52 41 45 51 2e 5a 44  01 32 00 00 00 27 19 40  |.RAEQ.ZD.2...'.@|
00000310  00 5a 54 59 50 10 00 00  00 00 52 4e 44 4d 46 4c  |.ZTYP.....RNDMFL|
00000320  00 54 52 2e 5a 44 32 00  10 27 19 40 5a 54 59 50  |.TR.ZD2..'.@ZTYP|
00000330  00 10 00 00 00 4c 4f 57  00 50 41 53 53 46 2e 5a  |.....LOW.PASSF.Z|
00000340  02 44 32 00 27 19 40 5a  00 54 59 50 10 00 00 00  |.D2.'.@Z.TYP....|
00000350  00 45 58 43 49 54 45 52  00 2e 5a 44 32 00 00 27  |.EXCITER..ZD2..'|
00000360  20 19 40 5a 54 59 50 10  00 00 00 00 53 54 45 50  | .@ZTYP.....STEP|
00000370  00 2e 5a 44 32 78 0c 2f  1a 00 f7                 |..ZD2x./...|
mungewell commented 3 years ago

Line 432 appears to be reading back the FLTS_SEQ file https://github.com/shooking/ZoomPedalFun/blob/main/GCE-3/InitialModeChangingExperiments/ChangeToG1Four.txt#L432

In packed form

00000000  f0 52 00 6e 60 04 22 01  00 78 05 00 3e 3e 3e 00  |.R.n`."..x..>>>.|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 42 59 00 50 41 53 53  |.........BY.PASS|
00000030  2e 5a 44 00 32 00 00 00  00 00 00 00 00 00 01 00  |.ZD.2...........|
00000040  00 00 00 00 00 00 00 3c  3c 3c 00 00 00 00 00 00  |.......<<<......|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 3e 3e 3e  00 01 00 00 00 00 00 00  |.....>>>........|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 00 43 00 4f 4d 50 2e  5a 44 32 00 00 00 00 00  |..C.OMP.ZD2.....|
00000090  00 31 2e 00 34 30 00 01  10 00 00 00 01 00 00 00  |.1..40..........|
000000a0  52 41 43 00 4b 43 4f 4d  50 2e 5a 00 44 32 00 31  |RAC.KCOMP.Z.D2.1|
000000b0  2e 34 30 00 00 01 20 00  00 01 00 00 00 00 53 4c  |.40... .......SL|
000000c0  57 41 54 00 4b 2e 5a 44  32 00 00 00 00 31 2e 35  |WAT.K.ZD2....1.5|
000000d0  30 00 01 00 30 00 00 01  00 00 00 00 5a 4e 52 2e  |0...0.......ZNR.|
000000e0  5a 44 32 00 00 00 00 00  00 00 31 00 2e 35 30 00  |ZD2.......1..50.|
000000f0  01 40 00 00 00 01 00 00  00 4d 55 00 54 45 53 57  |.@.......MU.TESW|
mungewell commented 3 years ago

Line 10 looks like its declaring upload file 'MODEL.ZSP' if you use the zoom-zt2-ui can you download that file???

00000000  f0 52 00 6e 60 20 01 00  00 00 00 00 00 00 00 00  |.R.n` ..........|
00000010  4d 4f 44 45 4c 2e 5a 53  50 00 00 00 00 f7        |MODEL.ZSP.....|
0000001e
mungewell commented 3 years ago

Offsets are different again, but you can rebuild the file from the logs. ChangeToG1Four_line14.py.txt

$ python3 ChangeToG1Four_line14.py
Checksum OK 0x34bc678
Checksum OK 0x4bc733de
Checksum OK 0x26822080
Checksum OK 0x10544a11
Checksum OK 0x12e4a644

$ hexdump -C -v rebuilt_MODEL.ZSP   
00000000  5a 53 50 46 e8 00 00 00  48 44 49 46 24 00 00 00  |ZSPF....HDIF$...|
00000010  0c 00 00 00 00 00 66 43  05 05 05 01 04 00 00 00  |......fC........|
00000020  00 00 00 00 32 00 01 00  0a 00 00 00 00 00 00 00  |....2...........|
00000030  5a 49 46 00 60 00 00 00  02 00 00 00 00 00 00 00  |ZIF.`...........|
...
shooking commented 3 years ago

model.zip Great - the GUI works lovely with GCE. (some wxWidgets complaints but still works)

I zipped the model. Do you ever frequent tonelib.net - I am shooking_sybase ... there is a lot more I would like to share but not in public. Could accelerate the process.

shooking commented 3 years ago

So in the model file I see ZIF - I have found a source of such files ... not sure if it is related. the ZD2's can be used to check requirements of FLST_SEQ.ZDT and built to satisfy the pedal's requirements.

Then patches loaded accordingly.

Basically I have all of the model's for all of the pedals (everyone does if they know how to look). I suspect the GCE itself needs it's own firmware to boot up the emulator. Then one loads the models After that they are supposed to populate the FLST and then the specific references ZD2s Then "how many patches? What bank size?" - load them up with the "46" format - that seems to be 09 format with a placement. And you then have an emulation. The model above is for the B3n. What's nice is the F0 52 00 6E 44 F7 works even on the B1XFour (and all in that series) - so I will use this to decide how to load patches with your zoomzt - instead of hardcoding range(10, 60) we can derive it along with a modulo factor.

I really need to get more into "construct" - what you do there is magic. My older pull from original zoomzt2 was getting confused because it looked for 5 IDs. Your modified code seems to be decoding G5n, B3n etc patches - awesome. I seem to recall the older pedals also had this "preamable, N FX, volume etc patch name, checksum, end" format.

shooking commented 2 years ago

I should have update here that I captured the mode switch sequence for the GCE-3 and added scripts to change modes - I must make the time to add it to my GUI. The traffic is checked into GIT. Probably under GCE-3 Derived Data.