Official names for Earthbound control codes [00] linebreak -> ↓ [01] newline -> ← [02] eob -> 』 or @! [03] prompt2 -> @KEY() [04] set(flagnum) -> @SETF(flagnum) [05] unset(flagnum) -> @CLRF(flagnum) or @RESF(flagnum) [06] goto_ifset(flagnum, dest) -> @CHKFGOTO(flagnum, dest) [07] isset(flagnum) -> @CHKF(flagnum) [08] call(addr) -> @GOSUB(addr) [09] switch(addr ...) -> @SELGOTO(addr ...) [0A] goto(addr) -> @GOTO(addr) [0B] result_is(value) -> @EQ(value) [0C] result_not(value) -> @NOT(value) [0D 00] rtoarg -> @SET_REG(0) [0D 01] ctoarg -> @SET_REG(1) [0E] counter(value) -> @SET_LOOPREG(value) [0F] inc -> @INC() [10] pause(frames) -> @WI(frames) [11] menu -> @SELQ() [12] clearline -> @CLRLINE() [13] wait -> @KEYNP() [14] prompt -> @FKEY() [18 00] window_closetop -> @CLOSE() [18 01] window_open(windownum) -> @OPEN(windownum) [18 02] save_window_context -> @SAVE_WIN() [18 03] window_switch(windownum) -> @SELECT_WIN(windownum) [18 04] window_closeall -> @CLOSEALL() [18 05] text_pos(x, y) -> @LOC(x, y) [18 06] window_clear -> @CLS() [18 07] compare_reg(value, regnum) -> @CMP(value, regnum) [18 08] window_menu_nocancel(windownum) -> (Unused, so we don't have the official name) [18 09] window_menu(windownum) -> @WIN_SEL_ITEMQ(windownum) [18 0A] show_wallet -> @WINR_MONEY() [18 0D] show_status_or_null(arg) -> (Unused, so we don't have the official name) [19 02]text[02] add_option("text") -> [19 04] clear_options -> @RESITEM() [19 05] inflict(pc, group, status) -> @SET_SPECIAL(pc, group, status) [19 10] get_char(position) -> @GET_ORDER_PLAYER(position) [19 11] get_name_letter(pc) -> @GET_PLAYER_NAME(pc) [19 14] get_escargo_counter -> @GET_TRACY() [19 16] get_status(pc, group) -> @GET_SPECIAL(pc, group) [19 18] get_required_exp(pc) -> @GET_NEXTLEVEL(pc) [19 19] get_inventory(pc, slot) -> @GET_PLAYER_GOODS(pc, slot) [19 1A] get_escargo(slot) -> @GET_TRACY_GOODS(slot) [19 1B] window_option_count(windownum) -> @WIN_CHK_ITEM(windownum) [19 1C] unk_19_1C(arg1, arg2) -> @SET_TRANS_GOODS(arg1, arg2) [19 1D] unk_19_1D(arg1, arg2) -> @GET_TRANS_GOODS(arg1, arg2) [19 1E] get_delta -> @GET_CNUM() [19 1F] get_action_argument -> @GET_CITEM() [19 20] get_party_size -> @GET_MEMBERS() [19 21] get_food_type(itemnum) -> @GET_GOODS_EAT(itemnum) [19 22] get_dir_from_char(pc, type, target) -> @GET_PLAYER_DIR(pc, type, target) [19 23] get_dir_from_npc(npc, type, target) -> @GET_CHAR_DIR(npc, type, target) [19 24] get_dir_from_obj(obj, type, target) -> @GET_GOM_CHAR_DIR(obj, type, target) [19 25] find_condiment(arg) -> @GET_SPICE(arg) [19 26] set_respawn_point(teleportnum) -> @SET_COMEBACK_POS(teleportnum) [19 27] get_stat(statnum) -> (Unused, so we don't have the official name) [19 28] get_stat_letter(statnum) -> @GET_STS_CHAR(statnum) [1A 00] select_char_nocancel(a, b, c, d, e) -> (Unused, so we don't have the official name) [1A 01] select_char(a, b, c, d, e) -> @SEL_PQ(a, b, c, d, e) [1A 04] menu_nocancel -> (Unused, so we don't have the official name) [1A 05] show_inventory(windownum, pc) -> @DSP_PLAYER_GOODS(windownum, pc) [1A 06] show_shop(shopnum) -> @SEL_SHOP_TAKE(shopnum) [1A 07] show_escargo -> @SEL_TRACY_OUT() [1A 08] menu_persist_nocancel -> (Unused, so we don't have the official name) [1A 09] menu_persist -> (Unused, so we don't have the official name) [1A 0A] phone_menu -> @SEL_TEL_GOSUB() [1A 0B] teleport_menu -> (Unused, so we don't have the official name) [1B 00] store_registers -> @SAVE_REG() [1B 01] load_registers -> @LOAD_REG() [1B 02] goto_false(addr) -> @FALSE_GOTO(addr) [1B 03] goto_true(addr) -> @TRUE_GOTO(addr) [1B 04] swap -> @XCHG() [1B 05] store_registers_global -> @SAVE_GLOBAL_REG() [1B 06] load_registers_global -> @LOAD_GLOBAL_REG() [1C 00] text_color(color) -> (Unused, so we don't have the official name) [1C 01] stat(statnum) -> @DSP_STS(statnum) [1C 02] name(pc) -> @DSP_NAME(pc) [1C 03] letter(letternum) -> @DSP_CHAR(letternum) [1C 04] open_hp -> @DSP_PL() [1C 05] itemname(itemnum) -> @DSP_GOODS(itemnum) [1C 06] teleportname(teleportnum) -> (Unused, so we don't have the official name) [1C 07] build_menu_horizontal(count) -> @DSP_ITEM(count) [1C 08 01] smash -> @KMOJI(1) [1C 08 02] youwon -> @KMOJI(2) [1C 09] number_padding(spaces) -> (Unused, so we don't have the official name) [1C 0A] number(value) -> @DSP_NUM(value) [1C 0B] money(value) -> (Unused, so we don't have the official name) [1C 0C] build_menu_vertical(count) -> @DSP_ITEML(count) [1C 0D] user -> @DSP_ACTOR() [1C 0E] target -> @DSP_OBJECT() [1C 0F] delta -> @DSP_CNUM() [1C 11] party_description (JP) -> @DSP_LCNAME() ? [1C 11] do_wordwrap(letternum) (EN) -> (Not used in the early script from the source files) [1C 12] psiname(psinum) -> @DSP_PSI(psinum) [1C 13] battle_anim(animnum) -> @BTLFX(animnum) [1C 14 01] get_attacker_gender -> @GET_ACTOR(1) [1C 14 02] get_attacker_party_size -> @GET_ACTOR(2) [1C 15 01] get_target_gender -> @GET_OBJECT(1) [1C 15 02] get_target_party_size -> @GET_OBJECT(2) [1D 00] give(pc, itemnum) -> @GOODSIN(pc, itemnum) [1D 01] take(pc, itemnum) -> @GOODSOUT(pc, itemnum) [1D 02] is_item_of_type(itemtype) -> @GOODS_TYPE_P(itemtype) [1D 03] notfull(pc) -> @Q_GOODSFULL(pc) [1D 04] hasequipment(pc, itemnum) -> @Q_EQUIP(pc, itemnum) [1D 05] hasitem(pc, itemnum) -> @Q_HAVE(pc, itemnum) [1D 06] deposit(value) -> @DEPOSIT_MONEY_BANK(value) [1D 07] withdraw(value) -> @DRAW_MONEY_BANK(value) [1D 08] givemoney(value) -> @MONEYIN(value) [1D 09] takemoney(value) -> @MONEYOUT(value) [1D 0A] get_item_price(itemnum) -> @GOODS_TAKE_MONEY(itemnum) [1D 0B] get_item_sell_price(itemnum) -> @GOODS_SELL_MONEY(itemnum) [1D 0C] can_store_item(pc, slot) -> @Q_TRACY(pc, slot) [1D 0D] has_status(pc, group, status) -> @Q_SPECIAL(pc, group, status) [1D 0E] give_return_slot(pc, itemnum) -> @GOODSIN_PLAYER(pc, itemnum) [1D 0F] take_slot(pc, slot) -> @GOODSOUT_PLAYER(pc, slot) [1D 10] is_slot_equipped(pc, slot) -> (Unused, so we don't have the official name) [1D 11] can_equip_slot(pc, slot) -> @Q_EQUIP_PLAYER_GOODS(pc, slot) [1D 12] store_slot(pc, slot) -> @TRACY_IN_GOODS(pc, slot) [1D 13] withdraw_item(pc, slot) -> @TRACY_OUT_GOODS(pc, slot) [1D 14] hasmoney(value) -> @Q_MONEY(value) [1D 15] number_per_person(value) -> @MUL_ACTIVE_PLAYER(value) [1D 17] hashas_bankmoney(value) -> @Q_BANK_MONEY(value) [1D 18] store_item(itemnum) -> @TRACY_IN(itemnum) [1D 19] check_party_size(count) -> @Q_MEMBER(count) [1D 20] is_self_targetting -> @Q_SELF() [1D 21] rand_range(max) -> @RAND(max) [1D 22] can_use_exit_mouse -> @Q_DUNGEON() [1D 23] get_item_type(itemnum) -> @Q_EQUIP_ATTR(itemnum) [1D 24] get_earned_money(arg) -> @Q_FIGHT_MONEY(arg) [1E 00] heal_percent(pc, percent) -> @HP_UP(pc, percent) [1E 01] hurt_percent(pc, percent) -> @HP_DOWN(pc, percent) [1E 02] heal(pc, amount) -> (Unused, so we don't have the official name) [1E 03] hurt(pc, amount) -> (Unused, so we don't have the official name) [1E 04] recoverpp_percent(pc, percent) -> @PP_UP(pc, percent) [1E 05] consumepp_percent(pc, percent) -> @PP_DOWN(pc, percent) [1E 06] recoverpp(pc, amount) -> (Unused, so we don't have the official name) [1E 07] consumepp(pc, amount) -> (Unused, so we don't have the official name) [1E 08] change_level(pc, level) -> @SET_LEVEL(pc, level) [1E 09] boost_exp(pc, amount) -> @EXP_UP_POINT(pc, amount) [1E 0A] boost_iq(pc, amount) -> @IQ_UP_POINT(pc, amount) [1E 0B] boost_guts(pc, amount) -> @GUTS_UP_POINT(pc, amount) [1E 0C] boost_speed(pc, amount) -> @SPEED_UP_POINT(pc, amount) [1E 0D] boost_vitality(pc, amount) -> @VITAL_UP_POINT(pc, amount) [1E 0E] boost_luck(pc, amount) -> @LUCK_UP_POINT(pc, amount) [1F 00] music(musicnum) -> @BGMSTART(musicnum) [1F 01] music_stop(arg) -> @BGMSTOP(arg) [1F 02] sound(soundnum) -> @SE(soundnum) [1F 03] music_resume -> @MUSISTART() [1F 04] text_blips(arg) -> @MESSAGE_SOUND(arg) [1F 05] music_switching_off -> (This is used in the final game, but I couldn't find it on the source files...) [1F 06] music_switching_on -> (Unused, so we don't have the official name) [1F 07] music_effect(effectnum) -> @BGM_EFFECT(effectnum) [1F 11] party_add(pc) -> @ADD_PARTY(pc) [1F 12] party_remove(pc) -> @DEL_PARTY(pc) [1F 13] char_direction(pc, direction) -> @SET_PLAYER_DIR(pc, direction) [1F 14] party_direction(direction) -> @SET_PARTY_DIR(direction) [1F 15] create_sprite(spr, scr, style) -> @MOVE_GOM_CHAR(spr, src, style) [1F 16] npc_direction(npc, direction) -> @SET_CHAR_DIR(npc, direction) [1F 17] create_npc(npc, scr, style) -> @MOVE_CHAR(npc, src, style) [1F 18] nop1 -> (Unused, so we don't have the official name) [1F 19] nop2 -> (Unused, so we don't have the official name) [1F 1A] show_npc_emote(npc, emotenum) -> @SHOW_MANPU_CHAR(npc, emotenum) [1F 1B] delete_npc_emote(npc) -> @HIDE_MANPU_CHAR(npc) [1F 1C] show_char_emote(pc, emotenum) -> @SHOW_MANPU_PLAYER(pc, emotenum) [1F 1D] delete_char_emote(pc) -> @HIDE_MANPU_PLAYER(pc) [1F 1E] delete_npc(npc, style) -> @HIDE_CHAR(npc, style) [1F 1F] delete_sprite(spr, style) -> @HIDE_GOM_CHAR(spr, style) [1F 20] teleport(teleportnum, style) -> @TELEPORT(teleportnum, style) [1F 21] warp(warpnum) -> @WARP(warpnum) [1F 23] start_battle(group) -> @BATTLE(group) [1F 30] font_normal -> @FONTSTD() [1F 31] font_saturn -> @FONTBAKA() [1F 40] nop3 -> (Unused, so we don't have the official name) [1F 41 01] show_coffee -> @FUNC(1) [1F 41 02] show_tea -> @FUNC(2) [1F 41 03] register_player_name -> @FUNC(3) [1F 41 04] register_player_name_kana -> @FUNC(4) [1F 41 05] set_oss_flag -> @FUNC(5) [1F 41 06] reset_oss_flag -> @FUNC(6) [1F 41 07] try_show_map -> @FUNC(7) [1F 41 08] is_attacker_enemy -> @FUNC(8) [1F 41 09] sound_stone -> @FUNC(9) [1F 41 0A] show_title_screen -> @FUNC(10) [1F 41 0B] show_cast -> @FUNC(11) [1F 41 0C] show_credits -> @FUNC(12) [1F 41 0D] start_rolling_meter -> @FUNC(13) [1F 41 0E] stop_rolling_meter -> @FUNC(14) [1F 41 0F] unset_all_flags -> @FUNC(15) [1F 41 10] sound_stone_full -> @FUNC(16) [1F 41 11] attempt_homesickness -> @FUNC(17) [1F 41 12] kick_out_of_bicycle -> @FUNC(18) [1F 41] event(eventnum) -> @FUNC(eventnum) [1F 50] disable_input -> @DISKEY() [1F 51] enable_input -> (Unused, so we don't have the official name) [1F 52] number_input(digits) -> @INPUT(digits) [1F 60] wait_input_timeout(frames) -> @WKEY(frames) [1F 61] wait_movement -> @WAITSYS() [1F 62] set_prompt(arg) -> @SET_BTL_MSG(arg) [1F 63] on_map_refresh(text) -> (Couldn't find this. There seems to be a whole message file missing for the door scripts, $C9992F to $C9B225) [1F 64] backup_party -> @SAVE_STORY() [1F 65] restore_party -> @LOAD_STORY() [1F 66] enable_hotspot(slot, hotspot, text) -> @SET_HIT_RECT(slot, hotspot, text) [1F 67] disable_hotspot(slot) -> @RES_HIT_RECT(slot) [1F 68] set_exit_mouse -> (Couldn't find this. See [1F 63]) [1F 69] warp_exit_mouse -> @WARP_MOUSE_POS() [1F 71] learn_psi(pc, psi) -> @ADD_PSI(pc, psi) [1F 81] usable -> (Unused, so we don't have the official name) [1F 83] equip_slot(pc, slot) -> @EQUIP_PLAYER_GOODS(pc, slot) [1F 90] select_phone -> (Unused, so we don't have the official name) [1F A0] open_present -> @SETF_MSG() [1F A1] close_present -> @RESF_MSG() [1F A2] is_present_open -> @CHKF_MSG() [1F B0] save_game -> @SAVE_GAME() [1F C0] switch_call(addr ...) -> @ONGOSUB(addr ...) [1F D0] attempt_fix_item(chance) -> @REPAIR(chance) [1F D1] get_truffle_dir -> @SEARCH_TRUFFLE() [1F D2] show_photographer(photonum) -> @TAKE_PHOTO(photonum) [1F D3] timed_event(eventnum) -> @DELIVERY(eventnum) [1F E1] set_map_pal(tileset, palette, speed) -> @SET_PALLETSET(tileset, palette, speed) [1F E4] set_sprite_direction(spr, direction) -> @SET_GOM_CHAR_DIR(spr, direction) [1F E5] freeze_char(pc) -> @COLD_PLAYER(pc) [1F E6] freeze_npc(npc) -> @COLD_CHAR(npc) [1F E7] freeze_sprite(spr) -> @COLD_GOM_CHAR(spr) [1F E8] unfreeze_char(pc) -> @FRESH_PLAYER(pc) [1F E9] unfreeze_npc(npc) -> @FRESH_CHAR(npc) [1F EA] unfreeze_sprite(spr) -> @FRESH_GOM_CHAR(spr) [1F EB] hide_char(pc, style) -> @HIDE_PLAYER(pc, style) [1F EC] show_char(pc, style) -> @SHOW_PLAYER(pc, style) [1F ED] camera_restore -> @SET_CAMERA_PARTY() [1F EE] camera_focus_npc(npc) -> @SET_CAMERA_CHAR(npc) [1F EF] camera_focus_sprite(spr) -> @SET_CAMERA_GOM_CHAR(spr) [1F F0] get_on_bike -> @RIDE_CYCLE() [1F F1] set_npc_movement(npc, scr) -> @REMOVE_CHAR(npc, scr) [1F F2] set_sprite_movement(spr, scr) -> @REMOVE_GOM_CHAR(spr, scr) [1F F3] show_sprite_emote(spr, emotenum) -> @SHOW_MANPU_GOM_CHAR(spr, emotenum) [1F F4] delete_sprite_emote(spr) -> @HIDE_MANPU_GOM_CHAR(spr)