-
Notifications
You must be signed in to change notification settings - Fork 6
/
HK3_INT.SRC
executable file
·385 lines (292 loc) · 6.5 KB
/
HK3_INT.SRC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
;************************************************************************
;* *
;* *HK3 COMMAND INTERRUPT PROGRAM *
;* presented by k.morikawa *
;* 1992/4/3~ *
;************************************************************************
XREF ?A5
SECT HK3,,C
;by HK3
XREF ACTION_PROG
;by HK3_SUB
XREF TYPE1_SET,TYPE2_SET,SET_RD16
INCLUDE GAME_SYM.INC @@@
INCLUDE LABEL.INC
INCLUDE HFLAG.INC
INCLUDE EM_MAC2.INC
;************************************************************************
;
; action command interrupt program
; 1992/3/4
XDEF COM_INT
COM_INT:
MOVE EM_INT(A6),D0
CMP #1,D0
BNE COM_INT_OPE
CLR EM_INT(A6)
RTS
COM_INT_OPE:
D0R_ADD
LEA.L ACTION_PROG,A0
MOVE.L (A0,D0),A0
JMP (A0)
XDEF COM_INT1
;
; *now_player lock
;
COM_INT1:
MOVE.W #0,ACT_COM(A6)
ANDI.B #11111000B,PLAYER_CONTROL(A6)
; JOB_CLEAR
CLR EM_INT(A6)
RTS
XDEF COM_INT2
;
; *command_data_skip
;
COM_INT2:
RTS
MOVE.W ACT_COM(A6),D0
SUBQ.W #2,D0
BNE A2_SKIP_1
ADD.L #1,ACTION_ADRS(A6)
A2_SKIP_1:
SUBQ.W #3,D0
BNE A2_SKIP_2
ADD.L #1,ACTION_ADRS(A6)
A2_SKIP_2
CMP.B #3,1(A0)
BNE ADRS_SKIP
ADD.L #4,ACTION_ADRS(A6)
ADRS_SKIP:
CLR EM_INT(A6)
; JOB_CLEAR
RTS
XDEF COM_INT3
;
; *com_ope interrupt
; action_data creative program
; 1992/5/28
;
COM_INT3:
RTS
XDEF COM_INT4
;
; *com_ope interrupt
; act_operation checker program
; 1992/6/4~6/10
;
COM_INT4:
MOVE.W #11000000B,D0
AND.B PLAYER_CONTROL(A6),D0
BEQ COM_INT4_NEXT
BTST.B #BHS_JUMP,HERO_STATE+HERO_OFFSET(A6)
BEQ COM_INT4_END
ADD.B D0,D0
BCS.L LANDING_CHECK
MOVE.W ACT_COM(A6),D0
BEQ.L COM_OPE_CLEAR
SUBQ.W #1,D0
BEQ.L COM_OPE_CLEAR
COM_INT4_NEXT:
MOVE.L ACTION_ADRS(A6),A0
MOVE.W ACT_COM(A6),D0
ADD.W D0,D0
LEA.L CHECKER_PROG(PC),A1
ADDA.W (A1,D0),A1
JMP (A1)
CHECKER_PROG:
DC.W CHK_SKIP-CHECKER_PROG ;0
DC.W CHK_ACT1-CHECKER_PROG ;1
DC.W CHK_ACT2-CHECKER_PROG ;2
DC.W CHK_ACT3-CHECKER_PROG ;3
DC.W CHK_ACT4-CHECKER_PROG ;4
DC.W CHK_ACT5-CHECKER_PROG ;5
DC.W CHK_ACTS0-CHECKER_PROG ;6
DC.W CHK_ACTS1-CHECKER_PROG ;7
DC.W CHK_ACTS2-CHECKER_PROG ;8
DC.W CHK_ACTS3-CHECKER_PROG ;9
DC.W CHK_ACTS4-CHECKER_PROG ;10
DC.W CHK_ACTS5-CHECKER_PROG ;11
DC.W CHK_ACTS0-CHECKER_PROG ;12
DC.W CHK_SKIP-CHECKER_PROG ;13
;
; *************************************
;
CHK_ACT1:
CMP.B #0F0H,(A0)
BEQ.L SUB_ACT_CHK
MOVE.W #11H,D0
SUB.B (A0),D0
BEQ COM_INT4_SET
MOVE.W #21H,D0
SUB.B (A0),D0
BEQ COM_INT4_SET
CHK_ACTS0:
CHK_ACTS1:
BRA COM_OPE_CLEAR
CHK_SKIP:
RTS
SUB_ACT_CHK:
MOVEQ.L #0,D0
MOVE.B 1(A0),D0
LEA.L SUB_CHK_TBL(PC),A1
TST.B (A1,D0)
BEQ.L COM_OPE_CLEAR
MOVE.B 3(A0),D0 ;jump_kick or jump_punch code check
MOVEQ.L #11H,D1
SUB.B D0,D1
BEQ.S COM_INT4_SET
MOVEQ.L #21H,D1
SUB.B D0,D1
BEQ COM_INT4_SET
BRA COM_OPE_CLEAR
SUB_CHK_TBL:; 0:1:2:3:4,5
DC.B 0,0,0,1,1,1
; *************************************
CHK_ACT3:
CHK_ACT4:
CHK_ACT5:
CHK_ACTS3:
CHK_ACTS4:
CHK_ACTS5:
MOVE #11H,D0
SUB.B SUCCESS_LEVER(A6),D0
BEQ.S COM_INT4_SET
MOVE #21H,D0
SUB.B SUCCESS_LEVER(A6),D0
BEQ COM_INT4_SET
BRA COM_OPE_CLEAR
CHK_ACT2:
CHK_ACTS2:
MOVE #11H,D0
CMP.B SUCCESS_LEVER(A6),D0
BEQ COM_INT4_SET
CMP.B FAIL_LEVER(A6),D0
BEQ COM_INT4_SET
MOVE #21H,D0
CMP.B SUCCESS_LEVER(A6),D0
BEQ COM_INT4_SET
CMP.B FAIL_LEVER(A6),D0
BEQ COM_INT4_SET
BRA COM_OPE_CLEAR
; *************************************
COM_INT4_SET:
BSET.B #6,PLAYER_CONTROL(A6)
RTS
XDEF LANDING_CHECK
LANDING_CHECK:
LEA.L INT4_TBL(PC),A1
MOVEQ.L #0,D0
MOVE ACT_CTRL+HERO_OFFSET(A6),D0
BEQ.S INT4_NEXT_1
TST.B (A1,D0)
BEQ.S COM_INT4_END
INT4_NEXT_1:
CMP.B #0CH,D0
BNE INT4_NEXT_3
BSET.B #COM_RESULT_END,PLAYER_CONTROL(A6)
INT4_NEXT_3:
RTS
COM_INT4_END:
BTST.B #4,HERO_STATE+HERO_OFFSET(A6)
BNE.S INT4_NEXT_2
ANDI.B #00111000B,PLAYER_CONTROL(A6)
CLR EM_INT(A6)
INT4_NEXT_2:
RTS
XDEF INT4_TBL
INT4_TBL:; 0:1:2:3:4:5:6:7:8:9:A:B:C:D:E:F
DC.B 0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,0 ;0 <**
DC.B 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0 ;1
DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;2
DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;3
DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;4
DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;5
DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;6
DC.B 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;7
COM_OPE_CLEAR:
ORI.B #10000100B,PLAYER_CONTROL(A6) <**
; BSET.B #7,PLAYER_CONTROL(A6)
RTS
;************************************************************************
XDEF SPECIAL_CHECKER
;
; enemy_type checker_program
; 1992/3/4
SPECIAL_CHECKER:
LEA.L EM_JUDGE_VECTOR(PC),A0
MOVE HERO_TYPE+HERO_OFFSET(A6),D3
ADD D3,D3
ADDA (A0,D3),A0
JSR (A0)
; BNE NML_STA_NEXT
;
; JOB_CHG SC_LIM_JOB
;NML_STA_NEXT:
RTS
EM_JUDGE_VECTOR: ;type
DC.W HR1_JUDGE-EM_JUDGE_VECTOR ;0
DC.W HR2_JUDGE-EM_JUDGE_VECTOR ;1
DC.W EM1_JUDGE-EM_JUDGE_VECTOR ;2
DC.W EM2_JUDGE-EM_JUDGE_VECTOR ;3
DC.W EM3_JUDGE-EM_JUDGE_VECTOR ;4
DC.W EM4_JUDGE-EM_JUDGE_VECTOR ;5
DC.W EM5_JUDGE-EM_JUDGE_VECTOR ;6
DC.W EM6_JUDGE-EM_JUDGE_VECTOR ;7
DC.W EM7_JUDGE-EM_JUDGE_VECTOR ;8
DC.W EM7_JUDGE-EM_JUDGE_VECTOR ;9
;
; non_reaction
;
HR1_JUDGE:
HR2_JUDGE:
EM1_JUDGE:
EM3_JUDGE:
EM6_JUDGE:
EM7_JUDGE:
MOVEQ.L #0,D0
RTS
EM8_JUDGE:
MOVEQ.L #0,D0
RTS
MOVE.L ANOTHER_PLAYER(A6),A0
MOVE X_POSITION+HERO_OFFSET(A6),D0
MOVE X_POSITION+HERO_OFFSET(A6),D1
MOVEQ.L #0,D3 ;judge_type
MOVE #0FFE0H,D2 ;frame_position check(near)
AND D0,D2
BEQ E8_JD_1
ADDQ #1,D3
E8_JD_1:
MOVE #0FFE0H,D2 ;frame_position check(near)
AND D1,D2
BEQ E8_JD_2
ADDQ #1,D3
E8_JD_2:
; MOVEQ.L #3AH,D4
; JMP CTRL_CHANGE(PC) ;move_chg
EM2_JUDGE:
EM4_JUDGE:
EM5_JUDGE:
MOVEQ.L #0,D0
RTS
TST.B OBJECT_WORK(A6)
BEQ.S OBJ_JUDGE_END
MOVEQ.L #0,D0
MOVE.B 0(A0,D0.W),D0
BEQ.S OBJ_JUDGE_END
CLR.W (A5)
MOVE.B OBJECT_WORK(A6),(A5)
MOVE.W (A5),D0
MOVE.L (A5,D0),A0 ;fornt object_physical_work
MOVE.W X_POSITION(A0),D0
; JSR EM_OBEJCT_SRCH(PC)
JOB_INIT_SET
; BSET.B ?????
OBJ_JUDGE_END:
RTS
;************************************************************************
INCLUDE WORK.INC
;************************************************************************