123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397 |
- ;
- ;
- ; *** 044 MEMORY CARD PROGRAM ***
- ;
- ;
- XDEF INIT_STORY_SAVE,STORY_SAVE
- XDEF INIT_STORY_LOAD,STORY_LOAD
- XREF ?A5
- ;by PHASE
- XREF ACTIVE_TRIGER
- ;by MESSAGE
- XREF MESS_SET,MESS_SET_INNER,FLAME_WRITE,FLAME_CLR
- XREF FLAME_WRITED,FLAME_CLRD
- ;by DEMO_CML
- XREF DEMO_OBJ_MAP
- ;by GAME_SUB
- XREF LWORK_DEAD
- SECT GAME,,C
- INCLUDE SYS.INC
- INCLUDE NEO_GEO.INC
- INCLUDE LABEL.INC
- INCLUDE ACT_No.INC
- INCLUDE MACRO.INC
- INCLUDE EASY_MAC.INC
- INCLUDE SMACRO.INC
- INCLUDE SCODE.INC
- ;
- ; *** CARD LOAD ***
- ;
- INIT_STORY_LOAD:
- JSR.S PWORK_INIT
- JSR.S LWORK_DEAD
- LEA.L MLWORK1(A5),A6
- OBJ_MAP DEMO_OBJ_MAP
- JSR CARD_FIRST(PC)
- MOVE.B #2,CARD_COMMAND(A5) data load
- JSR SYS_CARD
- LEA.L ?A5,A5
- TST.B CARD_ANSWER(A5)
- BNE STORY_LOAD_END
- BSR LOAD_CHECK
- LEA.L MLWORK1(A5),A6
- MOVE.W #0,COLOR_BUFFER+1FFEH(A5)
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+BASE_COLOR
- PALETTE 0FFH,00H,BASE_COLOR
- PALETTE_END
- MOVE.W #0A00H,WORD_TIMER(A6)
- MOVE.W #0,LW_D0(A6)
- MOVE.W #31H,D0
- JSR.S MESS_SET
- MOVE.W #6,FLAME_COUNT(A5)
- MOVE.W #6,FLAME_END(A5)
- MOVE.W #1,FLAME_TYPE(A5)
- MOVE.W #7000H+20H*11+14,FLAME_POS(A5)
- JSR.S FLAME_WRITED
- MOVE.W #5EH,D0
- JSR.S MESS_SET
- JSR CARD_CURSOR(PC)
- AND.B #01111111B,PHASE+1(A5)
- STEP_SAVE 0,LOAD_0
- RTS
- LOAD_CHECK:
- CMP.W #1,CARD_BUFFER+20(A5)
- BCS.S STAGE_ERROR
- CMP.W #12,CARD_BUFFER+20(A5)
- BCS.S LOAD_CHECK_1
- STAGE_ERROR:
- MOVE.W #1,CARD_BUFFER+20(A5)
- LOAD_CHECK_1:
- CMP.B #12,CARD_BUFFER+22(A5)
- BCS.S LIFE_ERROR
- CMP.B #17,CARD_BUFFER+22(A5)
- BCS.S LOAD_CHECK_2
- LIFE_ERROR:
- MOVE.B #12,CARD_BUFFER+22(A5)
- LOAD_CHECK_2:
- CMP.B #12,CARD_BUFFER+23(A5)
- BCS.S SPILIT_ERROR
- CMP.B #17,CARD_BUFFER+23(A5)
- BCS.S LOAD_CHECK_3
- SPILIT_ERROR:
- MOVE.B #12,CARD_BUFFER+23(A5)
- LOAD_CHECK_3:
- RTS
- STORY_LOAD:
- LEA.L MLWORK1(A5),A6
- EASY_START
- LOAD_0:
- JSR CARD_TIME_DEC(PC)
- BCS STORY_LOAD_END
- JSR CARD_LEVER(PC)
- BNE LOAD_1
- RTS
- LOAD_1:
- SOUND #S_KETTEI
- TST.W LW_D0(A6)
- BNE.S STORY_LOAD_END
- MOVE.W CARD_BUFFER+20(A5),STORY_STAGE(A5)
- MOVE.B CARD_BUFFER+22(A5),STORY_LIFE(A5)
- MOVE.B CARD_BUFFER+23(A5),STORY_SPIRIT(A5)
- MOVE.B CARD_BUFFER+24(A5),HAOH_USE(A5)
- MOVE.B #00100000B,D0
- AND.B PHASE+1(A5),D0
- OR.B #10000010B,D0 story player select
- MOVE.B D0,PHASE+1(A5)
- RTS
- STORY_LOAD_END:
- MOVE.B #00100000B,D0
- AND.B PHASE+1(A5),D0
- OR.B #10000001B,D0 story how to play
- MOVE.B D0,PHASE+1(A5)
- RTS
- ;
- ; *** CARD SAVE ***
- ;
- INIT_STORY_SAVE:
- MOVE.W #S_RESET,D0
- JSR.S SET_BGM
- SOUND #S_WAIT2
- SOUND #S_WAIT2
- SOUND #S_ALL_EI
- JSR.S PWORK_INIT
- JSR.S LWORK_DEAD
- LEA.L MLWORK1(A5),A6
- OBJ_MAP DEMO_OBJ_MAP
- BTST.B #4,PHASE+1(A5)
- BEQ ISS_1
- ; in vs.mode
- MOVE.L WIN_PLAYER(A5),A4
- MOVE.L ANOTHER_PLAYER(A4),A4
- MOVE.W PLAYER_No(A4),D0
- CMP.W STORY_PLAYER(A5),D0
- BNE STORY_SAVE_END
- CLR.B PHASE(A5)
- BSET.B D0,PHASE(A5)
- CLR.B MAKE_DEMO_CUT(A5)
- ISS_1:
- MOVE.B START_SELECT,D0
- AND.B #IC_CARD_ON,D0
- BNE STORY_SAVE_END
- JSR CARD_FIRST(PC)
- JSR CARD_SAVE_SET(PC)
- LEA.L MLWORK1(A5),A6
- MOVE.W #0,COLOR_BUFFER+1FFEH(A5)
- COLOR_COMMAND
- PALETTE 000H,00H,PG_SET+BASE_COLOR
- PALETTE 0FFH,00H,BASE_COLOR
- PALETTE_END
- MOVE.W #0A00H,WORD_TIMER(A6)
- MOVE.W #1,LW_D0(A6)
- MOVE.W #31H,D0
- JSR.S MESS_SET
- MOVE.W #6,FLAME_COUNT(A5)
- MOVE.W #6,FLAME_END(A5)
- MOVE.W #1,FLAME_TYPE(A5)
- MOVE.W #7000H+20H*11+14,FLAME_POS(A5)
- JSR.S FLAME_WRITED
- MOVE.W #5FH,D0
- JSR.S MESS_SET
- JSR CARD_CURSOR(PC)
- AND.B #01111111B,PHASE+1(A5)
- STEP_SAVE 0,SAVE_0
- RTS
- STORY_SAVE:
- LEA.L MLWORK1(A5),A6
- EASY_START
- SAVE_0:
- JSR CARD_TIME_DEC(PC)
- BCS STORY_SAVE_END
- JSR CARD_LEVER(PC)
- BNE.S SAVE_1
- RTS
- SAVE_1:
- CMP.B #7,WORD_TIMER(A6)
- BCS.S SAVE_2
- RTS
- SAVE_2:
- TST.W LW_D0(A6)
- BNE STORY_SAVE_END_0
- MOVE.B START_SELECT,D0
- AND.B #IC_CARD_ON,D0
- BEQ.S SAVE_3
- RTS
- SAVE_3:
- SOUND #S_KETTEI
- JSR SAVE_CHECK(PC)
- BNE STORY_SAVE_END
- MOVE.W #62H,D0
- JSR.S MESS_SET
- MOVE.W #200H,WORD_TIMER(A6)
- END_NEXT 4,SAVE_4
- SAVE_4:
- SEC_TIMER WORD_TIMER
- BCS.S STORY_SAVE_END
- RTS
- STORY_SAVE_END_0:
- SOUND #S_KETTEI
- STORY_SAVE_END:
- BTST.B #4,PHASE+1(A5)
- BNE SAVE_IN_VS
- MOVE.B #10000100B,PHASE+1(A5)
- RTS
- SAVE_IN_VS:
- MOVE.L WIN_PLAYER(A5),A1
- MOVE.L ANOTHER_PLAYER(A1),A0
- MOVE.W PLAYER_No(A0),D0
- CMP.W STORY_PLAYER(A5),D0
- BNE.S SAVE_IN_VS_1
- MOVE.W #-1,STORY_PLAYER(A5)
- SAVE_IN_VS_1:
- CLR.B PHASE(A5)
- MOVE.W PLAYER_No(A1),D0
- BSET.B D0,PHASE(A5)
- MOVE.B #00110000B,D0
- AND.B PHASE+1(A5),D0
- OR.B #10000011B,D0 vs.entry
- MOVE.B D0,PHASE+1(A5)
- RTS
- SAVE_CHECK:
- MOVEM.L A0-A6,-(SP)
- MOVE.B #4,CARD_COMMAND(A5)
- JSR SYS_CARD
- MOVE.B #3,CARD_COMMAND
- JSR SYS_CARD
- TST.B CARD_ANSWER
- BEQ SAVE_CHECK_3
- MOVE.W STORY_PLAYER,D0
- ADDQ.B #1,D0
- EOR.B #00000011B,D0
- MOVE.B D0,ERROR_LEVER
- JSR SYS_CARD_ERROR
- CLR.B ERROR_LEVER
- TST.B CARD_ANSWER
- SAVE_CHECK_3:
- MOVEM.L (SP)+,A0-A6
- RTS
- CARD_SAVE_SET:
- LEA.L CARD_BUFFER(A5),A0
- MOVE.L 116H,A1
- TST.B COUNTRY_CODE(A5)
- BEQ CSS_1
- MOVE.L 11AH,A1
- CSS_1:
- MOVE.L (A1)+,(A0)+
- MOVE.L (A1)+,(A0)+
- MOVE.L (A1)+,(A0)+
- MOVE.L (A1),(A0)+
- MOVE.L #' ',(A0)+
- MOVE.W STORY_STAGE(A5),(A0)+
- MOVE.B STORY_LIFE(A5),(A0)+
- MOVE.B STORY_SPIRIT(A5),(A0)+
- MOVE.B HAOH_USE(A5),(A0)+
- RTS
- ;
- ; *** sub routine & message ***
- ;
- CARD_LEVER:
- JSR.S ACTIVE_TRIGER
- MOVE.W LW_D0(A6),D1
- MOVE.B D2,D0
- AND.B CL_EI(PC,D1.W),D0
- BEQ CARD_LEVER_1
- EOR.W #1,LW_D0(A6)
- JSR CARD_CURSOR(PC)
- SOUND #S_SENTAKU
- CARD_LEVER_1:
- AND.B #A_BUTTON,D2
- RTS
- CL_EI:
- DC.B RIGHT,LEFT
- CARD_TIME_DEC:
- SUBQ.B #1,WORD_TIMER+1(A6)
- BGT.S CARD_TIME_1
- MOVE.W #63H,D0
- JSR.S MESS_SET
- MOVE.B SECOND_VALUE(A5),WORD_TIMER+1(A6)
- SUBQ.B #1,WORD_TIMER(A6)
- CARD_TIME_1:
- RTS
- CARD_FIRST:
- MOVE.W 108H,CARD_FCB(A5) game code (044)
- MOVE.B #0,CARD_SUB(A5) file No
- MOVE.L #CARD_BUFFER,CARD_START(A5)
- MOVE.W #64,CARD_SIZE(A5)
- MOVE.W #108H,CARD_BUFFER(A5)
- RTS
- CARD_CURSOR:
- MOVE.W #60H,D0
- ADD.W LW_D0(A6),D0
- JSR.S MESS_SET
- RTS
- INCLUDE WORK.INC
|