static int snk_rot8(int which) {
        int dial_8[] = {0xf0, 0x30, 0x10, 0x50, 0x40, 0xc0, 0x80, 0xa0};
        int value = readinputport(which + 1);
        int joypos16 = value >> 4;
        return (value & 0xf) | dial_8[joypos16 >> 1];
    }