-\r
- if (PicoPad[0] & 1) pico_pen_y--;\r
- if (PicoPad[0] & 2) pico_pen_y++;\r
- if (PicoPad[0] & 4) pico_pen_x--;\r
- if (PicoPad[0] & 8) pico_pen_x++;\r
- PicoPad[0] &= ~0x0f; // release UDLR\r
-\r
- lim_x = (Pico.video.reg[12]&1) ? 319 : 255;\r
- if (pico_pen_y < 8) pico_pen_y = 8;\r
- if (pico_pen_y > 224-PICO_PEN_ADJUST_Y) pico_pen_y = 224-PICO_PEN_ADJUST_Y;\r
- if (pico_pen_x < 0) pico_pen_x = 0;\r
- if (pico_pen_x > lim_x-PICO_PEN_ADJUST_X) pico_pen_x = lim_x-PICO_PEN_ADJUST_X;\r
-\r
- PicoPicohw.pen_pos[0] = pico_pen_x;\r
- if (!(Pico.video.reg[12]&1)) PicoPicohw.pen_pos[0] += pico_pen_x/4;\r
- PicoPicohw.pen_pos[0] += 0x3c;\r
- PicoPicohw.pen_pos[1] = pico_inp_mode == 1 ? (0x2f8 + pico_pen_y) : (0x1fc + pico_pen_y);\r