Si-Pie on the bottom of wikipedia page you have more info about that.
Till reading today on this page I wasn't even aware of this:
SHAM (Sliced HAM)
developed the so called SHAM
mode, which was a standard 32-color mode, but allowed each video scan line to have its own, independent 32-color palette. This was possible because of a special co-processor that could reprogram the color palette registers at the beginning of each scan line. The SHM feature was deprecated when HAM8 was introduced. 
The advantage of SHM files was the ability to display all 4096 colors while eliminating the color blur of HAM compression.
Which is amazing!