This project contains a program that should help. It's called "cursor". The one called "cursor1" is an earlier version of "ship", which took a while for me to create.