123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673 |
- ************************************************************************
- * *
- * 044 [ART OF FIGHT] *
- * PAUSE PROGRAM *
- * *
- ************************************************************************
- XDEF PAUSE
- XREF ?A5
- SECT GAME,,C
- INCLUDE SYS.INC
- INCLUDE MACRO.INC @@@
- INCLUDE NEO_GEO.INC @@@
- INCLUDE LABEL.INC
- INCLUDE SMACRO.INC
- INCLUDE SCODE.INC
- INCLUDE EASY_MAC.INC @@@
- PAUSE:
- MOVE.W STOP_STEP(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- JMP PAUSE_VECTOR(PC,D0.W)
- PAUSE_VECTOR:
- JMP NON_PAUSE(PC)
- JMP NORMAL_PAUSE(PC)
- JMP FREEZ_PAUSE(PC)
- JMP SOUND_TEST(PC)
- JMP RGB_TEST(PC)
- NON_PAUSE:
- JSR PAUSE_BUTTON(PC)
- BNE PAUSE_SET
- RTS
- PAUSE_SET:
- MOVE.W D4,D0
- LSR.W #2,D0
- ADDQ.W #1,D0
- MOVE.W D0,STOP_STEP(A5)
- JMP PAUSE_INIT(PC,D4.W)
- PAUSE_INIT:
- JMP INIT_NORMAL_PAUSE(PC)
- JMP INIT_FREEZ_PAUSE(PC)
- JMP INIT_SOUND_TEST(PC)
- JMP INIT_RGB_TEST(PC)
- INIT_NORMAL_PAUSE:
- TST.W DEBUG_DIP1(A5)
- BNE.S INIT_NORMAL_PAUSE_1
- TST.B PAUSE_DI(A5)
- BEQ.S INIT_NORMAL_PAUSE_1
- CLR.W STOP_STEP(A5)
- RTS
- INIT_NORMAL_PAUSE_1:
- ADDQ.B #1,MESS_BUSY(A5)
- ADDQ.B #1,LSPC_BUSY(A5)
- LEA.L LSPC_DATA,A2
- MOVE.W #20H,2(A2)
- MOVE.W #7000H+20H*17+15,-2(A2)
- LEA.L PAUSE_BUFFER(A5),A0
- MOVEQ.L #5-1,D7
- PAUSE_PUSH:
- MOVE.W (A2),D0
- MOVE.W D0,(A2)
- MOVE.W D0,(A0)+
- DBRA D7,PAUSE_PUSH
- SUBQ.B #1,LSPC_BUSY(A5)
- SUBQ.B #1,MESS_BUSY(A5)
- MOVE.W #S_PAUSE,D0
- JSR.S SET_SOUND
- MESS_ON
- MOVE.L #M_PAUSE,(A0)+
- MESS_OFF
- RTS
- NORMAL_PAUSE:
- JSR PAUSE_BUTTON(PC)
- BEQ NORMAL_PAUSE_1
- MOVE.W #S_PAUSE,D0
- JSR.S SET_SOUND
- MESS_ON
- MOVE.L #M_PAUSE_OFF,(A0)+
- MESS_OFF
- CLR.W STOP_STEP(A5)
- NORMAL_PAUSE_1:
- RTS
- M_PAUSE:
- FIX_FORMAT.B CODE,23FFH
- FIX_AUTO 20H
- FIX_ADRS 17,15
- FIX_DIRECT_DATA
- DC.B 'PAUSE',0FFH
- FIX_END
- M_PAUSE_OFF:
- FIX_FORMAT.W NUM,5
- FIX_AUTO 20H
- FIX_ADRS 17,15
- FIX_DATA_ADRS PAUSE_BUFFER
- FIX_END
- INIT_FREEZ_PAUSE:
- MOVE.W LSPC_MODE_STORE(A5),D0
- MOVE.W D0,LSPC_MODE_STOP(A5)
- BSET.L #3,D0 auto action stop
- MOVE.W D0,LSPC_MODE_STORE(A5)
- MOVE.W D0,LSPC_MODE
- RTS
- FREEZ_PAUSE:
- JSR PAUSE_BUTTON(PC)
- BEQ.S FREEZ_PAUSE_1
- MOVE.W LSPC_MODE_STOP(A5),LSPC_MODE_STORE(A5)
- MOVE.W LSPC_MODE_STOP(A5),LSPC_MODE
- CLR.W STOP_STEP(A5)
- FREEZ_PAUSE_1:
- RTS
- INIT_SOUND_TEST1:
- MESS_ON
- MOVE.L #M_SOUND_TEST_OFF2,(A0)+
- MESS_OFF
- INIT_SOUND_TEST:
- MOVE.W #0,STOP_SUB_STEP(A5)
- MOVE.B #23H,SOUND_TEST_CODE(A5)
- MESS_ON
- MOVE.L #M_SOUND_TEST,(A0)+
- MESS_OFF
- RTS
- INIT_SOUND_TEST2:
- MOVE.W #1,STOP_SUB_STEP(A5)
- MOVE.B #23H,STC20(A5)
- MOVE.B #33H,STC21(A5)
- BSR INNER_CODE_READ
- MESS_ON
- MOVE.L #M_SOUND_TEST_OFF,(A0)+
- MOVE.L #M_SOUND_TEST2,(A0)+
- MESS_OFF
- RTS
- SOUND_TEST:
- TST.W STOP_SUB_STEP(A5)
- BNE SOUND_TEST2
- JSR PAUSE_BUTTON(PC)
- BEQ.S SOUND_TEST_1
- MESS_ON
- MOVE.L #M_SOUND_TEST_OFF,(A0)+
- MESS_OFF
- CLR.W STOP_STEP(A5)
- RTS
- SOUND_TEST_1:
- MOVE.B INPUT_1+4(A5),D0
- OR.B INPUT_2+4(A5),D0
- AND.W #UP+DOWN+LEFT+RIGHT,D0
- BEQ SOUND_TEST_2
- MOVE.B CODE_LEVER(PC,D0.W),D0
- ADD.B D0,SOUND_TEST_CODE+1(A5)
- MESS_ON
- MOVE.L #M_SOUND_TEST,(A0)+
- MESS_OFF
- RTS
- CODE_LEVER:
- DC.B 000H,0F0H,010H,000H
- DC.B 0FFH,0EFH,00FH,000H
- DC.B 001H,0F1H,011H,000H
- DC.B 000H,000H,000H,000H
- SOUND_TEST_2:
- MOVE.W #0,D0
- MOVE.B INPUT_1+3(A5),D1
- OR.B INPUT_2+3(A5),D1
- BMI INIT_SOUND_TEST2
- ADD.B D1,D1
- BMI.S SOUND_TEST_3 push C
- MOVE.W #1800H,D0
- ADD.B D1,D1
- BMI.S SOUND_TEST_3 push B
- MOVE.W #1A00H,D0
- ADD.B D1,D1
- BMI.S SOUND_TEST_3 push A
- RTS
- SOUND_TEST_3:
- MOVE.B SOUND_TEST_CODE+1(A5),D0
- MOVE.W D0,SOUND_CODE_W(A5)
- JSR.S SET_SOUND_DIRECT
- RTS
- INNER_CODE_READ:
- LEA.L SOUND_CODE_TBL,A1
- AND.B #1,STC20+1(A5)
- MOVE.B STC20+1(A5),(A5)
- MOVE.W (A5),D0
- MOVE.B STC20+2(A5),D0
- ADD.W D0,D0
- MOVE.B 0(A1,D0.W),STC21+1(A5)
- MOVE.B 1(A1,D0.W),STC21+2(A5)
- RTS
- INNER_CODE_WRITE:
- LEA.L SOUND_CODE_TBL,A1
- ADD.L #200000H,A1
- AND.B #1,STC20+1(A5)
- MOVE.B STC20+1(A5),(A5)
- MOVE.W (A5),D0
- MOVE.B STC20+2(A5),D0
- ADD.W D0,D0
- MOVE.B STC21+1(A5),0(A1,D0.W)
- MOVE.B STC21+2(A5),1(A1,D0.W)
- RTS
- SOUND_TEST2:
- JSR PAUSE_BUTTON(PC)
- BEQ.S SOUND_TEST2_1
- MESS_ON
- MOVE.L #M_SOUND_TEST_OFF2,(A0)+
- MESS_OFF
- CLR.W STOP_STEP(A5)
- RTS
- SOUND_TEST2_1:
- MOVE.B INPUT_1+2(A5),D4
- OR.B INPUT_2+2(A5),D4
- MOVE.B INPUT_1+3(A5),D1
- OR.B INPUT_2+3(A5),D1
- BMI INIT_SOUND_TEST1
- BTST.L #B_A_BUTTON,D1
- BNE.S SOUND_TEST2_6
- BTST.L #B_B_BUTTON,D1
- BNE SOUND_TEST2_8
- MOVEQ.L #0,D0
- MOVE.B INPUT_1+4(A5),D0
- OR.B INPUT_2+4(A5),D0
- AND.W #UP+DOWN+LEFT+RIGHT,D0
- LEA.L CODE_LEVER(PC),A0
- MOVE.B 0(A0,D0.W),D0
- BEQ SOUND_TEST2_5
- MOVEQ.L #-1,D2
- LEA.L STC21+1(A5),A0
- CMP.B #23H,STC21(A5)
- BEQ.S SOUND_TEST2_3
- MOVEQ.L #1,D2
- LEA.L STC20+1(A5),A0
- SOUND_TEST2_3:
- BTST.L #B_C_BUTTON,D4
- BNE.S SOUND_TEST2_2
- ADDQ.W #1,A0
- MOVEQ.L #-1,D2
- SOUND_TEST2_2:
- MOVE.B (A0),D3
- ADD.B D3,D0
- AND.B D2,D0
- MOVE.B D0,(A0)
- CMP.B #23H,STC21(A5)
- BEQ.S SOUND_TEST2_4
- BSR INNER_CODE_READ
- SOUND_TEST2_4:
- MESS_ON
- MOVE.L #M_SOUND_TEST2,(A0)+
- MESS_OFF
- SOUND_TEST2_5:
- RTS
- SOUND_TEST2_6:
- CMP.B #23H,STC21(A5)
- BNE.S SOUND_TEST2_7
- BSR INNER_CODE_WRITE
- SOUND_TEST2_7:
- MOVE.B STC20+1(A5),(A5)
- MOVE.W (A5),D0
- MOVE.B STC20+2(A5),D0
- ADD.W D0,D0
- JSR.S SET_SOUND
- RTS
- SOUND_TEST2_8:
- EOR.B #10H,STC20(A5)
- EOR.B #10H,STC21(A5)
- MESS_ON
- MOVE.L #M_SOUND_TEST2,(A0)+
- MESS_OFF
- RTS
- M_SOUND_TEST:
- FIX_FORMAT.B CODE,33FFH
- FIX_AUTO 20H
- FIX_ADRS 11,27
- FIX_DIRECT_DATA
- DC.B 'SOUND CODE DIRECT',0FFH
- FIX_ADRS 10,28
- FIX_PRINTF
- DC.B 'A=1A-'
- PARM 2,SOUND_TEST_CODE
- DC.B ' B=18-'
- PARM 2,SOUND_TEST_CODE
- DC.B ' C='
- PARM 2,SOUND_TEST_CODE
- DC.B 0FFH
- FIX_END
- M_SOUND_TEST_OFF:
- FIX_FORMAT.B CODE,33FFH
- FIX_AUTO 20H
- FIX_ADRS 11,27
- FIX_DIRECT_DATA
- DC.B ' ',0FFH
- FIX_ADRS 10,28
- FIX_DIRECT_DATA
- DC.B ' ',0FFH
- FIX_END
- M_SOUND_TEST2:
- FIX_FORMAT.B CODE,33FFH
- FIX_AUTO 20H
- FIX_ADRS 10,27
- FIX_DIRECT_DATA
- DC.B 'SOUND CODE INDIRECT',0FFH
- FIX_ADRS 6,28
- FIX_PRINTF
- DC.B 'CODE='
- PARM 3,STC20
- DC.B ' OUT='
- PARM 4,STC21
- DC.B ' C=HI-BYTE',0FFH
- FIX_END
- M_SOUND_TEST_OFF2:
- FIX_FORMAT.B CODE,33FFH
- FIX_AUTO 20H
- FIX_ADRS 10,27
- FIX_DIRECT_DATA
- DC.B ' ',0FFH
- FIX_ADRS 6,28
- FIX_DIRECT_DATA
- DC.B ' ',0FFH
- FIX_END
- INIT_RGB_TEST:
- MOVE.W #0,STOP_SUB_STEP(A5)
- MOVE.B #33H,TEST_PG(A5)
- AND.B #0FH,TEST_COLOR+1(A5)
- JSR TEST_COLOR_GET(PC)
- JSR RGB_PRINT(PC)
- RTS
- RGB_TEST:
- JSR PAUSE_BUTTON(PC)
- BEQ.S RGB_TEST_1
- MESS_ON
- MOVE.L #M_RGB_TEST_OFF,(A0)+
- MESS_OFF
- CLR.W STOP_STEP(A5)
- RTS
- RGB_TEST_1:
- MOVE.B INPUT_1+3(A5),D0
- OR.B INPUT_2+3(A5),D0
- ADD.B D0,D0
- BMI RGB_CANCEL
- ADD.B D0,D0
- BMI RGB_BACK
- ADD.B D0,D0
- BMI RGB_NEXT
- MOVE.B INPUT_1+4(A5),D1
- OR.B INPUT_2+4(A5),D1
- AND.W #0FH,D1
- LEA.L CODE_LEVER(PC),A0
- MOVE.B 0(A0,D1.W),D1
- BNE.S RGB_TEST_2
- RTS
- RGB_TEST_2:
- MOVE.W STOP_SUB_STEP(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- JMP RGB_VECTOR(PC,D0.W)
- RGB_VECTOR:
- JMP RGB_PALETTE(PC)
- JMP RGB_COLOR_SET(PC)
- JMP RGB_R(PC)
- JMP RGB_G(PC)
- JMP RGB_B(PC)
- JMP AUTO_SPEED(PC)
- AUTO_SPEED:
- BCLR.B #3,LSPC_MODE_STORE+1(A5)
- ADD.B D1,LSPC_MODE_STORE(A5)
- BNE.S AUTO_SPEED_1
- BSET.B #3,LSPC_MODE_STORE+1(A5)
- AUTO_SPEED_1:
- MOVE.W LSPC_MODE_STORE(A5),LSPC_MODE
- JSR RGB_PRINT(PC)
- RTS
- RGB_PALETTE:
- ADD.B D1,TEST_PALETTE+1(A5)
- JSR TEST_COLOR_GET(PC)
- JSR RGB_PRINT(PC)
- RTS
- RGB_COLOR_SET:
- MOVE.B TEST_COLOR+1(A5),D0
- ADD.B D1,D0
- CMP.B #10H,D0
- BCS.S RGB_COLOR_1
- MOVE.B D0,D1
- ASR.B #4,D1
- ADD.B D1,TEST_PALETTE+1(A5)
- AND.B #0FH,D0
- RGB_COLOR_1:
- MOVE.B D0,TEST_COLOR+1(A5)
- JSR TEST_COLOR_GET(PC)
- JSR RGB_PRINT(PC)
- RTS
- RGB_R:
- LEA.L TEST_R+1(A5),A0
- JMP RGB_RGB(PC)
- RGB_G:
- LEA.L TEST_G+1(A5),A0
- JMP RGB_RGB(PC)
- RGB_B:
- LEA.L TEST_B+1(A5),A0
- RGB_RGB:
- MOVE.B (A0),D0
- ADD.B D1,D0
- AND.B #1FH,D0
- MOVE.B D0,(A0)
- JSR RGB_PRINT(PC)
- MOVEQ.L #0,D0
- MOVE.B TEST_PALETTE+1(A5),D0
- MOVE.W D0,D1
- LSR.W #4,D1
- LEA.L PG_NUMBER(A5),A1
- MOVE.B 0(A1,D1.W),(A5)
- MOVE.W (A5),D1
- LSL.W #4,D0
- ADD.B TEST_COLOR+1(A5),D0
- MOVE.B D0,D1
- ADD.W D0,D0
- ADD.W D1,D1
- LEA.L COLOR_BUFFER_0(A5),A2
- LEA.L R_TYPE+64,A6
- MOVEQ.L #0,D2
- MOVEQ.L #0,D3
- MOVEQ.L #0,D4
- MOVE.B TEST_R+1(A5),D2
- MOVE.B TEST_G+1(A5),D3
- MOVE.B TEST_B+1(A5),D4
- ADD.W D2,D2
- ADD.W D3,D3
- ADD.W D4,D4
- MOVE.W -64(A6,D2.W),D2
- OR.W 000(A6,D3.W),D2
- OR.W 064(A6,D4.W),D2
- MOVE.W D2,0(A2,D0.W)
- MOVE.L PALETTE_INFO(A5),A1
- ADD.L #200000H,A1
- MOVE.W D2,0(A1,D1.W)
- AND.W #0FE00H,D0
- MOVE.W #1,0(A2,D0.W)
- RTS
- RGB_CANCEL:
- MOVEQ.L #0,D0
- MOVE.B TEST_PALETTE+1(A5),D0
- MOVE.W D0,D1
- LSR.W #4,D1
- LEA.L PG_NUMBER(A5),A1
- MOVE.B 0(A1,D1.W),(A5)
- MOVE.W (A5),D1
- LSL.W #4,D0
- ADD.B TEST_COLOR+1(A5),D0
- MOVE.B D0,D1
- ADD.W D0,D0
- ADD.W D1,D1
- LEA.L COLOR_BUFFER_0(A5),A2
- LEA.L COLOR_BUFFER(A5),A3
- MOVE.L PALETTE_INFO(A5),A1
- ADD.L #200000H,A1
- MOVE.W 0(A3,D0.W),0(A2,D0.W)
- MOVE.W 0(A2,D0.W),0(A1,D1.W)
- AND.W #0FE00H,D0
- MOVE.W #1,0(A2,D0.W)
- JSR TEST_COLOR_GET(PC)
- JSR RGB_PRINT(PC)
- RTS
- RGB_BACK:
- MOVEQ.L #-1,D0
- JMP RGB_NEXT_1(PC)
- RGB_NEXT:
- MOVEQ.L #1,D0
- RGB_NEXT_1:
- ADD.W STOP_SUB_STEP(A5),D0
- BPL.S RGB_NEXT_2
- MOVEQ.L #5,D0
- RGB_NEXT_2:
- CMP.B #6,D0
- BCS.S RGB_NEXT_3
- MOVEQ.L #0,D0
- RGB_NEXT_3:
- MOVE.W D0,STOP_SUB_STEP(A5)
- JSR RGB_PRINT(PC)
- RTS
- TEST_COLOR_GET:
- MOVEQ.L #0,D0
- MOVE.B TEST_PALETTE+1(A5),D0
- MOVE.W D0,D1
- LSR.W #4,D1
- LEA.L PG_NUMBER(A5),A1
- MOVE.B 0(A1,D1.W),TEST_PG+1(A5)
- LSL.W #4,D0
- ADD.B TEST_COLOR+1(A5),D0
- ADD.W D0,D0
- LEA.L COLOR_BUFFER_0(A5),A2
- MOVEQ.L #0FH,D5
- MOVE.B 0(A2,D0.W),D2
- AND.W D5,D2
- MOVE.W 0(A2,D0.W),D1
- MOVE.W D1,D3
- MOVE.B D3,D4
- ADD.W D1,D1
- ADD.W D1,D1
- ADDX.B D2,D2
- MOVE.B D2,TEST_R+1(A5)
- LSR.B #4,D3
- AND.W D5,D3
- ADD.W D1,D1
- ADDX.B D3,D3
- MOVE.B D3,TEST_G+1(A5)
- AND.W D5,D4
- ADD.W D1,D1
- ADDX.B D4,D4
- MOVE.B D4,TEST_B+1(A5)
- RTS
- RGB_PRINT:
- MOVE.W STOP_SUB_STEP(A5),D0
- ADD.W D0,D0
- MOVE.W D0,D1
- ADD.W D0,D0
- ADD.W D1,D0
- MOVE.B RGB_ATTR+0(PC,D0.W),TEST_PALETTE(A5)
- MOVE.B RGB_ATTR+1(PC,D0.W),TEST_COLOR(A5)
- MOVE.B RGB_ATTR+2(PC,D0.W),TEST_R(A5)
- MOVE.B RGB_ATTR+3(PC,D0.W),TEST_G(A5)
- MOVE.B RGB_ATTR+4(PC,D0.W),TEST_B(A5)
- MOVE.B RGB_ATTR+5(PC,D0.W),LSPC_MODE_STORE-1(A5)
- MESS_ON
- MOVE.L #M_RGB_TEST,(A0)+
- MESS_OFF
- RTS
- RGB_ATTR:
- DC.B 23H,33H,33H,33H,33H,33H
- DC.B 33H,23H,33H,33H,33H,33H
- DC.B 33H,33H,23H,33H,33H,33H
- DC.B 33H,33H,33H,23H,33H,33H
- DC.B 33H,33H,33H,33H,23H,33H
- DC.B 33H,33H,33H,33H,33H,23H
- DS.W 0
- M_RGB_TEST:
- FIX_FORMAT.B CODE,33FFH
- FIX_AUTO 20H
- FIX_ADRS 6,27
- FIX_PRINTF
- DC.B 'RGB TEST PALETTE='
- PARM 2,TEST_PALETTE
- DC.B ' COLOR='
- PARM 1,TEST_COLOR
- DC.B 0FFH
- FIX_ADRS 4,28
- FIX_PRINTF
- DC.B 'R='
- PARM 2,TEST_R
- DC.B ' G='
- PARM 2,TEST_G
- DC.B ' B='
- PARM 2,TEST_B
- DC.B ' PG='
- PARM 2,TEST_PG
- DC.B ' AS='
- PARM 2,LSPC_MODE_STORE-1
- DC.B 0FFH
- FIX_END
- M_RGB_TEST_OFF:
- FIX_FORMAT.B CODE,33FFH
- FIX_AUTO 20H
- FIX_ADRS 6,27
- FIX_PRINTF
- DC.B ' ',0FFH
- FIX_ADRS 4,28
- FIX_DIRECT_DATA
- DC.B ' ',0FFH
- FIX_END
- PAUSE_BUTTON:
- TST.W STOP_STEP(A5)
- BNE.S PAUSE_BUTTON_2
- MOVE.B INPUT_S+1(A5),D0
- MOVEQ.L #PAUSE_MODE,D4
- AND.B DEBUG_DIP2(A5),D4
- BEQ.S PAUSE_BUTTON_1
- PAUSE_BUTTON_2:
- MOVE.B INPUT_SS+1(A5),D0
- PAUSE_BUTTON_1:
- AND.W #P1_SELECT+P2_SELECT,D0
- RTS
- INCLUDE WORK.INC
|