SELECT.SRC 21 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109
  1. ;************************************************************************
  2. ; *
  3. ; ART OF FIGHT PLAYER SELECT SCREEN PROGRAM *
  4. ; presented by k.morikawa *
  5. ; version 0.01 1992/1/31 *
  6. ; *
  7. ;************************************************************************
  8. XDEF INIT_GAME_SELECT,GAME_SELECT
  9. XDEF INIT_STORY_SELECT,STORY_SELECT
  10. XDEF INIT_VS_SELECT,VS_SELECT
  11. XREF ?A5
  12. ;by PHASE
  13. XREF ACTIVE_TRIGER
  14. XREF PLAYER_INIT_VS
  15. ;by STORY
  16. XREF STAGE_ENEMY
  17. ;by GAME_SUB
  18. XREF LWORK_DEAD
  19. ;by DEMO_CML
  20. XREF DEMO_OBJ_MAP
  21. XREF INIT_TI_DEMO_ONLY
  22. ;by MESSAGE
  23. XREF MESS_SET,MESS_SET_INNER,FLAME_WRITE,FLAME_CLR
  24. XREF FLAME_WRITED
  25. ;by LANG
  26. XREF LANG_SET
  27. SECT GAME,,C
  28. INCLUDE SYS.INC
  29. INCLUDE MACRO.INC
  30. INCLUDE NEO_GEO.INC
  31. INCLUDE LABEL.INC
  32. INCLUDE EASY_MAC.INC
  33. INCLUDE ACT_No.INC
  34. INCLUDE SMACRO.INC
  35. INCLUDE SCODE.INC
  36. ;
  37. ; *** game level select (home use)
  38. ;
  39. FIX_CHECK:
  40. JSR.S PWORK_INIT
  41. LEA.L MLWORK1(A5),A6
  42. MOVE.W #0,COLOR_BUFFER+1FFEH(A5)
  43. COLOR_COMMAND
  44. PALETTE 000H,00H,PG_SET+BASE_COLOR
  45. PALETTE 0FFH,00H,BASE_COLOR
  46. PALETTE_END
  47. MESS_ON
  48. MOVE.L #M_FIX_CLEAR,(A0)+
  49. MESS_OFF
  50. OBJ_MAP DEMO_OBJ_MAP
  51. CLR.L WINDOW_X(A5)
  52. CLR.L WINDOW_Y(A5)
  53. MOVE.W #300H,LW_D0(A6)
  54. MOVE.W #2,LW_D1(A6)
  55. END_NEXT 0,FIX_0
  56. FIX_0:
  57. BSR CHECK_DISP
  58. END_NEXT 1,FIX_1
  59. FIX_1:
  60. JSR.S ACTIVE_TRIGER
  61. BTST.L #B_A_BUTTON,D2
  62. BNE CH_UP
  63. BTST.L #B_B_BUTTON,D2
  64. BNE CH_DOWN
  65. BTST.L #B_C_BUTTON,D2
  66. BNE PAL_UP
  67. BTST.L #B_D_BUTTON,D2
  68. BNE PAL_DOWN
  69. RTS
  70. CH_UP:
  71. ADD.W #200H,LW_D0(A6)
  72. AND.W #0F00H,LW_D0(A6)
  73. JMP CHECK_DISP(PC)
  74. CH_DOWN:
  75. SUB.W #200H,LW_D0(A6)
  76. AND.W #0F00H,LW_D0(A6)
  77. JMP CHECK_DISP(PC)
  78. PAL_UP:
  79. ADDQ.W #1,LW_D1(A6)
  80. AND.W #0FH,LW_D1(A6)
  81. JMP CHECK_DISP(PC)
  82. PAL_DOWN:
  83. SUBQ.W #1,LW_D1(A6)
  84. AND.W #0FH,LW_D1(A6)
  85. JMP CHECK_DISP(PC)
  86. CHECK_DISP:
  87. ADDQ.B #1,LSPC_BUSY(A5)
  88. LEA.L LSPC_DATA,A2
  89. MOVE.W #20H,2(A2)
  90. MOVE.W LW_D0(A6),D3
  91. MOVE.W LW_D1(A6),D2
  92. ROR.W #4,D2
  93. OR.W D2,D3
  94. MOVE.W #7000H+20H*4+6,D5
  95. BSR CD_SUB
  96. MOVE.W LW_D0(A6),D3
  97. ADD.W #100H,D3
  98. AND.W #0FFFH,D3
  99. MOVE.W LW_D1(A6),D2
  100. ROR.W #4,D2
  101. OR.W D2,D3
  102. MOVE.W #7000H+20H*4+7,D5
  103. BSR CD_SUB
  104. SUBQ.B #1,LSPC_BUSY(A5)
  105. MESS_ON
  106. MOVE.L #M_FIX_CHECK,(A0)+
  107. MESS_OFF
  108. RTS
  109. CD_SUB:
  110. MOVEQ.L #8-1,D7
  111. CD_SUB_1:
  112. MOVE.W D5,-2(A2)
  113. MOVEQ.L #32-1,D6
  114. CD_SUB_2:
  115. MOVE.W D3,(A2)
  116. ADDQ.W #1,D3
  117. DBRA D6,CD_SUB_2
  118. ADDQ.W #2,D5
  119. DBRA D7,CD_SUB_1
  120. RTS
  121. M_FIX_CHECK:
  122. FIX_FORMAT.B CODE,00FFH
  123. FIX_AUTO 20H
  124. FIX_ADRS 8,4
  125. FIX_DIRECT_DATA
  126. DC.B 'CHARA-',0FFH
  127. FIX_BCD_OUT.B NON,A5,LW_D0+MLWORK1-?A5,HI,4,14,4,00H
  128. FIX_ADRS 19,4
  129. FIX_DIRECT_DATA
  130. DC.B 'PALETTE-',0FFH
  131. FIX_BCD_OUT.B NON,A5,LW_D1+1+MLWORK1-?A5,HI,2,27,4,00H
  132. FIX_END
  133. LOGO_SUB:
  134. INIT_GAME_SELECT:
  135. MOVE.W #S_PLAYER,D0
  136. JSR.S SET_BGM
  137. LEA.L MLWORK1(A5),A6
  138. MOVE.W #31H,D0
  139. JSR.S MESS_SET
  140. JSR INIT_TI_DEMO_ONLY(PC)
  141. TST.W SUB_STEP(A5)
  142. BNE INIT_MODE_SELECT
  143. MOVE.W #6,FLAME_COUNT(A5)
  144. MOVE.W #1,FLAME_TYPE(A5)
  145. MOVE.W #7000H+20H*11+15,FLAME_POS(A5)
  146. MOVE.W #6,FLAME_END(A5)
  147. JSR.S FLAME_WRITED
  148. MOVE.W #0C9H,D0
  149. JSR.S MESS_SET
  150. MOVE.W #2,LW_D0(A6)
  151. MOVEQ.L #0,D0
  152. MOVE.B LANGUAGE(A5),D0
  153. MOVE.W D0,LW_D1(A6)
  154. JSR LEVEL_SEL_DISP(PC)
  155. STEP_SAVE 0,GAME_SELECT_0
  156. MOVE.W #0A00H,WORD_TIMER(A6)
  157. AND.B #01111111B,PHASE+1(A5)
  158. RTS
  159. LEVEL_SEL_DISP:
  160. MOVE.W #0CAH,D0
  161. ADD.W LW_D0(A6),D0
  162. JSR.S MESS_SET
  163. MOVE.W #0CEH,D0
  164. ADD.W LW_D1(A6),D0
  165. JSR.S MESS_SET
  166. RTS
  167. GAME_SELECT:
  168. LEA.L MLWORK1(A5),A6
  169. EASY_START
  170. GAME_SELECT_0:
  171. SEC_TIMER WORD_TIMER
  172. BCS GAME_SELECT_END
  173. JSR.S ACTIVE_TRIGER
  174. TST.W DEBUG_DIP1(A5)
  175. BEQ.S GAME_SELECT_000
  176. BTST.L #B_D_BUTTON,D2
  177. BNE FIX_CHECK
  178. GAME_SELECT_000:
  179. BTST.L #B_A_BUTTON,D2
  180. BNE GAME_SELECT_END
  181. AND.W #UP+DOWN+LEFT+RIGHT,D2
  182. BNE.S GAME_SELECT_1
  183. RTS
  184. GAME_SELECT_1:
  185. ADD.W D2,D2
  186. LEA.L GAME_SEL_LEVER(PC),A0
  187. ADD.W D2,A0
  188. MOVE.B (A0)+,D0
  189. ADD.B LW_D0+1(A6),D0
  190. CMP.B #4,D0
  191. BCC.S GAME_SELECT_2
  192. MOVE.B D0,LW_D0+1(A6)
  193. GAME_SELECT_2:
  194. MOVE.B (A0)+,D0
  195. ADD.B LW_D1+1(A6),D0
  196. BPL.S GAME_SELECT_3
  197. MOVEQ.L #2,D0
  198. GAME_SELECT_3:
  199. CMP.B #3,D0
  200. BCS.S GAME_SELECT_4
  201. MOVEQ.L #0,D0
  202. GAME_SELECT_4:
  203. MOVE.B D0,LW_D1+1(A6)
  204. JSR LEVEL_SEL_DISP(PC)
  205. SOUND #S_SENTAKU
  206. RTS
  207. GAME_SELECT_END:
  208. SOUND #S_KETTEI
  209. MOVEQ.L #0,D0
  210. MOVE.W LW_D0(A6),D0
  211. MOVE.B LEVEL_CONV_TBL(PC,D0.W),GAME_DIP+SD_LEVEL(A5)
  212. MOVE.B LW_D1+1(A6),LANGUAGE(A5)
  213. MOVE.W #1,SUB_STEP(A5)
  214. MOVE.W #31H,D0
  215. JSR.S MESS_SET
  216. JMP INIT_MODE_SELECT(PC)
  217. ; OR.B #10000000B,PHASE+1(A5)
  218. ; RTS
  219. LEVEL_CONV_TBL:
  220. DC.B 3,1,2,6
  221. GAME_SEL_LEVER:
  222. DC.B 00,00
  223. DC.B -1,00
  224. DC.B 01,00
  225. DC.B 00,00
  226. DC.B 00,-1
  227. DC.B -1,-1
  228. DC.B 01,-1
  229. DC.B 00,00
  230. DC.B 00,01
  231. DC.B -1,01
  232. DC.B 01,01
  233. DC.B 00,00
  234. DC.B 00,00
  235. DC.B 00,00
  236. DC.B 00,00
  237. DC.B 00,00
  238. ;
  239. ; *** game mode select ***
  240. ;
  241. INIT_MODE_SELECT:
  242. MOVE.W #3,FLAME_COUNT(A5)
  243. MOVE.W #1,FLAME_TYPE(A5)
  244. MOVE.W #7000H+20H*11+22,FLAME_POS(A5)
  245. MOVE.W #3,FLAME_END(A5)
  246. JSR.S FLAME_WRITED
  247. MOVE.W #0D1H,D0
  248. JSR.S MESS_SET
  249. STEP_SAVE 1,MODE_SELECT_0
  250. MOVE.W #0,LW_D0(A6)
  251. JSR.S MODE_DISP(PC)
  252. MOVE.W #0A00H,WORD_TIMER(A6)
  253. AND.B #01111111B,PHASE+1(A5)
  254. RTS
  255. MODE_DISP:
  256. MOVE.W #0D2H,D0
  257. ADD.W LW_D0(A6),D0
  258. JSR.S MESS_SET
  259. RTS
  260. MODE_SELECT_0:
  261. SEC_TIMER WORD_TIMER
  262. BCS MODE_SELECT_END
  263. JSR.S ACTIVE_TRIGER
  264. BTST.L #B_A_BUTTON,D2
  265. BNE MODE_SELECT_END
  266. AND.W #UP+DOWN,D2
  267. BNE.S MODE_SELECT_1
  268. RTS
  269. MODE_SELECT_1:
  270. EOR.W #1,LW_D0(A6)
  271. JSR MODE_DISP(PC)
  272. SOUND #S_SENTAKU
  273. RTS
  274. MODE_SELECT_END:
  275. SOUND #S_KETTEI
  276. MOVE.W #30,WORD_TIMER(A6)
  277. END_NEXT 2,MS_END
  278. MS_END:
  279. SUBQ.W #1,WORD_TIMER(A6)
  280. BEQ MS_END_END
  281. RTS
  282. MS_END_END:
  283. TST.W LW_D0(A6)
  284. BEQ VS_START
  285. ; story start
  286. MOVE.W #00100000B,D0
  287. AND.B PHASE+1(A5),D0
  288. OR.B #10000110B,D0 card load
  289. MOVE.B D0,PHASE+1(A5)
  290. RTS
  291. VS_START:
  292. MOVE.W #-1,STORY_PLAYER(A5)
  293. LEA.L PLAYER_MODE(A5),A1
  294. MOVEQ.L #00000011B,D4
  295. LEA.L PLAYER1(A5),A6
  296. JSR PLAYER_INIT_VS(PC)
  297. LEA.L PLAYER2(A5),A6
  298. JSR PLAYER_INIT_VS(PC)
  299. MOVE.W #303H,HOME_CREDIT(A5)
  300. MOVE.W #00100000B,D0
  301. AND.B PHASE+1(A5),D0
  302. OR.B #10010001B,D0 how to play
  303. MOVE.B D0,PHASE+1(A5)
  304. MOVE.B #00000011B,PHASE(A5)
  305. RTS
  306. M_MODE_SELECT:
  307. FIX_AUTO 1
  308. FIX_ADRS 0,0
  309. FIX_SAME 020H,020H
  310. FIX_SAME 0E0H,020H
  311. FIX_SAME 0E0H,020H
  312. FIX_SAME 0E0H,020H
  313. FIX_SAME 0E0H,020H
  314. FIX_SAME 0E0H,020H
  315. FIX_SAME 060H,020H
  316. FIX_SAME 020H,020H
  317. FIX_FORMAT.B CODE,0FFH
  318. FIX_AUTO 20H
  319. FIX_ADRS 15,8
  320. FIX_DATA_ADRS GAME_MODE_MESS
  321. FIX_ADRS 17,11
  322. FIX_DATA_CONT
  323. FIX_NEXT 0,2
  324. FIX_DATA_CONT
  325. FIX_NEXT 0,5
  326. FIX_DATA_CONT
  327. M_MS_PAR:
  328. FIX_FORMAT.B CODE,0FFH
  329. FIX_AUTO 1
  330. FIX_ADRS 14,11
  331. FIX_TABLE_SING A6,LW_D0,M_MS_TBL
  332. FIX_DIRECT_DATA
  333. FIX_END
  334. M_MS_TBL:
  335. WORD_TBL M_MS0
  336. WORD_TBL M_MS1
  337. M_MS0:
  338. DC.B '> ',0FFH
  339. M_MS1:
  340. DC.B ' >',0FFH
  341. GAME_MODE_MESS:
  342. DC.B 'GAME MODE',0FFH
  343. DC.B '1P vs 2P',0FFH
  344. DC.B 'STORY',0FFH
  345. DC.B 'PUSH A BUTTON',0FFH
  346. EVEN
  347. ;
  348. ;
  349. ; *** player select ***
  350. ;
  351. ;
  352. INIT_STORY_SELECT:
  353. MOVE.W #S_PLAYER,D0
  354. JSR.S SET_BGM
  355. JSR SELECT_1st(PC)
  356. MESS_ON
  357. MOVE.L #M_FIX_CLEAR,(A0)+
  358. MESS_OFF
  359. LEA.L MLWORK1(A5),A6
  360. STEP_SAVE 0,STORY_SELECT_0
  361. AND.B #01111111B,PHASE+1(A5)
  362. RTS
  363. STORY_SELECT:
  364. AND.B #11011111B,START_FLAG2(A5)
  365. LEA.L MLWORK1(A5),A6
  366. EASY_START
  367. STORY_SELECT_0:
  368. PAL_WAIT 0CFH
  369. MOVE.W #000FH,COLOR_BUFFER+1FFEH(A5)
  370. MOVE.W #BASE_COLOR,COLOR_BUFFER+20H*0FFH(A5)
  371. LEA.L COLOR_BUFFER+20H*0A0H(A5),A0
  372. MOVE.W #8000H+FADE_OUT+CC_SPEED3,D0
  373. MOVE.W #30H-1,D7
  374. SS0_LOOP:
  375. MOVE.W D0,(A0)
  376. LEA.L 20H(A0),A0
  377. DBRA D7,SS0_LOOP
  378. MOVE.B #1,COLOR_STATE(A5)
  379. END_NEXT 1,STORY_SELECT_1
  380. STORY_SELECT_1:
  381. CMP.B #80H,COLOR_BUFFER+20H*0CFH(A5)
  382. NEXT_CHECK BNE,2,STORY_SELECT_2
  383. CLR.B COLOR_STATE(A5)
  384. MOVE.W #0A00H,WORD_TIMER(A6)
  385. CLR.W SELC_MODE(A5)
  386. PCHILD WORK_N0,P_EASY,C_SEL_PLAYER,160,54H,0,0
  387. PCHILD WORK_N1,P_EASY,C_SEL_CURSOR,156,90,4,0
  388. LEA.L (A0),A3
  389. PCHILD WORK_N1,P_EASY,C_SEL_NAME,50H,58H,2,0
  390. LEA.L (A0),A2
  391. PCHILD WORK_N1,P_EASY,C_SEL_DISP,50H,68H,1,0
  392. MOVE.B WORK_No(A3),WORK_N1(A0)
  393. MOVE.B WORK_No(A2),WORK_N0(A0)
  394. LEA.L HERO1(A5),A4
  395. TST.W STORY_PLAYER(A5)
  396. BEQ.S ISS_1
  397. LEA.L HERO2(A5),A4
  398. MOVE.W #0F0H,X_POSITION(A2)
  399. MOVE.W #0F0H,X_POSITION(A0)
  400. MOVE.B #0,ACT_COUNT(A3)
  401. BSET.B #ACTAT_FLIP,ACT_ATTR(A0)
  402. ISS_1:
  403. MOVE.W HERO_TYPE3(A4),D0
  404. CMP.W #2,D0
  405. BCS.S ISS_1_1
  406. MOVE.W PLAYER_No+PLAYER_OFFSET(A4),D0
  407. ISS_1_1:
  408. MOVE.B D0,LW_D0(A6)
  409. JSR SEL_CURSOR(PC)
  410. MOVE.W #14H,D0
  411. JSR MESS_SET(PC)
  412. RTS
  413. STORY_SELECT_2:
  414. SEC_TIMER WORD_TIMER
  415. BCS STORY_SELECT_END
  416. MOVE.W #15H,D0 timer
  417. JSR MESS_SET(PC)
  418. JSR.S ACTIVE_TRIGER
  419. BTST.L #B_A_BUTTON,D2
  420. BNE STORY_SELECT_END
  421. MOVEQ.L #0,D0
  422. MOVE.B LW_D0(A6),D0
  423. AND.B SSEL_EI(PC,D0.W),D2
  424. BEQ.S SS_21
  425. EOR.B #1,LW_D0(A6)
  426. SUB_WORK WORK_N1,A0,0
  427. MOVEQ.L #0,D0
  428. MOVE.B LW_D0(A6),D0
  429. JSR SEL_CURSOR(PC)
  430. SOUND #S_SENTAKU
  431. SS_21:
  432. RTS
  433. SSEL_EI:
  434. DC.B RIGHT,LEFT
  435. STORY_SELECT_END:
  436. SOUND #S_KETTEI
  437. LEA.L HERO1(A5),A0
  438. TST.W STORY_PLAYER(A5)
  439. BEQ.S SS_END_1
  440. LEA.L HERO2(A5),A0
  441. SS_END_1:
  442. MOVEQ.L #0,D0
  443. MOVE.B LW_D0(A6),D0
  444. MOVE.W D0,HERO_TYPE(A0)
  445. MOVE.W D0,HERO_TYPE2(A0)
  446. COLOR_COMMAND
  447. PALETTE 000H,00H,PG_SET+FADE_OUT+CC_SPEED3
  448. PALETTE 080H,20H,PG_SET+FADE_OUT+CC_SPEED3
  449. PALETTE 090H,21H,PG_SET+FADE_OUT+CC_SPEED3
  450. PALETTE 0D0H,25H,PG_SET+FADE_OUT+CC_SPEED3
  451. PALETTE 0F0H,00H,FADE_OUT+CC_SPEED3
  452. PALETTE 0FFH,00H,FADE_OUT+CC_SPEED3
  453. PALETTE_END
  454. STEP_SAVE 3,STORY_SELECT_3
  455. STORY_SELECT_3:
  456. PAL_WAIT 0FFH
  457. COLOR_COMMAND
  458. PALETTE 0A0H,22H,PG_SET+FADE_COLOR
  459. PALETTE 0B0H,23H,PG_SET+FADE_COLOR
  460. PALETTE 0C0H,24H,PG_SET+FADE_COLOR
  461. PALETTE_END
  462. MOVE.B #01110000B,D0
  463. AND.B PHASE+1(A5),D0
  464. OR.B #10000000B,D0 in game
  465. MOVE.B D0,PHASE+1(A5)
  466. MOVE.W #0,SUB_STEP(A5)
  467. RTS
  468. SELECT_1st:
  469. JSR.S PWORK_INIT
  470. JSR LWORK_DEAD(PC)
  471. COLOR_COMMAND
  472. PALETTE 000H,00H,PG_SET+BASE_COLOR
  473. PALETTE 080H,20H,PG_SET+BASE_COLOR
  474. PALETTE 090H,21H,PG_SET+BASE_COLOR
  475. PALETTE 0A0H,22H,PG_SET+BASE_COLOR
  476. PALETTE 0B0H,23H,PG_SET+BASE_COLOR
  477. PALETTE 0C0H,24H,PG_SET+BASE_COLOR
  478. PALETTE 0D0H,25H,PG_SET+BASE_COLOR
  479. PALETTE 0F0H,27H,PG_SET+BASE_COLOR
  480. PALETTE_END
  481. OBJ_MAP DEMO_OBJ_MAP
  482. CLR.L WINDOW_X(A5)
  483. CLR.L WINDOW_Y(A5)
  484. RTS
  485. INIT_TO_VS:
  486. SOUND #S_RESET
  487. SOUND #S_WAIT2
  488. SOUND #S_WAIT2
  489. SOUND #S_ALL_EI
  490. MOVE.W #0,BGM_CODE(A5)
  491. LEA.L MLWORK1(A5),A6
  492. MOVE.W #2,FLAME_COUNT(A5)
  493. MOVE.W #3,FLAME_END(A5)
  494. MOVE.W #0,FLAME_TYPE(A5)
  495. MOVE.W #7000H+20H*3+15,FLAME_POS(A5)
  496. JSR.S FLAME_WRITED
  497. MOVE.W #144*3,D0
  498. JSR.S LANG_SET
  499. AND.B #7FH,PHASE+1(A5)
  500. MOVE.B #1,LP_MAIN_RUN(A5)
  501. MOVE.W #60,WORD_TIMER(A6)
  502. END_NEXT 1,TO_VS_1
  503. TO_VS_1:
  504. MOVE.B #1,LP_MAIN_RUN(A5)
  505. SUBQ.W #1,WORD_TIMER(A6)
  506. BNE.S TO_VS_2
  507. MOVE.W #1,SUB_STEP(A5)
  508. OR.B #80H,PHASE+1(A5)
  509. TO_VS_2:
  510. RTS
  511. INIT_VS_SELECT:
  512. BTST.B #5,PHASE+1(A5)
  513. BNE.S IVSL_00
  514. TST.W SUB_STEP(A5)
  515. BEQ INIT_TO_VS
  516. IVSL_00:
  517. CLR.W COLOR_BUFFER+20H*00H(A5)
  518. CLR.W COLOR_BUFFER+20H*10H(A5)
  519. CLR.W COLOR_BUFFER+20H*20H(A5)
  520. CLR.W COLOR_BUFFER+20H*30H(A5)
  521. CLR.W COLOR_BUFFER+20H*40H(A5)
  522. CLR.W COLOR_BUFFER+20H*50H(A5)
  523. CLR.W COLOR_BUFFER+20H*60H(A5)
  524. CLR.W COLOR_BUFFER+20H*70H(A5)
  525. CLR.W COLOR_BUFFER+20H*80H(A5)
  526. CLR.W COLOR_BUFFER+20H*90H(A5)
  527. CLR.W COLOR_BUFFER+20H*0A0H(A5)
  528. CLR.W COLOR_BUFFER+20H*0B0H(A5)
  529. CLR.W COLOR_BUFFER+20H*0C0H(A5)
  530. CLR.W COLOR_BUFFER+20H*0D0H(A5)
  531. CLR.W COLOR_BUFFER+20H*0E0H(A5)
  532. CLR.W COLOR_BUFFER+20H*0F0H(A5)
  533. MOVE.W #S_PLAYER,D0
  534. JSR.S SET_BGM
  535. JSR SELECT_1st(PC)
  536. LEA.L MLWORK1(A5),A6
  537. STEP_SAVE 1,VS_SELECT_0
  538. MOVE.W #0,LW_D0(A6)
  539. MOVE.W #0,LW_D1(A6)
  540. MOVE.W #0A00H,WORD_TIMER(A6)
  541. PCHILD WORK_N0,P_EASY,C_SEL_PLAYER,160,54H,0,0
  542. BSR SELC_MODE_SET
  543. PCHILD WORK_N1,P_EASY,C_SEL_CURSOR,156,90,5,0
  544. LEA.L (A0),A3
  545. PCHILD WORK_N1,P_EASY,C_SEL_NAME,50H,58H,2,0
  546. LEA.L (A0),A2
  547. PCHILD WORK_N1,P_EASY,C_SEL_DISP,50H,68H,1,0
  548. MOVE.B WORK_No(A3),WORK_N1(A0)
  549. MOVE.B WORK_No(A2),WORK_N0(A0)
  550. MOVE.W HERO1+HERO_TYPE(A5),D0
  551. MOVE.B D0,LW_D0(A6)
  552. JSR SEL_CURSOR(PC)
  553. PCHILD WORK_N2,P_EASY,C_SEL_CURSOR,156,90,4,0
  554. LEA.L (A0),A3
  555. MOVE.B #0,ACT_COUNT(A3)
  556. PCHILD WORK_N2,P_EASY,C_SEL_NAME,0F0H,58H,2,0
  557. LEA.L (A0),A2
  558. PCHILD WORK_N2,P_EASY,C_SEL_DISP,0F0H,68H,1,0
  559. BSET.B #ACTAT_FLIP,ACT_ATTR(A0)
  560. MOVE.B WORK_No(A3),WORK_N1(A0)
  561. MOVE.B WORK_No(A2),WORK_N0(A0)
  562. MOVE.W HERO2+HERO_TYPE(A5),D0
  563. MOVE.B D0,LW_D1(A6)
  564. JSR SEL_CURSOR(PC)
  565. MESS_ON
  566. MOVE.L #M_FIX_CLEAR,(A0)+
  567. MOVE.W #16H,D0
  568. JSR MESS_SET_INNER(PC)
  569. MESS_OFF
  570. AND.B #01111111B,PHASE+1(A5)
  571. RTS
  572. SELC_MODE_SET:
  573. CLR.W SELC_MODE(A5)
  574. MOVE.W STORY_STAGE(A5),D0
  575. SUB.W #9,D0
  576. BMI.S SELC_NML
  577. MOVE.W D0,SELC_MODE(A5)
  578. SUBQ.W #1,D0
  579. MOVE.B D0,ACT_COUNT(A0)
  580. SELC_NML:
  581. RTS
  582. SEL_CURSOR_STOP:
  583. MOVEP.W WORK_N1(A0),D2
  584. CLR.B D2
  585. MOVE.B ACT_FLAG(A5,D2.W),ACT_COUNT(A5,D2.W)
  586. MOVE.B #-1,ACT_TIMER(A5,D2.W)
  587. RTS
  588. SEL_CURSOR:
  589. MOVEP.W WORK_N0(A0),D1
  590. CLR.B D1
  591. MOVEP.W WORK_N1(A0),D2
  592. CLR.B D2
  593. MOVE.W D0,D3
  594. SUBQ.W #1,D0
  595. MOVE.B D0,ACT_COUNT(A0)
  596. MOVE.B #1,ACT_DEC(A0)
  597. MOVE.B D0,ACT_COUNT(A5,D1.W)
  598. MOVE.B #1,ACT_DEC(A5,D1.W)
  599. ADD.W D3,D3
  600. ADD.W D3,D3
  601. MOVE.W SEL_CU_POS(PC,D3.W),X_POSITION(A5,D2.W)
  602. MOVE.W SEL_CU_POS+2(PC,D3.W),Y_POSITION(A5,D2.W)
  603. RTS
  604. SEL_BX EQU 102
  605. SEL_BY EQU 90
  606. SEL_CU_POS:
  607. DC.W SEL_BX+28*1,SEL_BY-28*0 H1
  608. DC.W SEL_BX+28*2,SEL_BY-28*0 H2
  609. DC.W SEL_BX+28*0,SEL_BY-28*0 E1
  610. DC.W SEL_BX+28*3,SEL_BY-28*0 E2
  611. DC.W SEL_BX+28*0,SEL_BY-28*1 E3
  612. DC.W SEL_BX+28*1,SEL_BY-28*1 E4
  613. DC.W SEL_BX+28*2,SEL_BY-28*1 E5
  614. DC.W SEL_BX+28*3,SEL_BY-28*1 E6
  615. DC.W SEL_BX-28*1,SEL_BY-28*1 E7
  616. DC.W SEL_BX+28*4,SEL_BY-28*1 E8
  617. VS_SELECT:
  618. LEA.L MLWORK1(A5),A6
  619. EASY_START
  620. VS_SELECT_0:
  621. MOVE.W #000FH,COLOR_BUFFER+1FFEH(A5)
  622. MOVE.W #BASE_COLOR,COLOR_BUFFER+20H*0FFH(A5)
  623. MOVE.B #1,COLOR_STATE(A5)
  624. END_NEXT 1,VS_SELECT_01
  625. VS_SELECT_01:
  626. SEC_TIMER WORD_TIMER
  627. BCS VS_SELECT_END
  628. MOVE.W #15H,D0 timer
  629. JSR MESS_SET(PC)
  630. SUB_WORK WORK_N1,A0,0
  631. MOVE.B INPUT_1+3(A5),D2
  632. LEA.L LW_D0(A6),A1
  633. BSR VS_SELECT_MOVE
  634. SUB_WORK WORK_N2,A0,0
  635. MOVE.B INPUT_2+3(A5),D2
  636. LEA.L LW_D1(A6),A1
  637. BSR VS_SELECT_MOVE
  638. MOVEQ.L #0,D0
  639. MOVEQ.L #0,D1
  640. MOVE.B LW_D0(A6),D0
  641. CMP.B LW_D1(A6),D0
  642. BNE.S VS_SELECT_101
  643. BSR IROGAE
  644. VS_SELECT_101:
  645. CMP.B PALETTE_ADD(A0),D1
  646. BEQ.S VS_SELECT_1
  647. MOVE.B D1,PALETTE_ADD(A0)
  648. BSET.B #ACTAT_SET,ACT_ATTR(A0)
  649. VS_SELECT_1:
  650. MOVE.B LW_D0+1(A6),D0
  651. AND.B LW_D1+1(A6),D0
  652. BNE VS_SELECT_END
  653. RTS
  654. IROGAE:
  655. MOVE.B IRO_ADD(PC,D0.W),D1
  656. RTS
  657. IRO_ADD:
  658. ; 1 2 1 2 3 4 5 6 7 8
  659. DC.B 1,1,1,1,1,1,1,1,29H,40H
  660. VS_SELECT_END:
  661. SOUND #S_KETTEI
  662. MOVEQ.L #0,D0
  663. MOVE.B LW_D0(A6),D0
  664. MOVE.W D0,HERO1+HERO_TYPE(A5)
  665. MOVEQ.L #0,D0
  666. MOVE.B LW_D1(A6),D0
  667. MOVE.W D0,HERO2+HERO_TYPE(A5)
  668. COLOR_COMMAND
  669. PALETTE 000H,00H,PG_SET+FADE_OUT+CC_SPEED3
  670. PALETTE 080H,20H,PG_SET+FADE_OUT+CC_SPEED3
  671. PALETTE 090H,21H,PG_SET+FADE_OUT+CC_SPEED3
  672. PALETTE 0A0H,22H,PG_SET+FADE_OUT+CC_SPEED3
  673. PALETTE 0B0H,23H,PG_SET+FADE_OUT+CC_SPEED3
  674. PALETTE 0C0H,24H,PG_SET+FADE_OUT+CC_SPEED3
  675. PALETTE 0D0H,25H,PG_SET+FADE_OUT+CC_SPEED3
  676. PALETTE 0F0H,00H,FADE_OUT+CC_SPEED3
  677. PALETTE 0FFH,00H,FADE_OUT+CC_SPEED3
  678. PALETTE_END
  679. STEP_SAVE 2,VS_SELECT_2
  680. VS_SELECT_2:
  681. PAL_WAIT 0C0H
  682. SUB_WORK WORK_N0,A0,0
  683. CLR.W TYPE(A0)
  684. MOVE.W #0C00H,COLOR_BUFFER+1FFEH(A5)
  685. COLOR_COMMAND
  686. PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
  687. PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
  688. PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
  689. PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
  690. PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
  691. PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
  692. PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
  693. PALETTE 0F0H,00H,FADE_IN+CC_SPEED3
  694. PALETTE 0FFH,00H,FADE_IN+CC_SPEED3
  695. PALETTE_END
  696. MESS_ON
  697. MOVE.L #M_FIX_CLEAR,(A0)+
  698. MESS_OFF
  699. SUB_WORK WORK_N1,A0,0
  700. MOVE.W #-40H,X_POSITION(A0)
  701. MOVEP.W WORK_N0(A0),D0
  702. CLR.B D0
  703. MOVE.W #-40H,X_POSITION(A5,D0.W)
  704. MOVEP.W WORK_N1(A0),D0
  705. CLR.B D0
  706. CLR.W TYPE(A5,D0.W)
  707. SUB_WORK WORK_N2,A0,0
  708. MOVE.W #180H,X_POSITION(A0)
  709. MOVEP.W WORK_N0(A0),D0
  710. CLR.B D0
  711. MOVE.W #180H,X_POSITION(A5,D0.W)
  712. MOVEP.W WORK_N1(A0),D0
  713. CLR.B D0
  714. CLR.W TYPE(A5,D0.W)
  715. MOVE.W #S_TAISEN,D0
  716. JSR.S SET_BGM
  717. STEP_SAVE 3,VS_SELECT_3
  718. VS_SELECT_3:
  719. BSR VS_SEL_CUT
  720. PAL_WAIT 0C0H
  721. MOVE.W HERO1+HERO_TYPE(A5),D0
  722. MOVEQ.L #0,D1
  723. BSR VS_SOUND
  724. STEP_SAVE 4,VS_SELECT_4
  725. VS_SELECT_4:
  726. BSR VS_SEL_CUT
  727. SUB_WORK WORK_N1,A0,0
  728. ADD.W #10H,X_POSITION(A0)
  729. CMP.W #50H,X_POSITION(A0)
  730. NEXT_CHECK BEQ,43,VS_SELECT_43
  731. RTS
  732. VS_SELECT_43:
  733. BSR VS_SEL_CUT
  734. SUB_WORK WORK_N1,A0,0
  735. MOVEP.W WORK_N0(A0),D0
  736. CLR.B D0
  737. ADD.W #10H,X_POSITION(A5,D0.W)
  738. CMP.W #50H,X_POSITION(A5,D0.W)
  739. NEXT_CHECK BEQ,41,VS_SELECT_41
  740. MOVE.W #60,WORD_TIMER(A6)
  741. RTS
  742. VS_SELECT_41:
  743. BSR VS_SEL_CUT
  744. SUBQ.W #1,WORD_TIMER(A6)
  745. NEXT_CHECK BEQ,42,VS_SELECT_42
  746. SOUND #S_VS
  747. PCHILD WORK_N0,P_EASY,C_SEL_VS,160,98H,10,0
  748. MOVE.W #0F0FH,BIG_X(A0)
  749. MOVE.W #60,WORD_TIMER(A6)
  750. RTS
  751. VS_SELECT_42:
  752. BSR VS_SEL_CUT
  753. SUB_WORK WORK_N0,A0,0
  754. CMP.B #0FFH,BIG_X(A0)
  755. BEQ.S VS_SELECT_44
  756. ADD.B #10H,BIG_X(A0)
  757. ADD.B #10H,BIG_Y(A0)
  758. VS_SELECT_44:
  759. SUBQ.W #1,WORD_TIMER(A6)
  760. NEXT_CHECK BEQ,5,VS_SELECT_5
  761. MOVE.W HERO2+HERO_TYPE(A5),D0
  762. MOVEQ.L #1,D1
  763. BSR VS_SOUND
  764. RTS
  765. VS_SELECT_5:
  766. BSR VS_SEL_CUT
  767. SUB_WORK WORK_N2,A0,0
  768. ADD.W #-10H,X_POSITION(A0)
  769. CMP.W #0F0H,X_POSITION(A0)
  770. NEXT_CHECK BEQ,6,VS_SELECT_6
  771. RTS
  772. VS_SELECT_6:
  773. BSR VS_SEL_CUT
  774. SUB_WORK WORK_N2,A0,0
  775. MOVEP.W WORK_N0(A0),D0
  776. CLR.B D0
  777. ADD.W #-10H,X_POSITION(A5,D0.W)
  778. CMP.W #0F0H,X_POSITION(A5,D0.W)
  779. NEXT_CHECK BEQ,8,VS_SELECT_8
  780. MOVE.W #300H,WORD_TIMER(A6)
  781. VS_SELECT_8:
  782. BSR VS_SEL_CUT
  783. SEC_TIMER WORD_TIMER
  784. NEXT_CHECK BCS,9,VS_SELECT_9
  785. ;SET_VS_SELECT_9:
  786. COLOR_COMMAND
  787. PALETTE 000H,00H,PG_SET+FADE_OUT+CC_SPEED3
  788. PALETTE 080H,20H,PG_SET+FADE_OUT+CC_SPEED3
  789. PALETTE 090H,21H,PG_SET+FADE_OUT+CC_SPEED3
  790. PALETTE 0A0H,22H,PG_SET+FADE_OUT+CC_SPEED3
  791. PALETTE 0B0H,23H,PG_SET+FADE_OUT+CC_SPEED3
  792. PALETTE 0C0H,24H,PG_SET+FADE_OUT+CC_SPEED3
  793. PALETTE 0D0H,25H,PG_SET+FADE_OUT+CC_SPEED3
  794. PALETTE 0F0H,00H,FADE_OUT+CC_SPEED3
  795. PALETTE 0FFH,00H,FADE_OUT+CC_SPEED3
  796. PALETTE_END
  797. VS_SELECT_9:
  798. PAL_WAIT 0C0H
  799. MOVE.B #01110000B,D0
  800. AND.B PHASE+1(A5),D0
  801. OR.B #10000000B,D0 in game
  802. MOVE.B D0,PHASE+1(A5)
  803. MOVE.W #0,SUB_STEP(A5)
  804. RTS
  805. VS_SEL_CUT:
  806. JSR.S ACTIVE_TRIGER
  807. AND.B #11110000B,D2
  808. BEQ.S VS_SEL_CUT_1
  809. ADDQ.L #4,SP
  810. JMP SET_VS_SELECT_9
  811. VS_SEL_CUT_1:
  812. RTS
  813. VS_SOUND:
  814. ADD.W D0,D0
  815. ADD.W D1,D0
  816. ADD.W D0,D0
  817. MOVE.W VS_NAME_SOUND(PC,D0.W),D0
  818. JSR.S SET_SOUND
  819. RTS
  820. VS_NAME_SOUND:
  821. DC.W S_RYO1,S_RYO2
  822. DC.W S_ROBA1,S_ROBA2
  823. DC.W S_TODO1,S_TODO2
  824. DC.W S_JACK1,S_JACK2
  825. DC.W S_LEE1,S_LEE2
  826. DC.W S_KING1,S_KING2
  827. DC.W S_MIC1,S_MIC2
  828. DC.W S_JOHN1,S_JOHN2
  829. DC.W S_BIG2,S_BIG2
  830. DC.W S_OYAJI2,S_OYAJI2
  831. VS_SELECT_MOVE:
  832. TST.B 1(A1)
  833. BNE VS_SELECT_MOVE_1
  834. BTST.L #B_A_BUTTON,D2
  835. BNE VS_SELECT_MOVE_END
  836. AND.W #00001111B,D2
  837. BEQ VS_SELECT_MOVE_1
  838. MOVEQ.L #0,D0
  839. MOVE.B (A1),D0
  840. LSL.W #4,D0
  841. OR.W D2,D0
  842. MOVE.W SELC_MODE(A5),D7
  843. ADD.W D7,D7
  844. MOVE.W SEL_CU_ADD(PC,D7.W),D7
  845. ADD.W D0,D7
  846. MOVE.B VS_SEL_CU_DATA(PC,D7.W),D0
  847. MOVE.B D0,(A1)
  848. JSR SEL_CURSOR(PC)
  849. SOUND #S_SENTAKU
  850. VS_SELECT_MOVE_1:
  851. RTS
  852. VS_SELECT_MOVE_END:
  853. MOVE.B #1,1(A1)
  854. SOUND #S_KETTEI
  855. JSR SEL_CURSOR_STOP(PC)
  856. RTS
  857. SEL_CU_ADD:
  858. DC.W 0,16*10,16*20
  859. VS_SEL_CU_DATA:
  860. ;
  861. ; 2 0 1 3
  862. ; 8 4 5 6 7 9
  863. DC.B 0,0,5,0,2,2,4,0,1,1,6,0,0,0,0,0 0
  864. DC.B 1,1,6,1,0,0,5,1,3,3,7,1,1,1,1,1 1
  865. DC.B 2,2,4,2,2,2,4,2,0,0,5,2,2,2,2,2 2
  866. DC.B 3,3,7,3,1,1,6,3,3,3,7,3,3,3,3,3 3
  867. DC.B 4,2,4,4,4,2,4,4,5,0,5,4,4,4,4,4 4
  868. DC.B 5,0,5,5,4,2,4,5,6,1,6,5,5,5,5,5 5
  869. DC.B 6,1,6,6,5,0,5,6,7,3,7,6,6,6,6,6 6
  870. DC.B 7,3,7,7,6,1,6,7,7,3,7,7,7,7,7,7 7
  871. DC.B 8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 8
  872. DC.B 9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 9
  873. DC.B 0,0,5,0,2,2,4,0,1,1,6,0,0,0,0,0 0
  874. DC.B 1,1,6,1,0,0,5,1,3,3,7,1,1,1,1,1 1
  875. DC.B 2,2,4,2,2,2,4,2,0,0,5,2,2,2,2,2 2
  876. DC.B 3,3,7,3,1,1,6,3,3,3,7,3,3,3,3,3 3
  877. DC.B 4,2,4,4,8,2,4,4,5,0,5,4,4,4,4,4 4
  878. DC.B 5,0,5,5,4,2,4,5,6,1,6,5,5,5,5,5 5
  879. DC.B 6,1,6,6,5,0,5,6,7,3,7,6,6,6,6,6 6
  880. DC.B 7,3,7,7,6,1,6,7,7,3,7,7,7,7,7,7 7
  881. DC.B 8,8,8,8,8,8,8,8,4,8,8,8,8,8,8,8 8
  882. DC.B 9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 9
  883. DC.B 0,0,5,0,2,2,4,0,1,1,6,0,0,0,0,0 0
  884. DC.B 1,1,6,1,0,0,5,1,3,3,7,1,1,1,1,1 1
  885. DC.B 2,2,4,2,2,2,4,2,0,0,5,2,2,2,2,2 2
  886. DC.B 3,3,7,3,1,1,6,3,3,3,7,3,3,3,3,3 3
  887. DC.B 4,2,4,4,8,2,4,4,5,0,5,4,4,4,4,4 4
  888. DC.B 5,0,5,5,4,2,4,5,6,1,6,5,5,5,5,5 5
  889. DC.B 6,1,6,6,5,0,5,6,7,3,7,6,6,6,6,6 6
  890. DC.B 7,3,7,7,6,1,6,7,9,3,7,7,7,7,7,7 7
  891. DC.B 8,8,8,8,8,8,8,8,4,8,8,8,8,8,8,8 8
  892. DC.B 9,9,9,9,7,9,9,9,9,9,9,9,9,9,9,9 9
  893. INCLUDE WORK.INC
  894.