+ game_menu_loop(1, 0);
+}
+
+int game_loop(byte action)
+{
+#if 1
+
+#if 0
+ printf("::: action == 0x%02x\n", action);
+#endif
+
+ if (em_game_status == EM_GAME_STATUS_MENU)
+ {
+ int result = game_menu_loop(0, action);
+
+ if (result == 1)
+ {
+ /* exit program */
+
+ return 1;
+ }
+
+ if (result == 2)
+ {
+ /* start playing */
+
+ if (game_play_init(player_level) == 0)
+ em_game_status = EM_GAME_STATUS_PLAY;
+ }
+ }
+ else if (em_game_status == EM_GAME_STATUS_PLAY)
+ {
+ if (game_play_loop(action) != 0)
+ {
+ /* stop playing */
+
+ game_menu_init();
+ em_game_status = EM_GAME_STATUS_MENU;