some headless additions
fix some sdl typos that error on safe heap in asm mode, and add test coverage; fixes #2044