Tip: Switch palace switches normally disappear if you replay the level. However, if you insert them as direct Map16 and use the hex-edit at $00EEB2 in the ROM map, you can replay the level without a problem.
This is a disassembly of the Wiggler sprite (86), commented and ready to be inserted with PIXI. It also works on SA-1 roms. Use it with the "forest" spriteset.
If the extra bit is set, it will spawn in the angry state. You can also change the number of segments using with the different .cfg files provided. Few other customizations are possible with the defines in the .asm file.
Note: the death animation of the vanilla wiggler is handled by calling the sprite's main code even if its state is "killed". Without some kind of patch, this won't be done for this sprite, so the wiggler will usually disappear abruptly when killed (see the second screenshot).
Fixed a small SA-1 issue regarding the sound when killed with a star. I personally found a bit strange the 0-segment option, as it will be a Wiggler with only its head, without feet to walk. But alas, it works, so accepted.