I'm sorry I misunderstood the boundary issue.
We should shift all boundaries in proportion to the arguments of SPHOME as follows.
(before correction)
IF X<0 THEN X=0
IF X>385 THEN X=385
IF Y<18 THEN Y=18
IF Y>225 THEN Y=225
(after correction)
IF X<8 THEN X=8
IF X>393 THEN X=393
IF Y<26 THEN Y=26
IF Y>233 THEN Y=233
0そうだね 未プレイ