Well, it looks like I finally got it!
For ARM only. If everyone could have at it, I'd appreciate it. I'm still not sure it works on 38xx, but it should now work on 36xx, and I already know it works on E-125, HP568 and e740's.
Jasper was exceptionally kind in testing my graphics library for me, he reports that it is now working flawlessly on his 3660.
Ironically, I corresponded with Thierry Tremblay of PocketFrog fame who looked at my code. He spotted a problem that I actually did not fix in this version. Somehow it seems to be working regardless, damned if I understand why! I think I'm going to implement his suggestion anyway and make sure it still works. I thank him very much for his time in any case, it is very much appreciated.
And I of course thank anyone who takes a look for me. It's been a long, hard road, but I think I finally nailed it!