Have you tried generating the GAME code with the Play-Test Applet? This should have no problem with a castling where the King ends at the Rook location. (As of today; I noticed there was a bug there in taking back the castling, because the Rook and King were put back in the wrong order, so that the King would turn into a Rook during the legality test.) I temporarily changed the castling rule in the Mighty-Lion preset to do 3 King steps, and this works fine even for K-side castling.
Have you tried generating the GAME code with the Play-Test Applet? This should have no problem with a castling where the King ends at the Rook location. (As of today; I noticed there was a bug there in taking back the castling, because the Rook and King were put back in the wrong order, so that the King would turn into a Rook during the legality test.) I temporarily changed the castling rule in the Mighty-Lion preset to do 3 King steps, and this works fine even for K-side castling.