Aliexpress OLED 16x02 not working/WS0012

OK, this is going to take some time.
The COM-OLED16X2 uses the IST0010 chip.
It is not fully compatible with the hd44780 instruction set.
They screwed up some things.
Things I've found so far:
They totally screwed up the Clear Display instruction.
It is not setting the DDRAM address counter to zero.
Obviously they didn't even test this.
This means after a clear it picks up writing right were it was before the clear.
Also, sometimes it screws up its shift offset on the display.
The only way to reset the shift offset back to normal is to use the Return Home instruction
At least they got Return Home instruction correct.

Also, the chipset does not appear to follow its documented instruction set with respect to initialization or at least has issues when doing a proper hd44780 initialization sequence. All the needed instructions are claimed to be supported.
There are some issues. I am assuming they never really tested it with the proper hd44780 initialization sequence since their example initialization sequences would only work from a power up and not a warm start.
It also looks like they found out they have issues setting the font since you can't use alternate fonts in 4 bit mode since they screwed up the Function Set instruction by trying to extend it to use 2 reserved bits that must always be zero to have a reliable initialization sequence.
I have seen other chips makes this mistake.
Not sure what they are doing but the chip has initialization issues when using the normal & robust hd44780 initialization sequence.

I think I remember looking at this chipset a few years ago and at the time opted not to deal with it.

It will take some time to figure out what works, what doesn't and what needs to be done to work around the issues. And since the issues are in the hd44780 layer/commands this can't just be dropped in the top level hd44780 class since any goofy workarounds for this chipset are obviously chip set specific.
It will require its own i/o class that will have to snoop for certain instructions and alter them on the fly.
What a mess.

--- bill