#define SPRPOS(x, y) (((y & 0xff) << 8) + ((x & 0x1fe) >> 1)) #define SPRCTL(x, y, height) ( \ ((height & 0xff) << 8) + \ ((y & 0x100) >> 6) + \ ((height & 0x100) >> 7) + \ (x & 1) \ )