12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802 |
- ************************************************************************
- * *
- * 044 [RYUUKO NO KEN] *
- * STORY FASE PROGRAM *
- * by S.OKADA from 92/05/26 Tue 10:25 *
- * *
- ************************************************************************
- XDEF INIT_STORY_GAME,STORY_GAME
- XDEF STAGE_ENEMY
- XDEF STAGE_TIME_DEC
- XDEF LM_PAL_ACT
- XDEF GAME_OBJ_MAP,LEVER_SET_GAME
- XDEF DEMO_LEVER_SET
- XDEF DIST_SET
- XREF ?A5
- ;by EASY
- XREF INIT_MONO_SET
- XREF MONO_SET
- ;by MAIN
- XREF LP_MAIN
- ;by GAME_DSP
- XREF GAME_START_DISP,GAME_START_CL
- XREF GAME_TIME_DISP,TIME_OVER_DISP,TIME_OVER_CL
- XREF WINNER_DISP,DEMO_TITLE_SET,DKO_DISP
- XREF SCORE_DISP
- XREF NUMBER_MESS,BCD_BIN
- ;by MOVE
- XREF INIT_OVER_DEMO,OVER_DEMO
- ;by PHASE
- XREF ACTIVE_TRIGER
- ;by GAME_SUB
- XREF LWORK_DEAD
- ;by BACK
- XREF BACK2_INIT,BACK2_SCROLL_SET
- XREF BEFOR_SCROLL
- ;by HIT
- XREF HERO1_HIT_JUDGE
- XREF HERO2_HIT_JUDGE
- ;by DUMMY
- XREF BK_OBJECT_SET,BK_CHR_INIT
- ;by RANK
- XREF INIT_NAMING,NAMING
- ;by MESSAGE
- XREF MESS_SET
- ;by START
- XREF INIT_START_DEMO,START_DEMO
- SECT GAME,,C
- INCLUDE SYS.INC
- INCLUDE NEO_GEO.INC
- INCLUDE LABEL.INC
- INCLUDE HERO_TBL.INC
- INCLUDE HK3_TBL.INC
- INCLUDE MACRO.INC
- INCLUDE EASY_MAC.INC
- INCLUDE HFLAG.INC
- INCLUDE HERO_STP.INC
- INCLUDE CTRL_No.INC
- INCLUDE SMACRO.INC
- INCLUDE SCODE.INC
- IFNE 0
- sub step
- 0 stage start demo
- 1 round start demo
- 2 game play
- 3 dead slow
- 4 to winner
- 5 winner demo
- 6 to loser
- 7 loser demo
- ENDC
- INIT_STORY_GAME:
- AND.B #01111111B,PHASE+1(A5)
- JSR LEVER_SET(PC)
- LEA.L MLWORK1(A5),A6
- MOVE.W SUB_STEP(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.L ISG_VECTOR(PC,D0.W),A0
- JMP (A0)
- ISG_VECTOR:
- DC.L INIT_STAGE_COLOR 0
- DC.L INIT_ROUND_COLOR 1
- DC.L INIT_GAME_PLAY 2
- DC.L INIT_DEAD_SLOW 3
- DC.L INIT_TO_WINNER 4
- DC.L INIT_WINNER_DEMO 5
- DC.L INIT_TIME_UP 6
- DC.L INIT_TIME_UP 7
- DC.L INIT_STAGE_START 8
- DC.L INIT_ROUND_START 9
- DC.L INIT_TO_STOP 10
- DC.L INIT_DRAW_GAME 11
- DC.L INIT_ROUND_END 12
- DC.L INIT_OVER_DEMO 13
- DC.L INIT_NAMING 14
- DC.L INIT_START_DEMO 15
- STORY_GAME:
- JSR LEVER_SET(PC)
- LEA.L MLWORK1(A5),A6
- MOVE.W SUB_STEP(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.L SG_VECTOR(PC,D0.W),A0
- JMP (A0)
- SG_VECTOR:
- DC.L STAGE_COLOR 0
- DC.L ROUND_COLOR 1
- DC.L GAME_PLAY 2
- DC.L DEAD_SLOW 3
- DC.L TO_WINNER 4
- DC.L WINNER_DEMO 5
- DC.L TIME_UPM 6
- DC.L TIME_UPM 7
- DC.L STAGE_START 8
- DC.L ROUND_START 9
- DC.L TO_STOP 10
- DC.L DRAW_GAME 11
- DC.L ROUND_END 12
- DC.L OVER_DEMO 13
- DC.L NAMING 14
- DC.L START_DEMO 15
- LEVER_SET_GAME:
- LEVER_SET:
- LEA.L INPUT_1(A5),A0
- LEA.L PLAYER1(A5),A1
- BSR LEVER_SET_SUB
- LEA.L INPUT_2(A5),A0
- LEA.L PLAYER2(A5),A1
- LEVER_SET_SUB:
- MOVE.W 2(A0),PLAY_LEVER(A1)
- MOVE.B 1(A0),D0
- NOT.B D0
- MOVE.B 2(A0),D1
- NOT.B D1
- EOR.B D1,D0
- AND.B D1,D0
- MOVE.B D0,PLAY_LEVER+2(A1)
- RTS
- INIT_STAGE_COLOR:
- CLR.B ST_BACK_FLAG(A5)
- CLR.B IN_BONUS(A5)
- CLR.W INSERT_POS(A5)
- CLR.B ST_DEMO_IN(A5)
- JSR STAGE_STAGE_INIT(PC)
- RTS
- INIT_ROUND_COLOR:
- CLR.B ST_BACK_FLAG(A5)
- CLR.B IN_BONUS(A5)
- CLR.W INSERT_POS(A5)
- CLR.B ST_DEMO_IN(A5)
- JSR STAGE_STAGE_INIT(PC)
- RTS
- STAGE_COLOR:
- JSR STAGE_COLOR_SET(PC)
- BSET.B #7,PHASE+1(A5)
- MOVE.W #8,SUB_STEP(A5)
- RTS
- ROUND_COLOR:
- JSR STAGE_COLOR_SET(PC)
- BSET.B #7,PHASE+1(A5)
- MOVE.W #9,SUB_STEP(A5)
- RTS
- INIT_STAGE_START:
- CLR.W KING_MUNE(A5)
- CLR.W ROUND_No(A5)
- BTST.B #4,PHASE+1(A5)
- BNE INIT_ROUND_START
- TST.B ST_DEMO_ON(A5)
- BNE INIT_ROUND_START
- JSR STAGE_INIT(PC)
- MOVE.W #15,SUB_STEP(A5)
- OR.B #80H,PHASE+1(A5)
- RTS
- STAGE_START:
- JMP ROUND_START(PC)
- INIT_ROUND_START:
- CLR.W KING_MUNE(A5)
- JSR STAGE_INIT(PC)
- MOVE.W #9,SUB_STEP(A5)
- JSR GAME_START_DISP(PC)
- MOVE.B #60,BYTE_TIMER(A6)
- RTS
- ROUND_START:
- AND.B #11011111B,START_FLAG2(A5)
- TST.B COLOR_STATE(A5)
- BNE.S ROUND_START_1
- SUBQ.B #1,BYTE_TIMER(A6)
- BNE.S ROUND_START_1
- MOVE.W #2,SUB_STEP(A5)
- JSR GAME_START_CL(PC)
- ROUND_START_1:
- LEA.L HERO1(A5),A6
- JSR LM_HERO
- LEA.L HERO2(A5),A6
- JSR LM_HERO
- JSR BEFOR_SCROLL(PC)
- JSR BACK2_SCROLL_SET(PC)
- RTS
- INIT_TIME_UP:
- AND.B #01111111B,PHASE+1(A5)
- MOVE.B #60,TIME_UP_TIMER(A5)
- JSR TIME_OVER_DISP(PC)
- TIME_UPM:
- MOVE.B #1,NON_CTRL(A5)
- JSR IN_GAME(PC)
- SUBQ.B #1,TIME_UP_TIMER(A5)
- BNE.S TIME_UPM_1
- MOVE.W #10,SUB_STEP(A5)
- JSR TIME_OVER_CL(PC)
- TIME_UPM_1:
- RTS
- INIT_TO_STOP:
- AND.B #01111111B,PHASE+1(A5)
- TO_STOP:
- MOVE.B #1,NON_CTRL(A5)
- JMP DEAD_SLOW_1(PC)
- INIT_DEAD_SLOW:
- AND.B #01111111B,PHASE+1(A5)
- MOVE.B #11B,SLOW_CUT(A5)
- MOVE.B LSPC_MODE_STORE(A5),(A5)
- MOVE.W (A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.B LSPC_MODE_STORE+1(A5),D0
- MOVE.W D0,LSPC_MODE_STORE(A5)
- MOVE.W D0,LSPC_MODE
- DEAD_SLOW:
- MOVE.B #1,NON_CTRL(A5)
- MOVE.B SLOW_CUT(A5),D0
- BPL.S DEAD_SLOW_0
- BSR NORMAL_AUTO
- MOVEQ.L #0,D0
- MOVE.B D0,SLOW_CUT(A5)
- DEAD_SLOW_0:
- AND.B MAIN_COUNT+3(A5),D0
- BEQ DEAD_SLOW_1
- MOVE.B #1,LP_MAIN_RUN(A5)
- RTS
- DEAD_SLOW_1:
- JSR IN_GAME(PC)
- JSR NORMAL_POSE_CHECK(PC)
- BEQ.S DEAD_SLOW_2
- RTS
- DEAD_SLOW_2:
- BSR NORMAL_AUTO
- JSR WINNER_JUDGE(PC)
- JSR ROUND_JUDGE(PC)
- OR.B #10000000B,PHASE+1(A5)
- TST.B DRAW_FLAG(A5)
- BNE.S DEAD_SLOW_3
- MOVE.W #4,SUB_STEP(A5)
- RTS
- DEAD_SLOW_3:
- MOVE.W HERO1+HERO_LIFE(A5),D0
- OR.W HERO2+HERO_LIFE(A5),D0
- BNE.S DS_TIME
- JSR DKO_DISP
- DS_TIME:
- MOVE.W #11,SUB_STEP(A5)
- RTS
- NORMAL_AUTO:
- TST.B SLOW_CUT(A5)
- BEQ.S NORMAL_AUTO_1
- MOVE.B LSPC_MODE_STORE(A5),(A5)
- MOVE.W (A5),D0
- LSR.W #2,D0
- MOVE.B LSPC_MODE_STORE+1(A5),D0
- MOVE.W D0,LSPC_MODE_STORE(A5)
- MOVE.W D0,LSPC_MODE
- NORMAL_AUTO_1:
- RTS
- NORMAL_POSE_CHECK:
- LEA.L HERO1(A5),A1
- JSR NPC_2(PC)
- BNE.S NPC_1
- LEA.L HERO2(A5),A1
- JSR NPC_2(PC)
- NPC_1:
- RTS
- NPC_2:
- TST.W HERO_LIFE(A1)
- BEQ.S NPC_3
- CMP.B #HERO_STOP_STEP,STEP1(A1)
- RTS
- NPC_3:
- MOVEP.W WORK_N0(A1),D0
- CLR.B D0
- TST.B ACT_FLAG(A5,D0.W)
- BMI.S NPC_4
- MOVEQ.L #1,D0
- RTS
- NPC_4:
- MOVEQ.L #0,D0
- RTS
- INIT_GAME_PLAY:
- AND.B #01111111B,PHASE+1(A5)
- GAME_PLAY:
- AND.B #11011111B,START_FLAG2(A5)
- CLR.B PAUSE_DI(A5)
- CLR.B NON_CTRL(A5)
- JSR GAME_CHECK(PC)
- IN_GAME:
- JSR SCORE_DISP(PC)
- BSR NEXT_AREA
- BSR DIST_SET
- BSR DEMO_LEVER_SET
- TST.B NON_CTRL(A5)
- BEQ.S IN_GAME_1
- CLR.W HERO1+PLAY_LEVER(A5)
- CLR.B HERO1+PLAY_LEVER+2(A5)
- CLR.W HERO2+PLAY_LEVER(A5)
- CLR.B HERO2+PLAY_LEVER+2(A5)
- LEA.L HERO1(A5),A6
- JSR PWORK_HIT
- LEA.L HERO2(A5),A6
- JSR PWORK_HIT
- BRA IN_GAME_2
- IN_GAME_1:
- LEA.L HERO1(A5),A6
- JSR PWORK_HIT
- LEA.L HERO2(A5),A6
- JSR PWORK_HIT
- LEA.L PLAYER1(A5),A6
- JSR HK3_SYSTEM
- LEA.L PLAYER2(A5),A6
- JSR HK3_SYSTEM
- IN_GAME_2:
- LEA.L HERO1(A5),A6
- JSR LM_HERO
- LEA.L HERO2(A5),A6
- JSR LM_HERO
- JSR BEFOR_SCROLL(PC)
- JSR BACK2_SCROLL_SET(PC)
- JSR LP_MAIN(PC)
- JSR HERO1_HIT_JUDGE
- JSR HERO2_HIT_JUDGE
- RTS
- DEMO_LEVER_SET:
- BTST.B #6,PHASE+1(A5)
- BNE.S DLS_1
- TST.B HOW_TO_FLAG(A5)
- BNE.S DLS_1
- RTS
- DLS_1:
- LEA.L HERO1(A5),A1
- BSR DLS_2
- LEA.L HERO2(A5),A1
- DLS_2:
- BTST.B #BHS_AUTO,HERO_STATE(A1)
- BNE DLS_3
- SUBQ.W #1,DEMO_LEV_COUNT(A1)
- MOVE.L DEMO_LEVER(A1),A0
- MOVEQ.L #DEMO_IN,D0
- AND.B DEBUG_DIP1(A5),D0
- BNE DLS_IN
- MOVE.B (A0)+,D0
- MOVE.B D0,D2
- MOVE.L A0,DEMO_LEVER(A1)
- MOVE.B PLAY_LEVER2(A1),D1
- MOVE.B D1,D3
- MOVE.B D0,PLAY_LEVER+PLAYER_OFFSET(A1)
- MOVE.B D0,PLAY_LEVER2(A1)
- EOR.B D0,D1
- AND.B D0,D1
- MOVE.B D1,PLAY_LEVER+1+PLAYER_OFFSET(A1)
- NOT.B D3
- NOT.B D2
- EOR.B D2,D3
- AND.B D2,D3
- MOVE.B D3,PLAY_LEVER+2+PLAYER_OFFSET(A1)
- DLS_3:
- RTS
- DLS_IN:
- MOVE.B PLAY_LEVER+PLAYER_OFFSET(A1),(A0)+
- MOVE.L A0,DEMO_LEVER(A1)
- RTS
- NEXT_AREA:
- BTST.B #7,DEBUG_DIP1(A5)
- BEQ.S NEXT_AREA_2
- BTST.B #4,PHASE+1(A5)
- BNE.S NEXT_AREA_2
- BTST.B #BPS_IN_GAME,PLAYER1+PLAYER_STATE(A5)
- BEQ.S NEXT_AREA_1
- BTST.B #B_P1_START,INPUT_S+1(A5)
- BNE NEXT_AREA_3
- NEXT_AREA_1:
- BTST.B #BPS_IN_GAME,PLAYER2+PLAYER_STATE(A5)
- BEQ.S NEXT_AREA_2
- BTST.B #B_P2_START,INPUT_S+1(A5)
- BNE NEXT_AREA_3
- NEXT_AREA_2:
- RTS
- NEXT_AREA_3:
- LEA.L PLAYER1(A5),A0
- TST.W STORY_PLAYER(A5)
- BEQ.S NEXT_AREA_4
- LEA.L PLAYER2(A5),A0
- NEXT_AREA_4:
- MOVE.L A0,WIN_PLAYER(A5)
- OR.B #10000000B,PHASE+1(A5)
- MOVE.B #1,STAGE_END_FLAG(A5)
- MOVE.W #12,SUB_STEP(A5)
- RTS
- GAME_CHECK:
- TST.W HERO1+HERO_LIFE(A5)
- BEQ.S ROUND_OVER
- TST.W HERO2+HERO_LIFE(A5)
- BEQ.S ROUND_OVER
- JSR STAGE_TIME_DEC(PC)
- TST.B STAGE_TIME(A5)
- BEQ.S TIME_OVER
- RTS
- TIME_OVER:
- OR.B #10000000B,PHASE+1(A5)
- MOVE.W #6,SUB_STEP(A5)
- RTS
- ROUND_OVER:
- OR.B #10000000B,PHASE+1(A5)
- MOVE.W #3,SUB_STEP(A5)
- RTS
- STAGE_TIME_DEC:
- SUBQ.B #1,STAGE_TIME+1(A5)
- BGT.S STD_2
- MOVE.B SECOND_VALUE(A5),STAGE_TIME+1(A5)
- BTST.B #TIME_STOP,DEBUG_DIP2(A5)
- BNE.S STD_1
- SUB.B D0,D0
- MOVE.B STAGE_TIME(A5),D0
- MOVE.B #1,D1
- SBCD.B D1,D0
- MOVE.B D0,STAGE_TIME(A5)
- CMP.B #10,D0
- BCC.S STD_1
- SOUND #1BH*2
- STD_1:
- JSR GAME_TIME_DISP(PC)
- STD_2:
- RTS
- WINNER_JUDGE:
- ; out)DRAW_FLAG = 1 draw
- ; =0 A1 winner
- ; A2 loser
- ; BSR GET_LIFE_PER
- ;
- MOVE.B #1,DRAW_FLAG(A5)
- LEA.L HERO1(A5),A1
- LEA.L HERO2(A5),A2
- MOVE.W HERO_LIFE(A1),D0
- SUB.W HERO_LIFE(A2),D0
- BEQ WINNER_JUDGE_3
- BCC WINNER_JUDGE_2
- EXG.L A1,A2
- WINNER_JUDGE_2:
- MOVE.L ANOTHER_PLAYER+PLAYER_OFFSET(A2),WIN_PLAYER(A5)
- CLR.B DRAW_FLAG(A5)
- ADDQ.W #1,WIN_ROUND+PLAYER_OFFSET(A1)
- WINNER_JUDGE_3:
- RTS
- GET_LIFE_PER:
- MOVEQ.L #0,D0
- MOVE.B HERO1+LIFE_GAGE(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVEQ.L #0,D1
- MOVE.B HERO1+HERO_LIFE+1(A5),(A5)
- MOVE.W (A5),D1
- DIVU D0,D1
- MOVE.W D1,HERO1+LIFE_PER(A5)
- MOVE.B HERO2+LIFE_GAGE(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVEQ.L #0,D1
- MOVE.B HERO2+HERO_LIFE+1(A5),(A5)
- MOVE.W (A5),D1
- DIVU D0,D1
- MOVE.W D1,HERO2+LIFE_PER(A5)
- RTS
- ROUND_JUDGE:
- CLR.B STAGE_END_FLAG(A5)
- ADDQ.W #1,ROUND_No(A5)
- MOVE.W ROUND_No(A5),D4
- MOVE.W WIN_ROUND+PLAYER_OFFSET(A1),D1
- MOVE.W WIN_ROUND+PLAYER_OFFSET(A2),D2
- CMP.W D2,D1
- BEQ ROUND_JUDGE_SAME
- BHS.S ROUND_JUDGE_1
- EXG.L A1,A2
- EXG.L D1,D2
- ROUND_JUDGE_1:
- MOVE.W MAX_ROUND(A5),D0
- CMP.W D0,D4
- BHS ROUND_JUDGE_100
- CMP.W WINNER_ROUND(A5),D1
- BHS ROUND_JUDGE_100
- SUB.W D2,D1
- SUB.W D4,D0
- CMP.W D0,D1
- BHI ROUND_JUDGE_100
- RTS
- ROUND_JUDGE_100:
- MOVE.L ANOTHER_PLAYER+PLAYER_OFFSET(A2),WIN_PLAYER(A5)
- MOVE.B #1,STAGE_END_FLAG(A5)
- CLR.B DRAW_FLAG(A5)
- RTS
- ROUND_JUDGE_SAME:
- CMP.W MAX_ROUND(A5),D4
- BHI.S EXTRA_DRAW
- ; BEQ.S FINAL_DRAW
- RTS
- EXTRA_DRAW:
- BTST.B #4,PHASE+1(A5)
- BNE EXTRA_DRAW_VS
- BTST.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A1)
- BEQ.S EXTRA_DRAW_STORY_1
- EXG.L A1,A2
- EXTRA_DRAW_STORY_1:
- MOVE.L ANOTHER_PLAYER+PLAYER_OFFSET(A2),WIN_PLAYER(A5)
- MOVE.B #1,STAGE_END_FLAG(A5)
- CLR.B DRAW_FLAG(A5)
- RTS
- EXTRA_DRAW_VS:
- MOVE.W OLD_VS(A5),D0
- BMI.S EXTRA_DRAW_VS_2
- CLR.B DRAW_FLAG(A5)
- CMP.W PLAYER_No(A1),D0
- BEQ.S EXTRA_DRAW_VS_1
- EXG.L A1,A2
- EXTRA_DRAW_VS_1:
- MOVE.L ANOTHER_PLAYER+PLAYER_OFFSET(A2),WIN_PLAYER(A5)
- EXTRA_DRAW_VS_2:
- MOVE.B #1,STAGE_END_FLAG(A5)
- RTS
- DIST_SET:
- MOVE.W HERO1+X_POSITION(A5),D0
- SUB.W HERO2+X_POSITION(A5),D0
- BPL.S DIST_SET_1
- NEG.W D0
- DIST_SET_1:
- MOVE.W D0,TEMP_DISTANCE(A5)
- SUB.W MIN_DISTANCE(A5),D0
- BPL.S DIST_SET_2
- MOVEQ.L #0,D0
- DIST_SET_2:
- MOVE.W D0,TEMP_DISTANCE2(A5)
- RTS
- INIT_TO_WINNER:
- AND.B #01111111B,PHASE+1(A5)
- MOVE.B #3,BACK2+MASTER_REQUEST(A5)
- TO_WINNER:
- MOVE.B #1,NON_CTRL(A5)
- JSR IN_GAME(PC)
- BTST.B #0,BACK2+MASTER_REQUEST(A5)
- BNE.S TO_WINNER_1
- MOVE.W #5,SUB_STEP(A5)
- OR.B #10000000B,PHASE+1(A5)
- TO_WINNER_1:
- RTS
- INIT_DRAW_GAME:
- MOVE.W #200H,WORD_TIMER(A6)
- AND.B #01111111B,PHASE+1(A5)
- RTS
- INIT_WINNER_DEMO:
- MOVE.L WIN_PLAYER(A5),A6
- LEA.L HERO_OFFSET(A6),A6
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- LEA.L 0(A5,D0.W),A4
- MOVE.W #CTRL_WIN,D4
- JSR CTRL_CHANGE
- MOVE.W #0,MAIN_STEP(A5)
- AND.B #01111111B,PHASE+1(A5)
- RTS
- WINNER_DEMO:
- MOVE.B #1,NON_CTRL(A5)
- JSR IN_GAME(PC)
- MOVE.W MAIN_STEP(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- JMP WIN_VECTOR(PC,D0.W)
- WIN_VECTOR:
- JMP TO_WIN_END(PC)
- JMP TIME_WIN(PC)
- JMP PER_WIN(PC)
- JMP TOTAL_WIN(PC)
- JMP TOTAL_WIN2(PC)
- JMP WIN_OVER(PC)
- JMP LIFE_WIN(PC)
- TO_WIN_END:
- MOVE.L WIN_PLAYER(A5),A6
- LEA.L HERO_OFFSET(A6),A6
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- TST.B ACT_FLAG(A5,D0.W)
- BMI.S LIFE_WIN_0
- RTS
- LIFE_WIN_0:
- CLR.L SCORE_TOTAL(A5)
- JSR WINNER_DISP(PC)
- BTST.B #4,PHASE+1(A5)
- BNE TO_WIN_OVER
- MOVE.L WIN_PLAYER(A5),A1
- BTST.B #BPS_COM_FLAG,PLAYER_STATE(A1)
- BEQ TO_WIN_OVER
- MOVE.W #6,MAIN_STEP(A5)
- MOVE.B #40,MLWORK1+BYTE_TIMER(A5)
- RTS
- LIFE_WIN:
- SUBQ.B #1,MLWORK1+BYTE_TIMER(A5)
- BEQ.S LIFE_WIN_1
- RTS
- LIFE_WIN_1:
- BSR LIFE_SCORE_CAL
- MOVE.L SCORE_LIFE(A5),D1
- ADD.L D1,SCORE_TOTAL(A5)
- MOVE.W #8FH,D0
- JSR NUMBER_MESS(PC)
- MOVE.B #3,MLWORK1+BYTE_TIMER(A5)
- MOVE.W #1,MAIN_STEP(A5)
- RTS
- TIME_WIN:
- SUBQ.B #1,MLWORK1+BYTE_TIMER(A5)
- BEQ.S TIME_WIN_1
- RTS
- TIME_WIN_1:
- BSR TIME_SCORE_CAL
- MOVE.L SCORE_TIME(A5),D1
- ADD.L D1,SCORE_TOTAL(A5)
- MOVE.W #90H,D0
- JSR NUMBER_MESS(PC)
- MOVE.B #3,MLWORK1+BYTE_TIMER(A5)
- MOVE.W #2,MAIN_STEP(A5)
- RTS
- PER_WIN:
- SUBQ.B #1,MLWORK1+BYTE_TIMER(A5)
- BEQ.S PER_WIN_1
- RTS
- PER_WIN_1:
- BSR PER_SCORE_CAL
- MOVE.L SCORE_PER(A5),D1
- BEQ PER_WIN_2
- ADD.L D1,SCORE_TOTAL(A5)
- MOVE.W #91H,D0
- JSR NUMBER_MESS(PC)
- PER_WIN_2:
- MOVE.B #3,MLWORK1+BYTE_TIMER(A5)
- MOVE.W #3,MAIN_STEP(A5)
- RTS
- TOTAL_WIN:
- SUBQ.B #1,MLWORK1+BYTE_TIMER(A5)
- BEQ.S TOTAL_WIN_1
- RTS
- TOTAL_WIN_1:
- MOVE.L SCORE_TOTAL(A5),D1
- MOVE.W #92H,D0
- JSR.S NUMBER_MESS(PC)
- MOVE.B #40,MLWORK1+BYTE_TIMER(A5)
- MOVE.W #4,MAIN_STEP(A5)
- RTS
- TOTAL_WIN2:
- JSR ACTIVE_TRIGER
- BTST.L #B_A_BUTTON,D2
- BNE.S TOTAL_WIN1_1
- SUBQ.B #1,MLWORK1+BYTE_TIMER(A5)
- BEQ.S TOTAL_WIN1_1
- RTS
- TOTAL_WIN1_1:
- TW1_20:
- MOVE.L #10000,D0
- MOVE.L #10000H,D3
- MOVE.L SCORE_TOTAL(A5),D1
- CMP.L D0,D1
- BHI TW1_2
- MOVE.L #1000,D0
- MOVE.L #1000H,D3
- CMP.L D0,D1
- BHI TW1_2
- MOVE.L #100,D0
- MOVE.L #100H,D3
- CMP.L D0,D1
- BHI TW1_2
- MOVE.L #10,D0
- MOVE.L #10H,D3
- CMP.L D0,D1
- BHI TW1_2
- MOVE.L #1,D0
- MOVE.L #1,D3
- TW1_2:
- MOVE.L D3,REG_D0(A5)
- SUB.L D0,D1
- MOVE.L D1,SCORE_TOTAL(A5)
- MOVE.L WIN_PLAYER(A5),A0
- LEA.L HERO_SCORE+HERO_OFFSET+4(A0),A0
- LEA.L REG_D0+4(A5),A1
- SUB.W D0,D0
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- ABCD.B -(A1),-(A0)
- TST.L D1
- BEQ.S TW1_3
- BTST.L #B_A_BUTTON,D2
- BNE TW1_20
- TW1_3:
- MOVE.W #92H,D0
- JSR.S NUMBER_MESS(PC)
- SOUND #S_COUNT
- TST.L SCORE_TOTAL(A5)
- BEQ TO_WIN_OVER
- MOVE.B #6,MLWORK1+BYTE_TIMER(A5)
- RTS
- PER_SCORE_CAL:
- CLR.L SCORE_PER(A5)
- TST.B STAGE_TIME(A5)
- BEQ PSC_1
- MOVE.L WIN_PLAYER(A5),A1
- MOVEQ.L #0,D0
- MOVE.B STORY_LIFE(A5),D0
- MOVE.W D0,D1
- ADD.W D0,D0
- ADD.W D0,D0
- ADD.W D0,D0
- CMP.W HERO_LIFE+HERO_OFFSET(A1),D0
- BNE PSC_1
- SUB.W #12,D1
- MULU #5000,D1
- ADD.L #20000,D1
- MOVE.L D1,SCORE_PER(A5)
- PSC_1:
- RTS
- TIME_SCORE_CAL:
- MOVEQ.L #0,D1
- MOVE.B STAGE_TIME(A5),D1
- JSR BCD_BIN(PC)
- MULU #100,D1
- MOVE.L D1,SCORE_TIME(A5)
- RTS
- LIFE_SCORE_CAL:
- CLR.L SCORE_LIFE(A5)
- MOVE.L WIN_PLAYER(A5),A1
- MOVE.W HERO_LIFE+HERO_OFFSET(A1),D1
- CMP.W #96,D1
- BCS.S LSC_1
- SUB.W #96,D1
- MULU #400,D1
- MOVE.L D1,SCORE_LIFE(A5)
- MOVEQ.L #95,D1
- LSC_1:
- CMP.W #16,D1
- BCS.S LSC_2
- SUB.W #16,D1
- MULU #200,D1
- ADD.L D1,SCORE_LIFE(A5)
- MOVEQ.L #15,D1
- LSC_2:
- MULU #100,D1
- ADD.L D1,SCORE_LIFE(A5)
- RTS
- TO_WIN_OVER:
- LEA.L MLWORK1(A5),A6
- MOVE.W #200H,WORD_TIMER(A6)
- MOVE.W #5,MAIN_STEP(A5)
- RTS
- WIN_OVER:
- LEA.L MLWORK1(A5),A6
- SEC_TIMER WORD_TIMER
- BCS.S WIN_OVER_1
- RTS
- WIN_OVER_1:
- OR.B #10000000B,PHASE+1(A5)
- MOVE.W #14,SUB_STEP(A5)
- RTS
- DRAW_GAME:
- LEA.L MLWORK1(A5),A6
- SEC_TIMER WORD_TIMER
- BCS.S DRAW_GAME_1
- MOVE.B #1,NON_CTRL(A5)
- JSR IN_GAME(PC)
- RTS
- DRAW_GAME_1:
- OR.B #10000000B,PHASE+1(A5)
- MOVE.W #12,SUB_STEP(A5)
- RTS
- INIT_ROUND_END:
- MOVE.W #FADE_OUT+CC_SPEED3,D0
- MOVE.W #100H-1,D7
- LEA.L COLOR_BUFFER(A5),A0
- INIT_ROUND_END_1:
- MOVE.W D0,(A0)
- LEA.L 20H(A0),A0
- DBRA D7,INIT_ROUND_END_1
- MOVE.B #1,COLOR_STATE(A5)
- TST.B STAGE_END_FLAG(A5)
- BEQ.S INIT_ROUND_END_2
- MOVE.W #S_FADESPEED_5,D0
- JSR.S SET_BGM
- INIT_ROUND_END_2:
- RTS
- ROUND_END:
- PAL_WAIT 0FFH
- MOVE.W #31H,D0
- JSR.S MESS_SET
- OR.B #10000000B,PHASE+1(A5)
- TST.B STAGE_END_FLAG(A5)
- BEQ.S ROUND_END_1
- BTST.B #4,PHASE+1(A5)
- BNE VS_ROUND_END
- MOVE.W #13,SUB_STEP(A5)
- RTS
- ROUND_END_1:
- MOVE.W #1,SUB_STEP(A5)
- RTS
- VS_ROUND_END:
- MOVE.W #0,ROUND_No(A5)
- MOVE.W #0,SUB_STEP(A5)
- MOVE.B #01110000B,D0
- AND.B PHASE+1(A5),D0
- OR.B #10000101B,D0
- MOVE.B D0,PHASE+1(A5)
- RTS
- STAGE_INIT:
- MOVE.W AREA_No(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- JMP STAGE_INIT_VECTOR-4(PC,D0.W)
- STAGE_INIT_VECTOR:
- JMP INIT_1STG(PC)
- JMP INIT_2STG(PC)
- JMP INIT_1BNS(PC)
- JMP INIT_3STG(PC)
- JMP INIT_4STG(PC)
- JMP INIT_2BNS(PC)
- JMP INIT_5STG(PC)
- JMP INIT_6STG(PC)
- JMP INIT_3BNS(PC)
- JMP INIT_7STG(PC)
- JMP INIT_8STG(PC)
- JMP INIT_ESTG(PC)
- INIT_1STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- RTS
- INIT_2STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- LCHILD WORK_N0,L_PAL_ACT,PAL_ACT2S_1
- CLR.W WORD_TIMER(A0)
- CLR.B BYTE_TIMER(A0)
- CLR.B STEP2(A0)
- CLR.B SPEED(A0)
- RTS
- INIT_3STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- LCHILD WORK_N0,L_PAL_ACT,PAL_ACT3S_1
- MOVE.W #1,WORD_TIMER(A0)
- MOVE.B #1,STEP1(A0)
- RTS
- INIT_4STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- RTS
- INIT_5STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- RTS
- INIT_6STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- RTS
- INIT_7STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- LCHILD WORK_N0,L_PAL_ACT,PAL_ACT7S_1
- CLR.W WORD_TIMER(A0)
- CLR.B BYTE_TIMER(A0)
- CLR.B STEP2(A0)
- RTS
- INIT_8STG:
- JSR NORMAL_STAGE_INIT(PC)
- LEA.L MLWORK1(A5),A6
- RTS
- INIT_ESTG:
- CLR.W MIN_DISTANCE(A5)
- JSR STAGE_PLAYER_SET(PC)
- JSR STAGE_PARM_INIT(PC)
- MOVE.W HERO2+X_POSITION(A5),D0
- MOVE.W D0,D1
- ADD.W HERO1+X_POSITION(A5),D0
- LSR.W #1,D0
- MOVE.W D0,REG_D0(A5)
- MOVE.W BACK2_ST_BIG(A5),REG_D1(A5)
- JSR BACK2_INIT(PC)
- LEA.L MLWORK1(A5),A6
- RTS
- INIT_1BNS:
- INIT_2BNS:
- INIT_3BNS:
- RTS
- NORMAL_STAGE_INIT:
- CLR.W MIN_DISTANCE(A5)
- JSR STAGE_PLAYER_SET(PC)
- JSR STAGE_PARM_INIT(PC)
- MOVE.W HERO2+X_POSITION(A5),D0
- MOVE.W D0,D1
- ADD.W HERO1+X_POSITION(A5),D0
- LSR.W #1,D0
- MOVE.W D0,REG_D0(A5)
- MOVE.W BACK2_ST_BIG(A5),REG_D1(A5)
- JSR BACK2_INIT(PC)
- JSR BK_CHR_INIT(PC)
- JSR BK_OBJECT_SET(PC)
- RTS
- STAGE_PARM_INIT:
- BSR STAGE_LEVEL_SET
- TST.W ROUND_No(A5)
- BNE STAGE_PARM_INIT_1
- MOVEQ.L #0,D0
- MOVE.W D0,PLAYER1+WIN_ROUND(A5)
- MOVE.W D0,PLAYER2+WIN_ROUND(A5)
- MOVE.B GAME_DIP+SD_ROUND(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.W STAGE_ROUND_DT(PC,D0.W),MAX_ROUND(A5)
- MOVE.W STAGE_ROUND_DT+2(PC,D0.W),WINNER_ROUND(A5)
- STAGE_PARM_INIT_1:
- BTST.B #6,PHASE+1(A5)
- BNE DEMO_TIME
- MOVEQ.L #0,D0
- MOVE.B D0,DEMO_FLAG(A5)
- MOVE.B GAME_DIP+SD_ROUND_TIME(A5),D0
- MOVE.B STAGE_BCD(PC,D0.W),STAGE_TIME(A5)
- MOVE.B SECOND_VALUE(A5),STAGE_TIME+1(A5)
- RTS
- DEMO_TIME:
- MOVE.B #1,DEMO_FLAG(A5)
- MOVE.B #60H,STAGE_TIME(A5)
- MOVE.B SECOND_VALUE(A5),STAGE_TIME+1(A5)
- RTS
- STAGE_ROUND_DT:
- DC.W 1,1
- DC.W 3,2
- DC.W 5,3
- STAGE_BCD:
- DC.B 10H,10H,10H,10H,10H,10H,10H,10H,10H,10H
- DC.B 10H,11H,12H,13H,14H,15H,16H,17H,18H,19H
- DC.B 20H,21H,22H,23H,24H,25H,26H,27H,28H,29H
- DC.B 30H,31H,32H,33H,34H,35H,36H,37H,38H,39H
- DC.B 40H,41H,42H,43H,44H,45H,46H,47H,48H,49H
- DC.B 50H,51H,52H,53H,54H,55H,56H,57H,58H,59H
- DC.B 60H,61H,62H,63H,64H,65H,66H,67H,68H,69H
- DC.B 70H,71H,72H,73H,74H,75H,76H,77H,78H,79H
- DC.B 80H,81H,82H,83H,84H,85H,86H,87H,88H,89H
- DC.B 90H,91H,92H,93H,94H,95H,96H,97H,98H,99H
- REPT 156
- DC.B 99H
- ENDR
- STAGE_LEVEL_SET:
- MOVE.W LEVEL_TEMP(A5),D0
- BTST.B #6,PHASE+1(A5)
- BNE.S SLS_1
- MOVEQ.L #0,D0
- MOVE.B GAME_DIP+SD_LEVEL(A5),D0
- ADD.W D0,D0
- MOVE.W ORG_LEVEL_DATA(PC,D0.W),D0
- MOVE.W D0,LEVEL_ORG(A5)
- ADD.W LEVEL_ADD(A5),D0
- MOVE.W D0,LEVEL_TEMP(A5)
- SLS_1:
- ADD.W D0,D0
- MOVE.W ATTACK_MULD(PC,D0.W),ATTACK_MUL(A5)
- RTS
- ORG_LEVEL_DATA:
- DC.W 00,01,02,03,04,05,06,07
- ATTACK_MULD:
- DC.W (90*256)/100 1
- DC.W (95*256)/100 2
- DC.W (100*256)/100 3
- DC.W (105*256)/100 4
- DC.W (110*256)/100 5
- DC.W (115*256)/100 6
- DC.W (120*256)/100 7
- DC.W (125*256)/100 8
- ; DC.W (80*256)/100 1
- ; DC.W (90*256)/100 2
- ; DC.W (100*256)/100 3
- ; DC.W (110*256)/100 4
- ; DC.W (120*256)/100 5
- ; DC.W (130*256)/100 6
- ; DC.W (140*256)/100 7
- ; DC.W (150*256)/100 8
- STAGE_STAGE_INIT:
- JSR.S PWORK_INIT
- JSR LWORK_DEAD(PC)
- LEA.L GAME_OBJ_MAP(PC),A0
- JSR.S OBJ_MAP_SET
- RTS
- GAME_OBJ_MAP: ; sp_no(0~379):sp_cnt(sp_max)
- DC.W 0031H,0050H,0 obj 1 80
- DC.W 0081H,0050H,1 obj 2 80*2
- DC.W 0121H,002CH,0 obj 3 44
- DC.W 014DH,0018H,1 obj 4 24*2
- DC.W 080H,80H+5*4,0C0H,80H+2*4,0E0H,80H+7*4,-1 div
- STAGE_PLAYER_SET:
- BSR POS_X_GET
- MOVE.W D0,-(SP)
- SWAP D0
- LEA.L HERO1(A5),A6
- MOVE.W D0,X_POSITION(A6)
- BSR SPS_SUB
- BSR HERO_1st_CALL
- LEA.L HERO2(A5),A6
- MOVE.W (SP)+,X_POSITION(A6)
- BSR SPS_SUB
- BSR HERO_1st_CALL
- LEA.L HERO2(A5),A1
- MOVE.W HERO_TYPE+HERO1(A5),D0
- CMP.W HERO_TYPE(A1),D0
- BNE.S SPS_1
- MOVEP.W WORK_N0(A1),D0
- CLR.B D0
- ADD.B #3,PALETTE_ADD(A5,D0.W)
- MOVEP.W WORK_N1(A1),D0
- CLR.B D0
- ADD.B #3,PALETTE_ADD(A5,D0.W)
- SPS_1:
- JSR DEMO_TITLE_SET(PC)
- RTS
- POS_X_GET:
- MOVEQ.L #0,D0
- BTST.B #4,PHASE+1(A5)
- BNE.S PXG_1
- TST.B ST_DEMO_ON(A5)
- BNE.S PXG_1
- MOVE.W STORY_STAGE(A5),D0
- PXG_1:
- MOVE.W D0,D1
- ADD.W D0,D0
- ADD.W D1,D0
- ADD.W D0,D0
- MOVE.W PXG_DATA(PC,D0.W),BACK2_ST_BIG(A5)
- MOVE.L PXG_DATA+2(PC,D0.W),D0
- TST.W D1
- BEQ.S PXG_2
- TST.W STORY_PLAYER(A5)
- BEQ.S PXG_2
- NEG.W D0
- ADD.W #300H,D0
- SWAP D0
- NEG.W D0
- ADD.W #300H,D0
- PXG_2:
- RTS
- RUN_DIS EQU 0B4H
- JUMP_DIS EQU 0ACH
- P1_SE EQU 0E8H
- P2_SE EQU 216H
- PXG_DATA:
- DC.W 100H,180H-2CH,180H+2CH
- DC.W 100H,P1_SE+JUMP_DIS,P2_SE 1
- DC.W 100H,P2_SE-58H,P2_SE 2
- DC.W 100H,180H-2CH,180H+2CH
- DC.W 100H,P1_SE+RUN_DIS+JUMP_DIS,P1_SE+RUN_DIS+JUMP_DIS+58H 3
- DC.W 100H,P1_SE+JUMP_DIS,P2_SE 4
- DC.W 100H,180H-2CH,180H+2CH
- DC.W 100H,P1_SE+RUN_DIS,P2_SE 5
- DC.W 100H,180H-2CH,180H+2CH 6
- DC.W 100H,180H-2CH,180H+2CH
- DC.W 100H,P1_SE+JUMP_DIS,P2_SE 7
- DC.W 100H,P1_SE,P2_SE-JUMP_DIS 8
- DC.W 100H,280H-16H,280H+16H END
- HERO_1st_CALL:
- JSR HERO_1st
- CMP.W #9,HERO_TYPE(A6)
- BNE.S H1C_00
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- ADD.B #4AH,PALETTE_ADD(A5,D0.W)
- H1C_00:
- LEA.L PLAYER_OFFSET(A6),A6
- JSR INIT_HK3
- H1C_1:
- RTS
- SPS_SUB:
- BTST.B #6,PHASE+1(A5)
- BNE.S SPS_SUB_1
- BTST.B #4,PHASE+1(A5)
- BNE.S SPS_SUB_1
- MOVE.W PLAYER_No+PLAYER_OFFSET(A6),D0
- CMP.W STORY_PLAYER(A5),D0
- BNE STAGE_ENEMY_SET
- SPS_SUB_1:
- BSET.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A6)
- RTS
- STAGE_ENEMY_SET:
- BCLR.B #BPS_COM_FLAG,PLAYER_STATE+PLAYER_OFFSET(A6)
- MOVE.W STORY_STAGE(A5),D0
- CLR.B HERO_TYPE(A6)
- MOVE.B STAGE_ENEMY-1(PC,D0.W),HERO_TYPE+1(A6)
- RTS
- STAGE_ENEMY:
- DC.B 2,3,0,4,5,0,6,7,0,8,9,9
- EVEN
- STAGE_COLOR_SET:
- BSR AREA_SET
- MOVE.W AREA_No(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- JMP STAGE_COLOR_VECTOR-4(PC,D0.W)
- STAGE_COLOR_VECTOR:
- JMP INIT_1STGC(PC) 1
- JMP INIT_2STGC(PC) 2
- JMP INIT_1BNSC(PC) 3
- JMP INIT_3STGC(PC) 4
- JMP INIT_4STGC(PC) 5
- JMP INIT_2BNSC(PC) 6
- JMP INIT_5STGC(PC) 7
- JMP INIT_6STGC(PC) 8
- JMP INIT_3BNSC(PC) 9
- JMP INIT_7STGC(PC) 10
- JMP INIT_8STGC(PC) 11
- JMP INIT_ESTGC(PC) END
- AREA_SET:
- BTST.B #4,PHASE+1(A5)
- BEQ AREA_SET_1
- MOVE.W HERO1+HERO_TYPE(A5),D0
- MULU #10,D0
- ADD.W HERO2+HERO_TYPE(A5),D0
- MOVEQ.L #0,D1
- MOVE.B VS_STAGE_DATA(PC,D0.W),D1
- MOVE.W D1,AREA_No(A5)
- AREA_SET_1:
- RTS
- VS_STAGE_DATA:
- ; 1 2 1 2 3 4 5 6 7 8
- DC.B 02,07,01,02,04,05,07,08,10,11 1
- DC.B 08,05,01,02,04,05,07,08,10,11 2
- DC.B 01,01,01,02,04,05,07,08,10,11 1
- DC.B 02,02,02,02,04,05,07,08,10,11 2
- DC.B 04,04,04,04,04,05,07,08,10,11 3
- DC.B 05,05,05,05,05,05,07,08,10,11 4
- DC.B 07,07,07,07,07,07,07,08,10,11 5
- DC.B 08,08,08,08,08,08,08,08,10,11 6
- DC.B 10,10,10,10,10,10,10,10,10,11 7
- DC.B 11,11,11,11,11,11,11,11,11,11 8
- INIT_1STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,02H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,03H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,31H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #10*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_1STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_2STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,04H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,05H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,06H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #10*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_2STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_3STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,07H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,08H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,09H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 050H,32H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #10*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_3STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_4STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,0AH,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,0BH,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,0CH,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #10*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_4STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_5STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,0DH,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,0EH,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,0FH,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 050H,10H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #7*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_5STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_6STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,11H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,12H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,13H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #4*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_6STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_7STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,14H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,15H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 040H,16H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 050H,33H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #10*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_7STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_8STGC:
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 020H,17H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 030H,18H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 080H,20H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 090H,21H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0A0H,22H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0B0H,23H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0C0H,24H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0D0H,25H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0E0H,26H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE 0F0H,27H,PG_SET+FADE_IN+CC_SPEED3
- PALETTE_END
- MOVE.W #10*100H,D0
- JSR AUTO_ACT_SET(PC)
- MOVE.W #S_8STBGM,D0
- BSR SET_BGM_CALL
- RTS
- INIT_ESTGC:
- CLR.B ST_DEMO_ON(A5)
- RTS
- SET_BGM_CALL:
- BTST.B #4,PHASE+1(A5)
- BNE.S SBC_0
- TST.B ST_DEMO_ON(A5)
- BEQ.S SBC_1
- SBC_0:
- JSR.S SET_BGM
- SBC_1:
- RTS
- INIT_1BNSC:
- MOVE.W #0,BONUS_RANK(A5)
- BRA.S INIT_BSG
- INIT_2BNSC:
- MOVE.W #1,BONUS_RANK(A5)
- BRA.S INIT_BSG
- INIT_3BNSC:
- MOVE.W #2,BONUS_RANK(A5)
- INIT_BSG:
- BSR STAGE_LEVEL_SET
- LEA.L PLAYER1(A5),A0
- LEA.L PLAYER2(A5),A1
- TST.W STORY_PLAYER(A5)
- BEQ.S INIT_BSG_1
- EXG.L A0,A1
- INIT_BSG_1:
- BSET.B #BPS_COM_FLAG,PLAYER_STATE(A0)
- BCLR.B #BPS_COM_FLAG,PLAYER_STATE(A1)
- MOVEQ.L #00110000B,D0
- AND.B PHASE+1(A5),D0
- OR.B #89H,D0
- MOVE.B D0,PHASE+1(A5)
- RTS
- AUTO_ACT_SET:
- MOVE.B LSPC_MODE_STORE+1(A5),D0
- BCLR.L #3,D0
- MOVE.W D0,LSPC_MODE_STORE(A5)
- MOVE.W D0,LSPC_MODE
- RTS
- LM_PAL_ACT:
- TST.B COLOR_STATE(A5)
- BEQ.S LM_PAL_ACT_1
- RTS
- LM_PAL_ACT_1:
- EASY_START
- PAL_ACT2S_1:
- ADDQ.W #1,WORD_TIMER(A6)
- CMP.W #4,WORD_TIMER(A6)
- BNE PA2S_1_1
- LEA.L COLOR_BUFFER_0+20H*32H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*33H(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*34H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*35H(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*36H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*37H(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*38H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*39H(A5),A1
- BSR PAL_CHANGE
- MOVE.W #1,COLOR_BUFFER_0+20H*30H(A5)
- CLR.W WORD_TIMER(A6)
- PA2S_1_1:
- TST.B STEP2(A6)
- BNE PA2S_1_10
- ADDQ.B #1,BYTE_TIMER(A6)
- CMP.B #4,BYTE_TIMER(A6)
- BNE PA2S_1_20
- LEA.L COLOR_BUFFER_0+20H*3EH(A5),A0
- LEA.L COLOR_BUFFER_0+20H*3FH(A5),A1
- BSR PAL_CHANGE
- MOVE.W #1,COLOR_BUFFER_0+20H*30H(A5)
- CLR.B BYTE_TIMER(A6)
- ADDQ.B #1,SPEED(A6)
- CMP.B #10,SPEED(A6)
- BNE PA2S_1_20
- MOVE.B #1,STEP2(A6)
- CLR.B SPEED(A6)
- JSR.S RAND8
- AND.B #7FH,D0
- ADD.B #30,D0
- MOVE.B D0,BYTE_TIMER(A6)
- RTS
- PA2S_1_10:
- SUBQ.B #1,BYTE_TIMER(A6)
- BNE PA2S_1_20
- LEA.L COLOR_BUFFER_0+20H*3EH(A5),A0
- LEA.L COLOR_BUFFER_0+20H*3FH(A5),A1
- BSR PAL_CHANGE
- MOVE.W #1,COLOR_BUFFER_0+20H*30H(A5)
- MOVE.B #0,STEP2(A6)
- PA2S_1_20:
- RTS
- PAL_ACT3S_1:
- SUBQ.W #1,WORD_TIMER(A6)
- BEQ.S PA3S_2
- RTS
- PA3S_2:
- LEA.L COLOR_BUFFER_0+20H*54H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*55H(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*56H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*57H(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*58H(A5),A0
- LEA.L COLOR_BUFFER_0+20H*59H(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*5AH(A5),A0
- LEA.L COLOR_BUFFER_0+20H*5BH(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*5CH(A5),A0
- LEA.L COLOR_BUFFER_0+20H*5DH(A5),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*5EH(A5),A0
- LEA.L COLOR_BUFFER_0+20H*5FH(A5),A1
- BSR PAL_CHANGE
- MOVE.W #1,COLOR_BUFFER_0+20H*50H(A5)
- MOVEQ.L #0,D0
- MOVE.B STEP2(A6),D0
- ADDQ.B #1,D0
- AND.W #00001111B,D0
- MOVE.B D0,STEP2(A6)
- ADD.W D0,D0
- MOVE.W PA3_TIME(PC,D0.W),WORD_TIMER(A6)
- RTS
- PA3_TIME:
- DC.W 30,10,10,10,30,10,10,10
- DC.W 30,10,30,10,10,10,10,10
- PAL_ACT7S_1:
- ADDQ.W #1,WORD_TIMER(A6)
- CMP.W #10,WORD_TIMER(A6)
- BEQ.S PA7S_2
- RTS
- PA7S_2:
- MOVEQ.L #0,D1
- MOVE.B STEP2(A6),D1
- ADD.W D1,D1
- LEA.L COLOR_BUFFER_0+20H*50H(A5),A0
- LEA.L (A0),A1
- ADD.W PA7_TBL(PC,D1.W),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*54H(A5),A0
- LEA.L (A0),A1
- ADD.W PA7_TBL(PC,D1.W),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*58H(A5),A0
- LEA.L (A0),A1
- ADD.W PA7_TBL(PC,D1.W),A1
- BSR PAL_CHANGE
- LEA.L COLOR_BUFFER_0+20H*5CH(A5),A0
- LEA.L (A0),A1
- ADD.W PA7_TBL(PC,D1.W),A1
- BSR PAL_CHANGE
- MOVE.W #1,COLOR_BUFFER_0+20H*50H(A5)
- CLR.W WORD_TIMER(A6)
- ADDQ.B #1,STEP2(A6)
- CMP.B #6,STEP2(A6)
- BNE.S PA7S_3
- CLR.B STEP2(A6)
- PA7S_3:
- RTS
- PA7_TBL:
- DC.W 20H*1
- DC.W 20H*2
- DC.W 20H*3
- DC.W 20H*3
- DC.W 20H*2
- DC.W 20H*1
- PAL_CHANGE:
- MOVEQ.L #8-1,D7
- PAL_CHANGE_1:
- MOVE.L (A0),D0
- MOVE.L (A1),(A0)+
- MOVE.L D0,(A1)+
- DBRA D7,PAL_CHANGE_1
- RTS
- INCLUDE WORK.INC
|