|
| 1 | +| Hex| Dec | Original Mnemonic | ttydasm Mnemonic | Summary |
| 2 | ++----+-----+---------------------+------------------------+------------------------------------- |
| 3 | +| 00 | 0 | | | Internal - fetch next instruction |
| 4 | +| 01 | 1 | | end | Script End |
| 5 | +| 02 | 2 | end_evt | return | Return |
| 6 | +| 03 | 3 | lbl | <label number>: | NOP in execution, defines label during script context initialization (1 parm which is the label ID) |
| 7 | +| 04 | 4 | goto | goto | goto label or address |
| 8 | +| 05 | 5 | do | loop | Begin Loop |
| 9 | +| 06 | 6 | while | end_loop | Loop stack iterate |
| 10 | +| 07 | 7 | do_break | loop_break | break; from loop |
| 11 | +| 08 | 8 | do_continue | loop_continue | continue; from loop |
| 12 | +| 09 | 9 | wait_frm | wait_frames | Wait for frames |
| 13 | +| 0A | 10 | wait_msec | wait_ms | Wait for ms |
| 14 | +| 0B | 11 | halt | wait_until | Wait until expr is false |
| 15 | +| 0C | 12 | if_str_equal | if_string_eq | if parm strings equal |
| 16 | +| 0D | 13 | if_str_not_equal | if_string_ne | if parm strings not equal |
| 17 | +| 0E | 14 | if_str_small | if_string_lt | if parm strings lt |
| 18 | +| 0F | 15 | if_str_large | if_string_gt | if parm strings gt |
| 19 | +| 10 | 16 | if_str_small_equal | if_string_le | if parm strings le |
| 20 | +| 11 | 17 | if_str_large_equal | if_string_ge | if parm strings ge |
| 21 | +| 12 | 18 | iff_equal | if_float_eq | if parm floats eq |
| 22 | +| 13 | 19 | iff_not_equal | if_float_ne | if parm floats ne |
| 23 | +| 14 | 20 | iff_small | if_float_lt | if parm floats lt |
| 24 | +| 15 | 21 | iff_large | if_float_gt | if parm floats gt |
| 25 | +| 16 | 22 | iff_small_equal | if_float_le | if parm floats le |
| 26 | +| 17 | 23 | iff_large_equal | if_float_ge | if parm floats ge |
| 27 | +| 18 | 24 | if_equal | if_int_eq | if parm ints eq |
| 28 | +| 19 | 25 | if_not_equal | if_int_ne | if parm ints ne |
| 29 | +| 1A | 26 | if_small | if_int_lt | if parm ints lt |
| 30 | +| 1B | 27 | if_large | if_int_gt | if parm ints gt |
| 31 | +| 1C | 28 | if_small_equal | if_int_le | if parm ints le |
| 32 | +| 1D | 29 | if_large_equal | if_int_ge | if parm ints ge |
| 33 | +| 1E | 30 | if_flag | if_bits_set | if parm int AND with raw is nonzero |
| 34 | +| 1F | 31 | if_not_flag | if_bits_clear | if parm int AND with raw is zero |
| 35 | +| 20 | 32 | else | else | else |
| 36 | +| 21 | 33 | end_if | endif | endif |
| 37 | +| 22 | 34 | switch | switchi | switch expression |
| 38 | +| 23 | 35 | switchi | switchr | switch raw ? looks broken, not accounted for in other switch functions and not used by the game. dont use. |
| 39 | +| 24 | 36 | case_equal | case_int_eq | case var equal to int |
| 40 | +| 25 | 37 | case_not_equal | case_int_ne | case var not equal to int |
| 41 | +| 26 | 38 | case_small | case_int_lt | case var less than int |
| 42 | +| 27 | 39 | case_large | case_int_gt | case var greater than int |
| 43 | +| 28 | 40 | case_small_equal | case_int_le | case var less equal than int |
| 44 | +| 29 | 41 | case_large_equal | case_int_ge | case var greater equal int |
| 45 | +| 2A | 42 | case_etc | case_default | case default |
| 46 | +| 2B | 43 | case_or | case_int_eq_any | case eq combo (one condition must be met) |
| 47 | +| 2C | 44 | case_and | case_int_ne_all | case ne combo (all conditions must be met) |
| 48 | +| 2D | 45 | case_flag | case_bits_set | case and with binary mask |
| 49 | +| 2E | 46 | case_end | end_multi_case | break from case combo |
| 50 | +| 2F | 47 | case_between | case_int_range | case range a to b inclusive |
| 51 | +| 30 | 48 | switch_break | switch_break | break from switch |
| 52 | +| 31 | 49 | end_switch | end_switch | end switch |
| 53 | +| 32 | 50 | set | setii | set int expr to int expr |
| 54 | +| 33 | 51 | seti | setir | set int expr to raw |
| 55 | +| 34 | 52 | setf | setff | set float expr to float expr |
| 56 | +| 35 | 53 | add | addi | add parm ints, save in first parm |
| 57 | +| 36 | 54 | sub | subi | sub parm ints, save in first parm |
| 58 | +| 37 | 55 | mul | muli | mul parm ints, save in first parm |
| 59 | +| 38 | 56 | div | divi | div parm ints, save in first parm |
| 60 | +| 39 | 57 | mod | modi | modulus, save in first parm |
| 61 | +| 3A | 58 | addf | addf | add parm floats, save in first parm |
| 62 | +| 3B | 59 | subf | subf | sub parm floats, save in first parm |
| 63 | +| 3C | 60 | mulf | mulf | mul parm floats, save in first parm |
| 64 | +| 3D | 61 | divf | divf | div parm floats, save in first parm |
| 65 | +| 3E | 62 | set_read | mo_set_base_int | set struc op base |
| 66 | +| 3F | 63 | read | mo_read_int | load int from struc op and advance |
| 67 | +| 40 | 64 | read2 | mo_read_int2 | load int vec2 from struc op and advance |
| 68 | +| 41 | 65 | read3 | mo_read_int3 | load int vec3 from struc op and advance |
| 69 | +| 42 | 66 | read4 | mo_read_int4 | load int vec4 from struc op and advance |
| 70 | +| 43 | 67 | read_n | mo_read_int_indexed | load indexed int from struc op |
| 71 | +| 44 | 68 | set_readf | mo_set_base_float | same as 3E, set struc op base |
| 72 | +| 45 | 69 | readf | mo_read_float | load float from struc op and advance |
| 73 | +| 46 | 70 | readf2 | mo_read_float2 | load float vec2 from struc op to exprs and advance |
| 74 | +| 47 | 71 | readf3 | mo_read_float3 | load float vec3 from struc op to exprs and advance |
| 75 | +| 48 | 72 | readf4 | mo_read_float4 | load float vec4 from struc op to exprs and advance |
| 76 | +| 49 | 73 | readf_n | mo_read_float_indexed | load indexed float from struc op |
| 77 | +| 4A | 74 | set_user_wrk | set_uw_base | set user word base (UW) |
| 78 | +| 4B | 75 | set_user_flg | set_uf_base | set user flag base (UF) |
| 79 | +| 4C | 76 | alloc_user_wrk | alloc_uw | allocate to UW base |
| 80 | +| 4D | 77 | and | andi | binary and expr |
| 81 | +| 4E | 78 | andi | andr | binary and raw |
| 82 | +| 4F | 79 | or | ori | binary or expr |
| 83 | +| 50 | 80 | ori | orr | binary or raw |
| 84 | +| 51 | 81 | set_frame_from_msec | cvt_ms_f | convert ms to frame count (fast multiply by 60/1000) |
| 85 | +| 52 | 82 | set_mesc_from_frame | cvt_f_ms | convert frame count to ms (fast multiply by 1000/60) |
| 86 | +| 53 | 83 | set_ram | storei | store int expr to pointer as dword |
| 87 | +| 54 | 84 | set_ramf | storef | store float expr to pointer as float |
| 88 | +| 55 | 85 | get_ram | loadi | set int expr to int pointer val |
| 89 | +| 56 | 86 | get_ramf | loadf | set float expr to float pointer val |
| 90 | +| 57 | 87 | setr | storei_ind | set int expr indirect to int (**out = *in) |
| 91 | +| 58 | 88 | setrf | storef_ind | set int expr indirect to float (**out = *in) |
| 92 | +| 59 | 89 | getr | loadi_ind | set int expr to expr indirect (*out = **in) |
| 93 | +| 5A | 90 | getrf | loadf_ind | set float expr to expr indirect (*out = **in) |
| 94 | +| 5B | 91 | user_func | callc | call C++ function |
| 95 | +| 5C | 92 | run_evt | callsa | call script async |
| 96 | +| 5D | 93 | run_evt_id | callsa_tid | call script async and save TID |
| 97 | +| 5E | 94 | run_child_evt | callss | call script sync |
| 98 | +| 5F | 95 | delete_evt | stop_tid | terminate thread |
| 99 | +| 60 | 96 | restart_evt | jump | ? jump to pointer |
| 100 | +| 61 | 97 | set_pri | set_thread_priority | ? set execution order (unused) |
| 101 | +| 62 | 98 | set_spd | set_thread_quantum | set time scale |
| 102 | +| 63 | 99 | set_type | set_thread_type_mask | set type mask |
| 103 | +| 64 | 100 | stop_all | suspend_types | suspend all threads of type |
| 104 | +| 65 | 101 | start_all | resume_types | resume all threads of type |
| 105 | +| 66 | 102 | stop_other | suspend_types_other | suspend other threads of type |
| 106 | +| 67 | 103 | start_other | resume_types_other | resume other threads of type |
| 107 | +| 68 | 104 | stop_id | suspend_tid | suspend thread by ID |
| 108 | +| 69 | 105 | start_id | resume_tid | resume thread by ID |
| 109 | +| 6A | 106 | chk_evt | check_thread_running | checks if a thread is still running by TID (expr) |
| 110 | +| 6B | 107 | inline_evt | begin_thread | Start thread |
| 111 | +| 6C | 108 | inline_evt_id | begin_thread_tid | Start thread & save TID |
| 112 | +| 6D | 109 | end_inline | end_thread | End thread |
| 113 | +| 6E | 110 | brother_evt | begin_child_thread | Start child thread |
| 114 | +| 6F | 111 | brother_evt_id | begin_child_thread_tid | Start child thread & save TID |
| 115 | +| 70 | 112 | end_brother | end_child_thread | End child thread |
| 116 | +| 71 | 113 | debug_put_msg | dbg_report | output debug string |
| 117 | +| 72 | 114 | debug_msg_clear | | ? NOP |
| 118 | +| 73 | 115 | debug_put_reg | dbg_expr_to_string | Convert expression to debug string |
| 119 | +| 74 | 116 | debug_name | | ? set debug mode |
| 120 | +| 75 | 117 | debug_rem | | ? NOP |
| 121 | +| 76 | 118 | debug_bp | | ? searches for a script context, then doesn't care about the results anyways. |
| 122 | +| 77 | 119 | | | unused |
| 123 | +| 78 | 120 | | | unused |
| 124 | +| 79 | 121 | | | unused |
| 125 | +| 7A | 122 | | | unused |
| 126 | +| 7B | 123 | | | unused |
| 127 | +| 7C | 124 | | | unused |
| 128 | +| 7D | 125 | | | unused |
| 129 | +| 7E | 126 | | | unused |
| 130 | +| 7F | 127 | | | unused |
| 131 | +| 80 | 128 | | | unused |
| 132 | +| 81 | 129 | | | unused |
| 133 | +| 82 | 130 | | | unused |
| 134 | +| 83 | 131 | | | unused |
| 135 | +| 84 | 132 | | | unused |
| 136 | +| 85 | 133 | | | unused |
| 137 | +| 86 | 134 | | | unused |
| 138 | +| 87 | 135 | | | unused |
| 139 | +| 88 | 136 | | | unused |
| 140 | +| 89 | 137 | | | unused |
| 141 | +| 8A | 138 | | | unused |
| 142 | +| 8B | 139 | | | unused |
| 143 | +| 8C | 140 | | | unused |
| 144 | +| 8D | 141 | | | unused |
| 145 | +| 8E | 142 | | | unused |
| 146 | +| 8F | 143 | | | unused |
| 147 | +| 90 | 144 | | | unused |
| 148 | +| 91 | 145 | | | unused |
| 149 | +| 92 | 146 | | | unused |
| 150 | +| 93 | 147 | | | unused |
| 151 | +| 94 | 148 | | | unused |
| 152 | +| 95 | 149 | | | unused |
| 153 | +| 96 | 150 | | | unused |
| 154 | +| 97 | 151 | | | unused |
| 155 | +| 98 | 152 | | | unused |
| 156 | +| 99 | 153 | | | unused |
| 157 | +| 9A | 154 | | | unused |
| 158 | +| 9B | 155 | | | unused |
| 159 | +| 9C | 156 | | | unused |
| 160 | +| 9D | 157 | | | unused |
| 161 | +| 9E | 158 | | | unused |
| 162 | +| 9F | 159 | | | unused |
| 163 | +| A0 | 160 | | | unused |
| 164 | +| A1 | 161 | | | unused |
| 165 | +| A2 | 162 | | | unused |
| 166 | +| A3 | 163 | | | unused |
| 167 | +| A4 | 164 | | | unused |
| 168 | +| A5 | 165 | | | unused |
| 169 | +| A6 | 166 | | | unused |
| 170 | +| A7 | 167 | | | unused |
| 171 | +| A8 | 168 | | | unused |
| 172 | +| A9 | 169 | | | unused |
| 173 | +| AA | 170 | | | unused |
| 174 | +| AB | 171 | | | unused |
| 175 | +| AC | 172 | | | unused |
| 176 | +| AD | 173 | | | unused |
| 177 | +| AE | 174 | | | unused |
| 178 | +| AF | 175 | | | unused |
| 179 | +| B0 | 176 | | | unused |
| 180 | +| B1 | 177 | | | unused |
| 181 | +| B2 | 178 | | | unused |
| 182 | +| B3 | 179 | | | unused |
| 183 | +| B4 | 180 | | | unused |
| 184 | +| B5 | 181 | | | unused |
| 185 | +| B6 | 182 | | | unused |
| 186 | +| B7 | 183 | | | unused |
| 187 | +| B8 | 184 | | | unused |
| 188 | +| B9 | 185 | | | unused |
| 189 | +| BA | 186 | | | unused |
| 190 | +| BB | 187 | | | unused |
| 191 | +| BC | 188 | | | unused |
| 192 | +| BD | 189 | | | unused |
| 193 | +| BE | 190 | | | unused |
| 194 | +| BF | 191 | | | unused |
| 195 | +| C0 | 192 | | | unused |
| 196 | +| C1 | 193 | | | unused |
| 197 | +| C2 | 194 | | | unused |
| 198 | +| C3 | 195 | | | unused |
| 199 | +| C4 | 196 | | | unused |
| 200 | +| C5 | 197 | | | unused |
| 201 | +| C6 | 198 | | | unused |
| 202 | +| C7 | 199 | | | unused |
| 203 | +| C8 | 200 | | | unused |
| 204 | +| C9 | 201 | | | unused |
| 205 | +| CA | 202 | | | unused |
| 206 | +| CB | 203 | | | unused |
| 207 | +| CC | 204 | | | unused |
| 208 | +| CD | 205 | | | unused |
| 209 | +| CE | 206 | | | unused |
| 210 | +| CF | 207 | | | unused |
| 211 | +| D0 | 208 | | | unused |
| 212 | +| D1 | 209 | | | unused |
| 213 | +| D2 | 210 | | | unused |
| 214 | +| D3 | 211 | | | unused |
| 215 | +| D4 | 212 | | | unused |
| 216 | +| D5 | 213 | | | unused |
| 217 | +| D6 | 214 | | | unused |
| 218 | +| D7 | 215 | | | unused |
| 219 | +| D8 | 216 | | | unused |
| 220 | +| D9 | 217 | | | unused |
| 221 | +| DA | 218 | | | unused |
| 222 | +| DB | 219 | | | unused |
| 223 | +| DC | 220 | | | unused |
| 224 | +| DD | 221 | | | unused |
| 225 | +| DE | 222 | | | unused |
| 226 | +| DF | 223 | | | unused |
| 227 | +| E0 | 224 | | | unused |
| 228 | +| E1 | 225 | | | unused |
| 229 | +| E2 | 226 | | | unused |
| 230 | +| E3 | 227 | | | unused |
| 231 | +| E4 | 228 | | | unused |
| 232 | +| E5 | 229 | | | unused |
| 233 | +| E6 | 230 | | | unused |
| 234 | +| E7 | 231 | | | unused |
| 235 | +| E8 | 232 | | | unused |
| 236 | +| E9 | 233 | | | unused |
| 237 | +| EA | 234 | | | unused |
| 238 | +| EB | 235 | | | unused |
| 239 | +| EC | 236 | | | unused |
| 240 | +| ED | 237 | | | unused |
| 241 | +| EE | 238 | | | unused |
| 242 | +| EF | 239 | | | unused |
| 243 | +| F0 | 240 | | | unused |
| 244 | +| F1 | 241 | | | unused |
| 245 | +| F2 | 242 | | | unused |
| 246 | +| F3 | 243 | | | unused |
| 247 | +| F4 | 244 | | | unused |
| 248 | +| F5 | 245 | | | unused |
| 249 | +| F6 | 246 | | | unused |
| 250 | +| F7 | 247 | | | unused |
| 251 | +| F8 | 248 | | | unused |
| 252 | +| F9 | 249 | | | unused |
| 253 | +| FA | 250 | | | unused |
| 254 | +| FB | 251 | | | unused |
| 255 | +| FC | 252 | | | unused |
| 256 | +| FD | 253 | | | unused |
| 257 | +| FE | 254 | | | unused |
| 258 | +| FF | 255 | | | unused |
0 commit comments