PHASE.SRC 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. ************************************************************************
  2. * *
  3. * 044 [RYUUKO NO KEN] *
  4. * PHASE CONTROL PROGRAM *
  5. * by S.OKADA from 92/05/26 Tue 10:25 *
  6. * *
  7. ************************************************************************
  8. XDEF PHASE_CTRL,PHASE_ALL_INIT
  9. XDEF PLAYER_START
  10. XDEF ACTIVE_TRIGER
  11. XDEF PLAYER_INIT_VS
  12. XREF ?A5
  13. ;by DEMO_CML
  14. XREF DEMO_GAME,INIT_DEMO_GAME
  15. XREF TITLE,INIT_TITLE,TITLE_ONLY,INIT_TITLE_ONLY
  16. XREF INIT_HOW_TO_STORY,HOW_TO_STORY
  17. XREF INIT_HOW_TO_VS,HOW_TO_VS
  18. ;by MOVE
  19. XREF INIT_MOVING_DEMO,MOVING_DEMO
  20. ;by SELECT
  21. XREF INIT_GAME_SELECT,GAME_SELECT
  22. XREF INIT_STORY_SELECT,STORY_SELECT
  23. XREF INIT_VS_SELECT,VS_SELECT
  24. ;by CARD
  25. XREF INIT_STORY_SAVE,STORY_SAVE
  26. XREF INIT_STORY_LOAD,STORY_LOAD
  27. ;by MAIN
  28. XREF LP_MAIN,DEMO_END
  29. ;by STORY
  30. XREF INIT_STORY_GAME,STORY_GAME
  31. ;by BONUS
  32. XREF INIT_BONUS_STG,BONUS_STG
  33. ;by GAME_DSP
  34. XREF INIT_STORY_CONTINUE,STORY_CONTINUE
  35. XREF INIT_VS_CONTINUE,VS_CONTINUE
  36. XREF INIT_GAME_OVER,GAME_OVER
  37. SECT GAME,,C
  38. INCLUDE SYS.INC
  39. INCLUDE NEO_GEO.INC
  40. INCLUDE LABEL.INC
  41. INCLUDE HFLAG.INC
  42. INCLUDE MACRO.INC
  43. INCLUDE EASY_MAC.INC
  44. INCLUDE SMACRO.INC
  45. INCLUDE SCODE.INC
  46. IFNE 0
  47. PHASE work format
  48. /----------d9 player 2 active
  49. l/---------d8 player 1 active
  50. ll /-------d7 initialize phase
  51. ll l/------d6 demo,title
  52. ll ll/-----d5 game mode 0:rannyuu ari 1:nasi
  53. ll lll/----d4 game type 0:story 1:vs
  54. ll llll/---d3
  55. ll lllll/--d2 d3-0 status
  56. ll llllll/-d1
  57. ll lllllll/d0
  58. 00000000 00000000
  59. ENDC
  60. PHASE_DEMO EQU 6
  61. PHASE_RANNYUU EQU 5
  62. PHASE_STORY EQU 4
  63. IFNE 0
  64. PHASE status number
  65. 0: in game (with game scroll display)
  66. 1: how to play or title demo
  67. 2: player select or title only
  68. 3: continue or entry or system return
  69. 4: game over
  70. 5: memory card save
  71. 6: memory card load
  72. 7: stage moving demo
  73. 8: game mode select
  74. 9: bonus game
  75. ENDC
  76. ;
  77. ; *** PLAYER_START called in SYSTEM_IO ***
  78. ;
  79. PLAYER_START:
  80. LEA.L ?A5,A5
  81. MOVEQ.L #0,D0
  82. TST.B START_FLAG2(A5)
  83. BNE PS_3
  84. BTST.B #0,START_FLAG(A5)
  85. BEQ.S PS_1
  86. MOVE.B PLAYER1+PLAYER_STATE(A5),D1
  87. AND.B #PS_START_DI+PS_IN_GAME,D1
  88. BNE.S PS_1
  89. BSET.B #0,START_FLAG2(A5)
  90. PS_1:
  91. BTST.B #1,START_FLAG(A5)
  92. BEQ.S PS_2
  93. MOVE.B PLAYER2+PLAYER_STATE(A5),D1
  94. AND.B #PS_START_DI+PS_IN_GAME,D1
  95. BNE.S PS_2
  96. BSET.B #1,START_FLAG2(A5)
  97. PS_2:
  98. MOVEQ.L #0,D0
  99. MOVE.B START_FLAG2(A5),D0
  100. BTST.B #PHASE_DEMO,PHASE+1(A5)
  101. BEQ.S PS_3
  102. BTST.B #PHASE_RANNYUU,PHASE+1(A5)
  103. BEQ.S PS_3
  104. MOVE.B CREDIT1_START(PC,D0.W),D0
  105. PS_3:
  106. AND.B #00000011B,D0
  107. MOVE.B D0,START_FLAG(A5)
  108. BEQ.S PS_4
  109. MOVE.B #2,USER_MODE(A5) game mode
  110. MOVE.W LSPC_MODE_STORE(A5),D0
  111. AND.B #00001111B,D0
  112. MOVE.W D0,LSPC_MODE
  113. MOVE.W D0,LSPC_MODE_STORE(A5)
  114. PS_4:
  115. RTS
  116. CREDIT1_START:
  117. DC.B 00B,01B,10B,01B
  118. ;
  119. ; *** player intialize ***
  120. ;
  121. PLAYER_1st_INIT:
  122. ; system 1st initialize
  123. LEA.L PLAYER1(A5),A6
  124. MOVE.W #SYS_PLAYER1,TYPE(A6)
  125. MOVE.W #SYS_HERO1,TYPE+HERO_OFFSET(A6)
  126. MOVE.L A6,PLAYER2+ANOTHER_PLAYER(A5)
  127. MOVE.L #HERO2,HERO1+ANOTHER_PLAYER(A5)
  128. MOVE.W #0,PLAYER_No(A6)
  129. MOVE.B #HERO1_OBJ_START/100H,HERO_OBJ_START+HERO_OFFSET(A6)
  130. BSR PLAYER_1stI_SUB
  131. LEA.L PLAYER2(A5),A6
  132. MOVE.W #SYS_PLAYER2,TYPE(A6)
  133. MOVE.W #SYS_HERO2,TYPE+HERO_OFFSET(A6)
  134. MOVE.L A6,PLAYER1+ANOTHER_PLAYER(A5)
  135. MOVE.L #HERO1,HERO2+ANOTHER_PLAYER(A5)
  136. MOVE.B #HERO2_OBJ_START/100H,HERO_OBJ_START+HERO_OFFSET(A6)
  137. MOVE.W #1,PLAYER_No(A6)
  138. PLAYER_1stI_SUB:
  139. CLR.B PLAYER_STATE(A6)
  140. CLR.L HERO_SCORE+HERO_OFFSET(A6)
  141. CLR.B HERO_BEAT+HERO_OFFSET(A6)
  142. MOVE.W #-1,HERO_TYPE2+HERO_OFFSET(A6)
  143. RTS
  144. PLAYER_INIT_STORY:
  145. CLR.L HERO_SCORE+HERO_OFFSET(A6)
  146. MOVE.W PLAYER_No(A6),D0
  147. BTST.L D0,D4
  148. BEQ.S PIS_COM
  149. MOVE.W D0,STORY_PLAYER(A5)
  150. MOVE.B #1,0(A1,D0.W) player mode set
  151. MOVE.B #PS_IN_GAME,PLAYER_STATE(A6)
  152. MOVE.W HERO_TYPE2+HERO_OFFSET(A6),D1
  153. CMP.W #2,D1
  154. BCS.S PIS_2
  155. MOVE.W D0,D1
  156. PIS_2:
  157. MOVE.W D1,HERO_TYPE3+HERO_OFFSET(A6)
  158. RTS
  159. PIS_COM:
  160. BCLR.B #BPS_START_DI,PLAYER_STATE(A6)
  161. BSR HOME_IN_CHECK
  162. BTST.B #PHASE_RANNYUU,PHASE+1(A5)
  163. BEQ.S PIS_COM_1
  164. BSET.B #BPS_START_DI,PLAYER_STATE(A6)
  165. PIS_COM_1:
  166. RTS
  167. XDEF HOME_IN_CHECK
  168. HOME_IN_CHECK:
  169. TST.B MVS_FLAG(A5)
  170. BNE.S HIC_1
  171. MOVE.W PLAYER_No(A6),D0
  172. LEA.L HOME_CREDIT(A5),A0
  173. TST.B 0(A0,D0.W)
  174. BNE.S HIC_1
  175. BSET.B #BPS_START_DI,PLAYER_STATE(A6)
  176. HIC_1:
  177. RTS
  178. PLAYER_INIT_VS:
  179. MOVE.W PLAYER_No(A6),D0
  180. BTST.L D0,D4
  181. BEQ.S PIV_OLD
  182. MOVE.B #1,0(A1,D0.W) player mode set
  183. MOVE.B #PS_IN_GAME,PLAYER_STATE(A6)
  184. MOVE.L ANOTHER_PLAYER(A6),A0
  185. MOVE.W D0,D1
  186. CMP.W HERO_TYPE+HERO_OFFSET(A0),D1
  187. BNE.S PIV_NEW_1
  188. EOR.W #1,D1
  189. PIV_NEW_1:
  190. MOVE.W D1,HERO_TYPE3+HERO_OFFSET(A6)
  191. CMP.W STORY_PLAYER(A5),D0
  192. BNE.S PIV_NEW_2
  193. MOVE.W #-1,STORY_PLAYER(A5)
  194. PIV_NEW_2:
  195. RTS
  196. PIV_OLD:
  197. MOVE.W HERO_TYPE+HERO_OFFSET(A6),HERO_TYPE3+HERO_OFFSET(A6)
  198. MOVE.W PLAYER_No(A6),OLD_VS(A5)
  199. RTS
  200. ;
  201. ; *** phase 1st initialize ***
  202. ;
  203. PHASE_ALL_INIT:
  204. MOVE.W #11000001B,PHASE(A5) title demo init
  205. TST.B MVS_FLAG(A5)
  206. BEQ.S FAI_1
  207. TST.B GAME_DIP+SD_RANNYUU(A5)
  208. BEQ.S FAI_1
  209. BSET.B #PHASE_RANNYUU,PHASE+1(A5) rannyuu nasi
  210. FAI_1:
  211. MOVEQ.L #0,D0
  212. MOVE.B D0,DEMO_OVER_FLAG(A5)
  213. MOVE.B D0,MAKE_DEMO_CUT(A5)
  214. MOVE.W D0,HAOH_USE(A5)
  215. MOVE.B D0,HOW_TO_FLAG(A5)
  216. MOVE.B #1,ST_DEMO_ON(A5)
  217. MOVE.B #12,STORY_LIFE(A5)
  218. MOVE.B #12,STORY_SPIRIT(A5)
  219. MOVE.W #1,STORY_STAGE(A5)
  220. MOVE.W #-1,STORY_PLAYER(A5)
  221. MOVE.W #-1,OLD_VS(A5)
  222. MOVE.W #0404H,HOME_CREDIT(A5)
  223. CMP.B #3,USER_REQUEST(A5)
  224. BNE.S FAI_2
  225. ADDQ.W #1,PHASE(A5) mvs title only
  226. FAI_2:
  227. BSR LANGUAGE_1st
  228. BSR PLAYER_1st_INIT
  229. RTS
  230. LANGUAGE_1st:
  231. TST.B MVS_FLAG(A5)
  232. BEQ HOME_LANGUAGE
  233. MOVE.B LANGUAGE_SD(A5),LANGUAGE(A5)
  234. RTS
  235. HOME_LANGUAGE:
  236. MOVEQ.L #0,D0
  237. MOVE.B COUNTRY_CODE(A5),D0
  238. MOVE.B HL_DATA(PC,D0.W),LANGUAGE(A5)
  239. RTS
  240. HL_DATA:
  241. DC.B 0,1,1,2
  242. ;
  243. ;
  244. ; *** phase main control ***
  245. ;
  246. ;
  247. PHASE_CTRL:
  248. JSR GAME_START(PC)
  249. BSR PHASE_CTRL_SUB
  250. JSR LP_MAIN(PC)
  251. RTS
  252. PHASE_CTRL_SUB:
  253. MOVE.B #1,PAUSE_DI(A5)
  254. MOVEQ.L #0,D0
  255. MOVE.B PHASE+1(A5),D0
  256. BTST.L #PHASE_DEMO,D0
  257. BNE DEMO_PHASE
  258. BTST.L #PHASE_STORY,D0
  259. BNE VS_PHASE
  260. BEQ STORY_PHASE
  261. ;
  262. ; *** phase change by start button ***
  263. ;
  264. ;old phase new phase sub_step phase name attention
  265. ;x1x0xxxx 10001000 0 level slect home use
  266. ;x1x0xxxx 10x10001 how to play mvs double start
  267. ;x110xxxx 10101000 1 mode select mvs single,rannyuu nasi
  268. ;x100xxxx 10000001 how to play mvs single,rannyuu ari
  269. ;x00x0000 10010010 vs.player select
  270. GAME_START:
  271. OR.B #00100000B,START_FLAG2(A5)
  272. MOVEQ.L #00000011B,D4
  273. AND.B START_FLAG2(A5),D4
  274. BNE.S GAME_START_1
  275. RTS
  276. GAME_START_1:
  277. OR.B D4,PHASE(A5) active player set
  278. BSR HOME_CREDIT_DOWN
  279. LEA.L PLAYER_MODE(A5),A1
  280. MOVEQ.L #01110000B,D0
  281. AND.W PHASE(A5),D0
  282. LSR.W #2,D0
  283. MOVE.L GAME_START_VECTOR(PC,D0.W),A0
  284. JMP (A0)
  285. GAME_START_VECTOR:
  286. DC.L STORY_START 000
  287. DC.L VS_ENTORY 001
  288. DC.L STORY_START 010
  289. DC.L VS_ENTORY 011
  290. DC.L TO_GAME_RA 100
  291. DC.L TO_GAME_RA 101
  292. DC.L TO_GAME_RN 110
  293. DC.L TO_GAME_RN 111
  294. ; demo,type,mode
  295. HOME_CREDIT_DOWN:
  296. TST.B MVS_FLAG(A5)
  297. BNE HCD_2
  298. MOVEQ.L #01010000B,D0
  299. AND.B PHASE+1(A5),D0
  300. CMP.B #00010000B,D0
  301. BEQ HCD_2
  302. BTST.L #0,D4
  303. BEQ.S HCD_1
  304. SUBQ.B #1,HOME_CREDIT(A5)
  305. BNE.S HCD_1
  306. BSET.B #BPS_START_DI,PLAYER1+PLAYER_STATE(A5)
  307. HCD_1:
  308. BTST.L #1,D4
  309. BEQ.S HCD_2
  310. SUBQ.B #1,HOME_CREDIT+1(A5)
  311. BNE.S HCD_2
  312. BSET.B #BPS_START_DI,PLAYER2+PLAYER_STATE(A5)
  313. HCD_2:
  314. RTS
  315. STORY_START:
  316. MOVE.W D4,D0
  317. SUBQ.W #1,D0
  318. CMP.W STORY_PLAYER(A5),D0
  319. BNE STORY_TO_VS
  320. STORY_CONT_PLAY:
  321. MOVEQ.L #00100000B,D0
  322. AND.B PHASE+1(A5),D0
  323. OR.B #10000010B,D0
  324. MOVE.B D0,PHASE+1(A5) story player select
  325. LEA.L PLAYER1(A5),A6
  326. JSR PLAYER_INIT_STORY(PC)
  327. LEA.L PLAYER2(A5),A6
  328. JSR PLAYER_INIT_STORY(PC)
  329. BTST.B #PHASE_RANNYUU,PHASE+1(A5)
  330. BNE.S SCP_1
  331. MOVE.B #00100000B,START_FLAG2(A5)
  332. RTS
  333. SCP_1:
  334. MOVE.B #01100000B,START_FLAG2(A5)
  335. RTS
  336. STORY_TO_VS:
  337. MOVE.W #0,SUB_STEP(A5)
  338. BRA.S VS_ENTORY_1
  339. VS_ENTORY:
  340. MOVE.W #1,SUB_STEP(A5)
  341. VS_ENTORY_1:
  342. MOVE.B #10010010B,PHASE+1(A5) vs.player select
  343. LEA.L PLAYER1(A5),A6
  344. JSR PLAYER_INIT_VS(PC)
  345. LEA.L PLAYER2(A5),A6
  346. JSR PLAYER_INIT_VS(PC)
  347. MOVE.B #01000000B,START_FLAG2(A5)
  348. RTS
  349. TO_GAME_RA:
  350. BSR DEMO_START_INIT
  351. TST.B MVS_FLAG(A5)
  352. BEQ HOME_START
  353. CMP.B #11B,D4
  354. BEQ MVS_DOUBLE_START
  355. MOVE.B #10000110B,PHASE+1(A5) story card load
  356. LEA.L PLAYER1(A5),A6
  357. JSR PLAYER_INIT_STORY(PC)
  358. LEA.L PLAYER2(A5),A6
  359. JSR PLAYER_INIT_STORY(PC)
  360. MOVE.B #00100000B,START_FLAG2(A5)
  361. RTS
  362. TO_GAME_RN:
  363. BSR DEMO_START_INIT
  364. TST.B MVS_FLAG(A5)
  365. BEQ HOME_START
  366. CMP.B #11B,D4
  367. BEQ MVS_DOUBLE_START
  368. MOVE.B #10111000B,PHASE+1(A5) mode select
  369. MOVE.W #1,SUB_STEP(A5)
  370. LEA.L PLAYER1(A5),A6
  371. JSR PLAYER_INIT_STORY(PC)
  372. LEA.L PLAYER2(A5),A6
  373. JSR PLAYER_INIT_STORY(PC)
  374. MOVE.B #01000000B,START_FLAG2(A5)
  375. RTS
  376. MVS_DOUBLE_START:
  377. MOVEQ.L #00100000B,D0
  378. AND.B PHASE+1(A5),D0
  379. OR.B #10010001B,D0
  380. MOVE.B D0,PHASE+1(A5)
  381. LEA.L PLAYER1(A5),A6
  382. JSR PLAYER_INIT_VS(PC)
  383. LEA.L PLAYER2(A5),A6
  384. JSR PLAYER_INIT_VS(PC)
  385. MOVE.B #01000000B,START_FLAG2(A5)
  386. RTS
  387. HOME_START
  388. MOVE.B #10011000B,PHASE+1(A5) level select
  389. MOVE.W #0,SUB_STEP(A5)
  390. LEA.L PLAYER1(A5),A6
  391. JSR PLAYER_INIT_STORY(PC)
  392. LEA.L PLAYER2(A5),A6
  393. JSR PLAYER_INIT_STORY(PC)
  394. MOVE.B #00100000B,START_FLAG2(A5)
  395. RTS
  396. DEMO_START_INIT:
  397. MOVE.W #1,STORY_STAGE(A5)
  398. CLR.B PLAYER1+PLAYER_STATE(A5)
  399. CLR.B PLAYER2+PLAYER_STATE(A5)
  400. CLR.L HERO1+HERO_SCORE(A5)
  401. CLR.L HERO2+HERO_SCORE(A5)
  402. MOVE.B #0,ST_DEMO_ON(A5)
  403. BSR GAME_SOUND_FIRST
  404. BSR HERO_TYPE_INIT
  405. RTS
  406. HERO_TYPE_INIT:
  407. MOVE.W #0,HERO1+HERO_TYPE(A5)
  408. MOVE.W #1,HERO2+HERO_TYPE(A5)
  409. RTS
  410. GAME_SOUND_FIRST:
  411. SOUND #S_RESET
  412. SOUND #S_WAIT2
  413. SOUND #S_WAIT2
  414. SOUND #S_ALL_EI
  415. RTS
  416. STORY_RETURN:
  417. ; inner phase change (vs.mode no entry)
  418. ;
  419. ; *** story mode ***
  420. ;
  421. STORY_PHASE:
  422. MOVE.W STORY_STAGE(A5),AREA_No(A5)
  423. AND.W #10001111B,D0
  424. ROL.B #3,D0
  425. MOVE.L STORY_VECTOR(PC,D0.W),A0
  426. JMP (A0)
  427. STORY_VECTOR:
  428. DC.L STORY_GAME
  429. DC.L INIT_STORY_GAME
  430. DC.L HOW_TO_STORY
  431. DC.L INIT_HOW_TO_STORY
  432. DC.L STORY_SELECT
  433. DC.L INIT_STORY_SELECT
  434. DC.L STORY_CONTINUE
  435. DC.L INIT_STORY_CONTINUE
  436. DC.L GAME_OVER
  437. DC.L INIT_GAME_OVER
  438. DC.L STORY_SAVE
  439. DC.L INIT_STORY_SAVE
  440. DC.L STORY_LOAD
  441. DC.L INIT_STORY_LOAD
  442. DC.L MOVING_DEMO
  443. DC.L INIT_MOVING_DEMO
  444. DC.L GAME_SELECT
  445. DC.L INIT_GAME_SELECT
  446. DC.L BONUS_STG
  447. DC.L INIT_BONUS_STG
  448. RTS
  449. ;
  450. ; *** vs.phase ***
  451. ;
  452. VS_PHASE:
  453. ; MOVE.W STORY_STAGE(A5),AREA_No(A5) @@@@
  454. AND.W #10001111B,D0
  455. ROL.B #3,D0
  456. MOVE.L VS_VECTOR(PC,D0.W),A0
  457. JMP (A0)
  458. VS_VECTOR:
  459. DC.L STORY_GAME
  460. DC.L INIT_STORY_GAME
  461. ; DC.L VS_GAME
  462. ; DC.L INIT_VS_GAME
  463. DC.L HOW_TO_VS
  464. DC.L INIT_HOW_TO_VS
  465. DC.L VS_SELECT
  466. DC.L INIT_VS_SELECT
  467. DC.L VS_CONTINUE
  468. DC.L INIT_VS_CONTINUE
  469. DC.L GAME_OVER
  470. DC.L INIT_GAME_OVER
  471. DC.L STORY_SAVE
  472. DC.L INIT_STORY_SAVE
  473. DC.L STORY_LOAD
  474. DC.L INIT_STORY_LOAD
  475. DC.L MOVING_DEMO
  476. DC.L INIT_MOVING_DEMO
  477. DC.L GAME_SELECT
  478. DC.L INIT_GAME_SELECT
  479. INIT_VS_GAME:
  480. VS_GAME:
  481. RTS
  482. ;
  483. ; *** demo and 1st game start ***
  484. ;
  485. DEMO_PHASE:
  486. AND.B #11011111B,START_FLAG2(A5)
  487. AND.W #10001111B,D0
  488. ROL.B #3,D0
  489. MOVE.L DEMO_VECTOR(PC,D0.W),A0
  490. JMP (A0)
  491. DEMO_VECTOR:
  492. DC.L DEMO_GAME
  493. DC.L INIT_DEMO_GAME
  494. DC.L TITLE
  495. DC.L INIT_TITLE
  496. DC.L TITLE_ONLY
  497. DC.L INIT_TITLE_ONLY
  498. DC.L SYS_RET
  499. DC.L SYS_RET
  500. SYS_RET:
  501. JSR DEMO_END(PC) work clear for NUM
  502. JMP SYSTEM_RETURN
  503. ;
  504. ;
  505. ; *** sub routines ***
  506. ;
  507. ;
  508. ACTIVE_TRIGER:
  509. ; active players lever triger get
  510. ; out) D2 = active triger
  511. MOVEQ.L #0,D2
  512. BTST.B #0,PHASE(A5)
  513. BEQ.S ACTIVE_TRIGER_1
  514. MOVE.B INPUT_1+3(A5),D2
  515. ACTIVE_TRIGER_1:
  516. BTST.B #1,PHASE(A5)
  517. BEQ.S ACTIVE_TRIGER_2
  518. OR.B INPUT_2+3(A5),D2
  519. ACTIVE_TRIGER_2:
  520. RTS
  521. INCLUDE WORK.INC
  522.