@ced0I had an "oh. it's the endianness." moment.
excellent. a lot of that felt like beating my head against a wall, but it uses sprdraw and it works, and it's fast.
we already have a C implementation of a function exposed to javascript that could be used to clear the screen between draws.
Now all that's left to do is start trying to port some games to it.