diff --git a/th02/hardware/snd_se.asm b/th02/hardware/snd_se.asm new file mode 100644 index 00000000..6a6d9430 --- /dev/null +++ b/th02/hardware/snd_se.asm @@ -0,0 +1,73 @@ +; void snd_se_reset(void) +func snd_se_reset + mov snd_se_frame, 0 + mov snd_se_playing, -1 + ret +endfunc + + +; void DEFCONV snd_se_play(unsigned char se) +retfunc macro + if GAME ge 3 + ret 2 + else + ret + endif +endm +func snd_se_play +@@se = [bp+6] + + push bp + mov bp, sp + mov dx, @@se + cmp snd_fm_possible, 0 + jz short @@ret + cmp snd_se_playing, -1 + jnz short @@priority? + mov snd_se_playing, dl + pop bp + retfunc + +@@priority?: + mov al, snd_se_playing + mov ah, 0 + mov bx, ax + mov al, snd_se_priorities[bx] + mov bx, dx + cmp al, snd_se_priorities[bx] + ja short @@ret + mov snd_se_playing, dl + mov snd_se_frame, 0 + +@@ret: + pop bp + retfunc +endfunc + + +; void snd_se_update(void) +func snd_se_update + cmp snd_fm_possible, 0 + jz short @@ret + cmp snd_se_playing, -1 + jz short @@ret + cmp snd_se_frame, 0 + jnz short @@unlock? + mov ah, PMD_SE_PLAY + mov al, snd_se_playing + int 60h + +@@unlock?: + inc snd_se_frame + mov al, snd_se_playing + mov ah, 0 + mov bx, ax + mov al, snd_se_priority_frames[bx] + cmp al, snd_se_frame + jnb short @@ret + mov snd_se_frame, 0 + mov snd_se_playing, -1 + +@@ret: + ret +endfunc diff --git a/th02/hardware/snd_se[data].asm b/th02/hardware/snd_se[data].asm new file mode 100644 index 00000000..9eb56e15 --- /dev/null +++ b/th02/hardware/snd_se[data].asm @@ -0,0 +1,68 @@ +snd_se_playing db -1 +snd_se_priorities db 0 + db 0 + db 32 + db 9 + db 2 + db 16 + db 5 + db 6 + db 48 + db 8 + db 9 + db 5 + db 16 + db 10 + db 17 + db 12 + db 32 + db 32 + db 16 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 +snd_se_priority_frames db 0 + db 0 + db 36 + db 16 + db 4 + db 16 + db 8 + db 10 + db 48 + db 80 + db 24 + db 17 + db 11 + db 4 + db 80 + db 16 + db 48 + db 74 + db 32 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 +snd_se_frame db 0 diff --git a/th02_main.asm b/th02_main.asm index eb34549b..7f3bda6c 100644 --- a/th02_main.asm +++ b/th02_main.asm @@ -2318,7 +2318,7 @@ var_C = byte ptr -0Ch call sub_3DDE call sub_129DD call sub_E271 - call sub_FA46 + call snd_se_reset call sub_1028C nopcall sub_CA1C call sub_C224 @@ -2904,7 +2904,7 @@ var_2 = word ptr -2 ; --------------------------------------------------------------------------- loc_BCC3: - call sub_FA8A + call snd_se_update call farfp_1F498 call bgm_show mov si, word_20344 @@ -3475,7 +3475,7 @@ loc_C20B: push 0Ah call palette_black_out mov byte_20607, 1 - call sub_FA46 + call snd_se_reset loc_C222: pop bp @@ -6781,16 +6781,12 @@ loc_DA9C: jge short loc_DAB6 inc byte_1E59C call sub_DF76 - push 8 - call sub_FA52 - add sp, 2 + call snd_se_play c, 8 loc_DAB6: mov bx, [bp+arg_0] mov byte ptr [bx], 2 - push 0Dh - call sub_FA52 - add sp, 2 + call snd_se_play c, 13 cmp byte_218A8, 20h ; ' ' jb short loc_DAD9 inc word_1E586 @@ -7224,9 +7220,7 @@ loc_DE26: call sub_DFC4 loc_DE36: - push 8 - call sub_FA52 - add sp, 2 + call snd_se_play c, 8 inc word_1E5B6 leave retn @@ -7273,9 +7267,7 @@ loc_DE7A: jge short loc_DEA7 inc byte_1E59C call sub_DF76 - push 8 - call sub_FA52 - add sp, 2 + call snd_se_play c, 8 loc_DEA7: inc word_1E5B6 @@ -7785,9 +7777,7 @@ sub_E280 proc near mov word_218B6, 0 inc byte_218C2 inc byte_1E64E - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_218C4, 0DCh mov word_218C6, 0C4h mov word_218C8, 0 @@ -8373,9 +8363,7 @@ loc_E7E8: call grcg_setcolor pascal, (GC_RMW shl 16) + 15 test byte ptr word_218B6, 3 jnz short loc_E80B - push 0Fh - call sub_FA52 - add sp, 2 + call snd_se_play c, 15 loc_E80B: call sub_E512 @@ -8383,9 +8371,7 @@ loc_E80B: loc_E80E: cmp word_218B6, 56h ; 'V' jnz short loc_E892 - push 11h - call sub_FA52 - add sp, 2 + call snd_se_play c, 17 jmp short loc_E892 ; --------------------------------------------------------------------------- @@ -8399,9 +8385,7 @@ loc_E821: mov al, byte_21A4F mov Palettes+2, al call far ptr palette_show - push 10h - call sub_FA52 - add sp, 2 + call snd_se_play c, 16 mov al, byte_21A4C mov byte_2287E, al mov byte_2066D, 1 @@ -8491,9 +8475,7 @@ loc_E8F3: loc_E902: cmp [bp+var_4], 30h ; '0' jl short loc_E8F3 - push 11h - call sub_FA52 - add sp, 2 + call snd_se_play c, 17 jmp loc_EA60 ; --------------------------------------------------------------------------- @@ -8562,8 +8544,7 @@ loc_E9A6: loc_E9DB: call pi_slot_put stdcall, 32, [bp+var_2], 1 - push 10h - call sub_FA52 + call snd_se_play stdcall, 16 add sp, 8 jmp short loc_EA60 ; --------------------------------------------------------------------------- @@ -8730,9 +8711,7 @@ loc_EB32: and ax, 7 cmp ax, 4 jnz short loc_EB5D - push 10h - call sub_FA52 - add sp, 2 + call snd_se_play c, 16 loc_EB5D: mov al, byte_21A55 @@ -8780,9 +8759,7 @@ loc_EBE2: loc_EBEF: test byte ptr word_218B6, 3 jnz short loc_EC00 - push 0Fh - call sub_FA52 - add sp, 2 + call snd_se_play c, 15 loc_EC00: cmp word_218B6, 8Ch @@ -8831,9 +8808,7 @@ loc_EC46: loc_EC56: cmp word_218B6, 0A4h jnz short loc_EC85 - push 10h - call sub_FA52 - add sp, 2 + call snd_se_play c, 16 mov al, byte_21A54 mov byte_2287E, al mov byte_2066D, 1 @@ -9353,9 +9328,7 @@ var_2 = word ptr -2 push si cmp byte_20609, 0 jnz short loc_F03D - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte_1E517, 1 inc byte_20608 nopcall sub_DCFE @@ -9769,9 +9742,7 @@ loc_F38B: loc_F395: call fp_20602 - push 1 - call sub_FA52 - add sp, 2 + call snd_se_play c, 1 mov byte_22D4A, 8 inc byte_1EB0D jmp loc_F434 @@ -9828,9 +9799,7 @@ loc_F417: ; --------------------------------------------------------------------------- loc_F426: - push 1 - call sub_FA52 - add sp, 2 + call snd_se_play c, 1 dec byte_22D4B loc_F434: @@ -10424,86 +10393,7 @@ loc_FA3E: ; --------------------------------------------------------------------------- db 0 -; =============== S U B R O U T I N E ======================================= - - -sub_FA46 proc far - mov byte_1E35D, 0 - mov byte_1E31A, 0FFh - retf -sub_FA46 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_FA52 proc far - -arg_0 = word ptr 6 - - push bp - mov bp, sp - mov dx, [bp+arg_0] - cmp snd_fm_possible, 0 - jz short loc_FA88 - cmp byte_1E31A, 0FFh - jnz short loc_FA6C - mov byte_1E31A, dl - pop bp - retf -; --------------------------------------------------------------------------- - -loc_FA6C: - mov al, byte_1E31A - mov ah, 0 - mov bx, ax - mov al, [bx+8ABh] - mov bx, dx - cmp al, [bx+8ABh] - ja short loc_FA88 - mov byte_1E31A, dl - mov byte_1E35D, 0 - -loc_FA88: - pop bp - retf -sub_FA52 endp - - -; =============== S U B R O U T I N E ======================================= - - -sub_FA8A proc far - cmp snd_fm_possible, 0 - jz short locret_FAC5 - cmp byte_1E31A, 0FFh - jz short locret_FAC5 - cmp byte_1E35D, 0 - jnz short loc_FAA6 - mov ah, PMD_SE_PLAY - mov al, byte_1E31A - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - -loc_FAA6: - inc byte_1E35D - mov al, byte_1E31A - mov ah, 0 - mov bx, ax - mov al, [bx+8CCh] - cmp al, byte_1E35D - jnb short locret_FAC5 - mov byte_1E35D, 0 - mov byte_1E31A, 0FFh - -locret_FAC5: - retf -sub_FA8A endp - +include th02/hardware/snd_se.asm seg002 ends ; =========================================================================== @@ -10919,9 +10809,9 @@ loc_FD5A: idiv ebx mov [bp+var_4], eax add dword_218AC, eax - call sub_FA46 + call snd_se_reset call sub_DE4E - call sub_FA8A + call snd_se_update mov word_1FFA8, 1 call sub_F4BC pop si @@ -11058,9 +10948,9 @@ loc_FEB9: idiv ebx mov [bp+var_4], eax add dword_218AC, eax - call sub_FA46 + call snd_se_reset call sub_DE4E - call sub_FA8A + call snd_se_update mov word_1FFA8, 1 call sub_F4BC pop si @@ -11131,8 +11021,7 @@ loc_1000F: jge loc_100A0 cmp [bp+arg_0], 1 jnz short loc_10025 - push 12h - call sub_FA52 + call snd_se_play stdcall, 18 pop cx loc_10025: @@ -11186,8 +11075,7 @@ loc_100A0: jge loc_10286 cmp [bp+arg_0], 0 jnz short loc_100BA - push 0Eh - call sub_FA52 + call snd_se_play stdcall, 14 pop cx loc_100BA: @@ -12986,9 +12874,7 @@ var_2 = word ptr -2 jb loc_110B3 cmp word_20686, 0A8h ; '¨' jnz short loc_10EC0 - push 0Eh - call sub_FA52 - add sp, 2 + call snd_se_play c, 14 jmp loc_10FF6 ; --------------------------------------------------------------------------- @@ -13292,9 +13178,7 @@ arg_0 = word ptr 4 push si push di mov di, [bp+arg_0] - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov bx, di shl bx, 2 les bx, [bx+5300h] @@ -13843,9 +13727,7 @@ loc_1161B: ; --------------------------------------------------------------------------- loc_1166B: - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte ptr [si+2BF0h], 1 add dword_218AC, 4E20h jmp short loc_11689 @@ -13948,9 +13830,7 @@ loc_116F5: loc_11712: cmp byte ptr [si+2BF5h], 0 jz short loc_11746 - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov bx, si add bx, bx push word ptr [bx+5314h] @@ -14205,9 +14085,7 @@ loc_11924: loc_11927: push ax call sub_D6CA - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 jmp short loc_1193E ; --------------------------------------------------------------------------- @@ -15192,9 +15070,7 @@ loc_120D2: jl short loc_120AA loc_120D7: - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 loc_120E1: cmp word_20650, 1BFh @@ -16391,9 +16267,7 @@ loc_12A32: mov byte ptr [si+0Ah], 0 mov al, [bp+arg_0] mov [si+0Bh], al - push 6 - call sub_FA52 - add sp, 2 + call snd_se_play c, 6 jmp short loc_12A77 ; --------------------------------------------------------------------------- @@ -16638,9 +16512,7 @@ loc_12C11: loc_12C21: cmp byte ptr [si+1], 4 jnz short loc_12C5C - push 7 - call sub_FA52 - add sp, 2 + call snd_se_play c, 7 jmp short loc_12C5C ; --------------------------------------------------------------------------- @@ -17780,11 +17652,10 @@ sub_13414 proc near mov bp, sp push 0 call palette_white_out - call sub_FA46 - push 5 - call sub_FA52 + call snd_se_reset + call snd_se_play stdcall, 5 pop cx - call sub_FA8A + call snd_se_update push 0 call palette_white_in pop bp @@ -18510,9 +18381,7 @@ loc_13A1D: jl short loc_13A6B loc_13A4B: - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov bx, word_2065C push word ptr [bx] push si @@ -18523,9 +18392,7 @@ loc_13A4B: ; --------------------------------------------------------------------------- loc_13A6B: - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte_2066A, 1 add dword_218AC, 2710h jmp short loc_13AB8 @@ -18537,9 +18404,7 @@ loc_13A85: mov bx, word_2065E cmp word ptr [bx], 130h jg short loc_13AA8 - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte_2066A, 1 jmp short loc_13AB8 ; --------------------------------------------------------------------------- @@ -18775,9 +18640,7 @@ var_1 = byte ptr -1 mov word_24E80, 0 test byte ptr word_20650, 3Fh jnz loc_13ECA - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 push si push 70h ; 'p' push 0 @@ -18809,9 +18672,7 @@ loc_13CE0: mov ax, word_24E7C add ax, 8 mov si, ax - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 push si push 70h ; 'p' push word_250DE @@ -18869,9 +18730,7 @@ loc_13D99: loc_13D9F: test byte ptr word_250E0, 1Fh jnz loc_13ECA - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 jmp loc_13ECA ; --------------------------------------------------------------------------- @@ -18880,9 +18739,7 @@ loc_13DB5: jnz short loc_13DF9 test byte ptr word_250E0, 1Fh jnz short loc_13DCD - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 loc_13DCD: mov byte_23A70, 40h @@ -18936,9 +18793,7 @@ loc_13E40: loc_13E4E: test byte ptr word_250E0, 0Fh jnz short loc_13E5F - push 6 - call sub_FA52 - add sp, 2 + call snd_se_play c, 6 loc_13E5F: test byte ptr word_250E0, 0Fh @@ -19020,9 +18875,7 @@ var_2 = word ptr -2 add word_2065A, ax cmp word_2065A, 8D4h jg short loc_13F18 - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 push word_24E7C push word_24E7E push word_2064E @@ -19506,9 +19359,7 @@ loc_142E1: call sub_1283C or ax, ax jz loc_143D4 - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov bx, word_2065C push word ptr [bx] push si @@ -19565,9 +19416,7 @@ loc_1435F: jl short loc_143AD loc_1438D: - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov bx, word_2065C push word ptr [bx] push si @@ -19578,9 +19427,7 @@ loc_1438D: ; --------------------------------------------------------------------------- loc_143AD: - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte_2066A, 1 add dword_218AC, 4E20h jmp short loc_143E1 @@ -19882,9 +19729,7 @@ loc_14628: or ax, ax jz short loc_14689 add word_2065A, ax - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov bx, word_2065C push word ptr [bx] push si @@ -20071,9 +19916,7 @@ loc_14757: loc_147A3: cmp byte ptr [si+7], 0 jnz short loc_147BD - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 sub word ptr [si+2], 8 sub word ptr [si+4], 8 jmp short loc_147C3 @@ -20156,9 +19999,7 @@ sub_1483B proc near jl short loc_1489A cmp word_20650, 0Ah jnz short loc_1485E - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh pop bp retn @@ -20169,9 +20010,7 @@ loc_1485E: jl short loc_1489A cmp word_20650, 32h ; '2' jnz short loc_1487E - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov word_2064E, 8Fh pop bp retn @@ -20400,9 +20239,7 @@ sub_14A39 proc near jl loc_14B31 cmp word_20650, 32h ; '2' jnz short loc_14A64 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh mov al, byte ptr word_2066E mov byte ptr word_252E2, al @@ -20415,9 +20252,7 @@ loc_14A64: jl loc_14B31 cmp word_20650, 63h ; 'c' jnz short loc_14A9C - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov al, byte ptr word_252E6 mov ah, 0 mov dx, 95h @@ -20453,9 +20288,7 @@ loc_14AAF: dec word_252E4 cmp word_20650, 87h jnz short loc_14B31 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -20514,9 +20347,7 @@ sub_14B33 proc near jl loc_14BC0 cmp word_20650, 32h ; '2' jnz short loc_14B58 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh pop bp retn @@ -20527,9 +20358,7 @@ loc_14B58: jl short loc_14BC0 cmp word_20650, 63h ; 'c' jnz short loc_14B7E - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov word_2064E, 8Fh mov word_252E8, 20h ; ' ' pop bp @@ -20579,9 +20408,7 @@ sub_14BC2 proc near jl loc_14C74 cmp word_20650, 32h ; '2' jnz short loc_14BEC - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh mov byte ptr word_252E2, 1Ah pop bp @@ -20593,9 +20420,7 @@ loc_14BEC: jl loc_14C74 cmp word_20650, 63h ; 'c' jnz short loc_14C14 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov word_2064E, 8Fh mov word_252EA, 20h ; ' ' pop bp @@ -20676,9 +20501,7 @@ loc_14C9D: loc_14C9F: mov byte ptr word_252E6, al - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh mov byte ptr word_252E2, 1Ah mov byte ptr word_252E2+1, 30h ; '0' @@ -20691,9 +20514,7 @@ loc_14CBE: jl loc_14DFA cmp word_20650, 63h ; 'c' jnz short loc_14CF3 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov al, byte ptr word_252E6 mov ah, 0 add ax, 94h @@ -20782,9 +20603,7 @@ loc_14D98: jnz short loc_14DFA loc_14DC8: - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -20822,9 +20641,7 @@ sub_14C76 endp sub_14DFC proc near push bp mov bp, sp - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov word_2064E, 8Fh mov bx, word_2065C mov ax, [bx] @@ -20854,9 +20671,7 @@ sub_14E30 proc near jl short loc_14E9B cmp word_20650, 32h ; '2' jnz short loc_14E58 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh mov byte ptr word_252E2, 1Ah pop bp @@ -20913,9 +20728,7 @@ sub_14E9D proc near jl short loc_14F13 cmp word_20650, 32h ; '2' jnz short loc_14EC7 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 8Eh mov word_21748, 5 jmp short loc_14F13 @@ -21090,9 +20903,7 @@ loc_14FEA: loc_15038: cmp word_20650, 72h ; 'r' jnz short loc_1504B - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 jmp short loc_1508F ; --------------------------------------------------------------------------- @@ -21860,9 +21671,7 @@ loc_155F3: mov es:[bx+6], ax mov byte ptr es:[bx+8], 1Ah mov byte ptr es:[bx+9], 40h - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 xor ax, ax jmp short loc_1563F ; --------------------------------------------------------------------------- @@ -21954,9 +21763,7 @@ loc_15683: cmp byte ptr es:[bx+8], 22h ; '"' jb short loc_156BE inc byte ptr es:[bx] - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 loc_156BE: les bx, [bp+var_4] @@ -22322,9 +22129,7 @@ loc_15A38: jnz short loc_15A54 mov byte_2558E, 8 call sub_158DC - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 jmp loc_15D51 ; --------------------------------------------------------------------------- @@ -22361,9 +22166,7 @@ loc_15A8A: loc_15ABA: cmp word_20650, 59h ; 'Y' jnz loc_15D51 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 jmp loc_15D51 ; --------------------------------------------------------------------------- @@ -22652,9 +22455,7 @@ loc_15D83: idiv bx or dx, dx jnz short loc_15D9A - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 loc_15D9A: cmp word_20650, 94h @@ -22942,9 +22743,7 @@ var_1 = byte ptr -1 jl loc_16172 cmp word_20650, 32h ; '2' jnz short loc_15FB7 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 loc_15FB7: cmp word_20650, 64h ; 'd' @@ -23147,9 +22946,7 @@ sub_1619C proc near jl loc_162D1 cmp word_20650, 32h ; '2' jnz short loc_161B9 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 loc_161B9: cmp word_20650, 64h ; 'd' @@ -23413,9 +23210,7 @@ var_2 = word ptr -2 jl locret_16553 cmp word_20650, 32h ; '2' jnz short loc_16441 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 loc_16441: cmp word_20650, 64h ; 'd' @@ -24967,9 +24762,7 @@ loc_17128: loc_17136: mov bx, word_26C46 mov word ptr [bx+0Ah], 0 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov bx, word_26C46 mov byte ptr [bx+10h], 1 mov ax, 2 @@ -25297,9 +25090,7 @@ loc_17432: mov bx, ax mov al, [bx+1] mov ah, 0 - push ax - call sub_FA52 - add sp, 2 + call snd_se_play c, ax mov [bp+var_4], 2 jmp loc_174E1 ; --------------------------------------------------------------------------- @@ -25733,9 +25524,7 @@ loc_177EB: mov bx, word_26C48 cmp word ptr [bx+16h], 0FFFEh jnz short loc_1780E - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 jmp loc_178E9 ; --------------------------------------------------------------------------- @@ -25772,9 +25561,7 @@ loc_17854: call sub_D65A loc_17864: - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov bx, word_26C48 mov eax, [bx+12h] add dword_218AC, eax @@ -25800,9 +25587,7 @@ loc_1789D: ; --------------------------------------------------------------------------- loc_178A8: - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 add si, word_20344 cmp si, 190h jl short loc_178C0 @@ -26284,9 +26069,7 @@ var_2 = word ptr -2 add word_2065A, ax cmp word_2065A, 1770h jl short loc_17CF9 - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte_2066A, 1 add dword_1E598, 7A120h mov byte_20605, 0C8h @@ -26882,9 +26665,7 @@ loc_181E8: loc_181F1: cmp word_20650, 46h ; 'F' jnz short loc_1821A - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h mov byte_26CC7, 30h ; '0' mov byte_26CC8, 0 @@ -26952,9 +26733,7 @@ loc_182AD: loc_182C2: cmp word_20650, 0AAh ; 'ª' jnz short loc_182DD - push 5 - call sub_FA52 - add sp, 2 + call snd_se_play c, 5 mov word_2064E, 86h jmp loc_183CC ; --------------------------------------------------------------------------- @@ -27080,9 +26859,7 @@ arg_4 = dword ptr 8 push di cmp word_20650, 28h ; '(' jnz short loc_18424 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h mov bx, word_2065C mov ax, [bx] @@ -27105,9 +26882,7 @@ loc_18424: jl loc_188A4 cmp word_20650, 50h ; 'P' jnz loc_184E2 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h mov [bp+var_2], 0 mov al, byte_26CD2 @@ -27244,9 +27019,7 @@ loc_185C5: cmp word_26CD0, 14h jge loc_1879E mov byte_26CD4, 0 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 push 0 call sub_10E39 mov [bp+var_2], 0 @@ -27364,9 +27137,7 @@ loc_186CA: les bx, [bp+arg_0] mov word ptr es:[bx], 0 mov byte_26CD4, 1 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov al, byte_26CD2 add al, 8 mov byte ptr [bp+var_5], al @@ -27632,9 +27403,7 @@ loc_18935: loc_1893E: cmp word_20650, 46h ; 'F' jnz short loc_1895D - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h mov byte ptr word_26CDA+1, 14h jmp loc_189DC @@ -27645,9 +27414,7 @@ loc_1895D: jl loc_18A19 cmp word_20650, 64h ; 'd' jnz short loc_18985 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h call sub_FAC6 mov byte ptr word_26CDA, al @@ -27711,9 +27478,7 @@ loc_189DC: mov ah, 0 push ax call sub_1078E - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 loc_18A19: pop bp @@ -27755,9 +27520,7 @@ loc_18A4B: loc_18A53: cmp word_20650, 46h ; 'F' jnz short loc_18A71 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h mov byte ptr word_26CDC, 0D8h pop bp @@ -27769,9 +27532,7 @@ loc_18A71: jl loc_18B49 cmp word_20650, 64h ; 'd' jnz short loc_18A93 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h pop bp retn @@ -27924,9 +27685,7 @@ sub_18BA6 proc near jl loc_18C48 cmp word_20650, 0Ah jnz short loc_18BCB - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h pop bp retn @@ -27937,9 +27696,7 @@ loc_18BCB: jl short loc_18C48 cmp word_20650, 28h ; '(' jnz short loc_18BFC - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h cmp word_26C68, 6 jnz short loc_18C39 @@ -27952,18 +27709,14 @@ loc_18BCB: loc_18BFC: cmp word_20650, 3Ch ; '<' jnz short loc_18C0F - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 jmp short loc_18C39 ; --------------------------------------------------------------------------- loc_18C0F: cmp word_20650, 50h ; 'P' jnz short loc_18C48 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 80h cmp word_26C68, 2 jnz short loc_18C39 @@ -28021,9 +27774,7 @@ loc_18C7A: loc_18C82: cmp word_20650, 46h ; 'F' jnz short loc_18C9B - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h pop bp retn @@ -28034,9 +27785,7 @@ loc_18C9B: jl loc_18DDE cmp word_20650, 64h ; 'd' jnz short loc_18CEE - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h mov ax, word_205F8 sub ax, word_26C62 @@ -28073,9 +27822,7 @@ loc_18CEE: idiv bx or dx, dx jnz loc_18DA9 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 cmp byte_1E364, 0 jz short loc_18D75 push word_26C5A @@ -28193,9 +27940,7 @@ loc_18E10: loc_18E18: cmp word_20650, 46h ; 'F' jnz short loc_18E31 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h pop bp retn @@ -28206,9 +27951,7 @@ loc_18E31: jl short loc_18EB6 cmp word_20650, 78h ; 'x' jnz short loc_18E89 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov word_2064E, 86h mov byte_26CE4, 4 @@ -28245,9 +27988,7 @@ loc_18E89: idiv bx or dx, dx jnz short loc_18EB6 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 jmp short loc_18E54 ; --------------------------------------------------------------------------- @@ -28277,9 +28018,7 @@ var_3 = word ptr -3 jl locret_19171 cmp word_20650, 28h ; '(' jnz short loc_18F05 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 83h mov bx, word_2065C mov ax, [bx] @@ -28300,9 +28039,7 @@ loc_18F05: jl locret_19171 cmp word_20650, 50h ; 'P' jnz loc_18FC3 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h mov [bp+var_3+1], 0 mov al, byte_26CEC @@ -28409,9 +28146,7 @@ loc_18FD3: jge loc_19127 test byte ptr word_20650, 3 jnz loc_19127 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov al, byte_20618 mov ah, 0 shl ax, 4 @@ -28545,9 +28280,7 @@ loc_1918B: jge short loc_191C4 test byte ptr word_20650, 1 jz short loc_191CA - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 push word_26C5C push word_26C64 push word_26CED @@ -28591,9 +28324,7 @@ sub_191CC proc near call iatan2 mov byte ptr word_26CED+1, al mov byte_26CEF, 1Eh - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 pop bp retn ; --------------------------------------------------------------------------- @@ -28698,9 +28429,7 @@ loc_192FF: loc_19338: test byte ptr word_20650, 7 jnz short loc_19351 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -29564,9 +29293,8 @@ sub_199B3 proc far push word ptr [bx+2B8Ch] push 48h ; 'H' call super_roll_put_tiny - push 0Ah - call sub_FA52 - call sub_FA8A + call snd_se_play stdcall, 10 + call snd_se_update call sub_1A46B push 3 call palette_white_in @@ -30002,9 +29730,7 @@ loc_19F68: loc_19F72: cmp byte_2066B, 0 jz short loc_19F9E - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 push word_26D76 push si push word_2064E @@ -30127,9 +29853,7 @@ loc_1A07E: jge short loc_1A0CA cmp si, 60h jle short loc_1A0CA - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov byte_2066A, 1 add dword_218AC, 0C350h cmp word_20616, 660h @@ -30170,9 +29894,7 @@ sub_1A0CE proc near idiv bx or dx, dx jnz short loc_1A101 - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 mov ax, word_26CFE shl ax, 4 add ax, word_26D76 @@ -30207,9 +29929,7 @@ var_1 = byte ptr -1 idiv bx or dx, dx jnz short locret_1A14F - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 cmp byte_1E364, 0 jnz short loc_1A12B mov al, 0Fh @@ -30318,9 +30038,7 @@ sub_1A1B6 proc near idiv bx or dx, dx jnz short loc_1A1FC - push 7 - call sub_FA52 - add sp, 2 + call snd_se_play c, 7 xor si, si jmp short loc_1A1F7 ; --------------------------------------------------------------------------- @@ -30430,9 +30148,7 @@ loc_1A296: mov word_26D78, ax test byte ptr word_20650, 7 jnz short loc_1A30A - push 7 - call sub_FA52 - add sp, 2 + call snd_se_play c, 7 mov ax, word_26CFE shl ax, 4 add ax, word_26D76 @@ -30729,9 +30445,7 @@ sub_1A529 proc near push 200010h push 1A00140h call grc_setclip - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov si, 96h jmp loc_1A613 ; --------------------------------------------------------------------------- @@ -30790,7 +30504,7 @@ loc_1A54E: add ax, 64h ; 'd' mov PaletteTone, ax call far ptr palette_show - call sub_FA8A + call snd_se_update dec si loc_1A613: @@ -31049,9 +30763,8 @@ sub_1A7D5 proc far push word ptr [bx+2B8Ch] push 48h ; 'H' call super_roll_put_tiny - push 0Ah - call sub_FA52 - call sub_FA8A + call snd_se_play stdcall, 10 + call snd_se_update call sub_1A46B push 1 call palette_white_in @@ -31184,9 +30897,7 @@ var_2 = word ptr -2 jz short loc_1AAD6 cmp word_26D4A, 8 jl short loc_1AAB1 - push 4 - call sub_FA52 - add sp, 2 + call snd_se_play c, 4 mov byte_2066B, 1 mov al, byte_1EE96 mov ah, 0 @@ -31196,9 +30907,7 @@ var_2 = word ptr -2 ; --------------------------------------------------------------------------- loc_1AAB1: - push 0Bh - call sub_FA52 - add sp, 2 + call snd_se_play c, 11 loc_1AABB: cmp word_2065A, 384h @@ -31315,9 +31024,7 @@ loc_1AB43: call sub_D6CA loc_1ABD1: - push 2 - call sub_FA52 - add sp, 2 + call snd_se_play c, 2 mov bx, si add bx, bx mov word ptr [bx-6D46h], 1 @@ -31986,9 +31693,7 @@ sub_1B19D proc near mov bp, sp cmp word_20650, 32h ; '2' jnz short loc_1B1B9 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 82h pop bp retn @@ -31997,9 +31702,7 @@ sub_1B19D proc near loc_1B1B9: cmp word_20650, 64h ; 'd' jnz short loc_1B1D2 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 84h pop bp retn @@ -32008,9 +31711,7 @@ loc_1B1B9: loc_1B1D2: cmp word_20650, 6Ch ; 'l' jnz short loc_1B1EB - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 86h pop bp retn @@ -32019,9 +31720,7 @@ loc_1B1D2: loc_1B1EB: cmp word_20650, 74h ; 't' jnz short loc_1B204 - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 mov word_2064E, 88h pop bp retn @@ -32154,9 +31853,7 @@ sub_1B2E9 proc near jl short loc_1B35D cmp word_20650, 32h ; '2' jnz short loc_1B30A - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 82h loc_1B30A: @@ -32339,9 +32036,7 @@ var_2 = word ptr -2 jl loc_1B551 cmp word_20650, 64h ; 'd' jnz short loc_1B4A2 - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 82h jmp loc_1B52F ; --------------------------------------------------------------------------- @@ -32555,9 +32250,7 @@ arg_0 = word ptr 4 jl short loc_1B6D5 cmp word_20650, si jnz short loc_1B68A - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 loc_1B682: mov word_2064E, 82h @@ -32873,9 +32566,7 @@ loc_1B903: mov al, byte ptr word_26D87+1 add al, 3 mov byte ptr word_26D87+1, al - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 xor si, si jmp short loc_1B98D ; --------------------------------------------------------------------------- @@ -32965,9 +32656,7 @@ loc_1B9D0: mov word_26D46, 0FFFCh mov word_26D44, 0FFFCh mov word_26D48, 0FFFCh - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 82h jmp loc_1BAFB ; --------------------------------------------------------------------------- @@ -32975,9 +32664,7 @@ loc_1B9D0: loc_1BA0B: cmp word_20650, 64h ; 'd' jnz short loc_1BA7B - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 xor si, si jmp short loc_1BA73 ; --------------------------------------------------------------------------- @@ -33030,9 +32717,7 @@ loc_1BA73: loc_1BA7B: cmp word_20650, 6Eh ; 'n' jnz short loc_1BAFB - push 3 - call sub_FA52 - add sp, 2 + call snd_se_play c, 3 xor si, si jmp short loc_1BAF6 ; --------------------------------------------------------------------------- @@ -33119,9 +32804,7 @@ var_2 = word ptr -2 loc_1BB1D: cmp word_20650, 32h ; '2' jnz short loc_1BB4F - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 82h mov byte_26D89, 0 mov byte_26D8A, 0 @@ -33157,9 +32840,7 @@ loc_1BB85: idiv bx or dx, dx jnz loc_1BC3F - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 xor si, si jmp short loc_1BC0F ; --------------------------------------------------------------------------- @@ -33255,9 +32936,7 @@ var_3 = word ptr -3 loc_1BC60: cmp word_20650, 32h ; '2' jnz short loc_1BCAE - push 9 - call sub_FA52 - add sp, 2 + call snd_se_play c, 9 mov word_2064E, 82h mov al, byte_1EEA5 cbw @@ -33313,9 +32992,7 @@ loc_1BD16: idiv bx or dx, dx jnz loc_1BE6F - push 0Ah - call sub_FA52 - add sp, 2 + call snd_se_play c, 10 cmp word_20650, 78h ; 'x' jg short loc_1BDAC mov [bp+var_3+1], 0 @@ -35591,74 +35268,7 @@ snd_active db 0 byte_1E30C db 1 byte_1E30D db 0 aUmx db '“Œ•û••–‚.˜^',0 -byte_1E31A db 0FFh - db 0 - db 0 - db 20h - db 9 - db 2 - db 10h - db 5 - db 6 - db 30h ; 0 - db 8 - db 9 - db 5 - db 10h - db 0Ah - db 11h - db 0Ch - db 20h - db 20h - db 10h - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 0Ah - db 30h ; 0 - db 50h ; P - db 18h - db 11h - db 0Bh - db 4 - db 50h ; P - db 10h - db 30h ; 0 - db 4Ah ; J - db 20h - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 -byte_1E35D db 0 +include th02/hardware/snd_se[data].asm db 0 db 80h db 0C0h diff --git a/th02_op.asm b/th02_op.asm index 2c4ae4ae..c37d1753 100644 --- a/th02_op.asm +++ b/th02_op.asm @@ -557,11 +557,10 @@ sub_9D5C endp sub_9F37 proc near push bp mov bp, sp - call sub_B252 - push 0Dh - call sub_B25E + call snd_se_reset + call snd_se_play stdcall, 13 pop cx - call sub_B296 + call snd_se_update push 14h call frame_delay les bx, dword_F3DC @@ -2580,89 +2579,10 @@ loc_B24B: jb short loc_B232 pop bp retf - -; =============== S U B R O U T I N E ======================================= - - -sub_B252 proc far - mov byte_DC33, 0 - mov byte_DBF0, 0FFh - retf -sub_B252 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_B25E proc far - -arg_0 = word ptr 6 - - push bp - mov bp, sp - mov dx, [bp+arg_0] - cmp snd_fm_possible, 0 - jz short loc_B294 - cmp byte_DBF0, 0FFh - jnz short loc_B278 - mov byte_DBF0, dl - pop bp - retf ; --------------------------------------------------------------------------- -loc_B278: - mov al, byte_DBF0 - mov ah, 0 - mov bx, ax - mov al, [bx+5C1h] - mov bx, dx - cmp al, [bx+5C1h] - ja short loc_B294 - mov byte_DBF0, dl - mov byte_DC33, 0 - -loc_B294: - pop bp - retf -sub_B25E endp - - -; =============== S U B R O U T I N E ======================================= - - -sub_B296 proc far - cmp snd_fm_possible, 0 - jz short locret_B2D1 - cmp byte_DBF0, 0FFh - jz short locret_B2D1 - cmp byte_DC33, 0 - jnz short loc_B2B2 - mov ah, PMD_SE_PLAY - mov al, byte_DBF0 - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - -loc_B2B2: - inc byte_DC33 - mov al, byte_DBF0 - mov ah, 0 - mov bx, ax - mov al, [bx+5E2h] - cmp al, byte_DC33 - jnb short locret_B2D1 - mov byte_DC33, 0 - mov byte_DBF0, 0FFh - -locret_B2D1: - retf -sub_B296 endp - +include th02/hardware/snd_se.asm include th02/frame_delay.asm - seg002 ends ; =========================================================================== @@ -2685,11 +2605,10 @@ var_2 = word ptr -2 enter 2, 0 push si mov [bp+var_2], 1 - call sub_B252 - push 6 - call sub_B25E + call snd_se_reset + call snd_se_play stdcall, 6 pop cx - call sub_B296 + call snd_se_update xor si, si jmp short loc_B370 ; --------------------------------------------------------------------------- @@ -5575,74 +5494,7 @@ include th02/formats/pfopen[data].asm aUmx db '“Œ•û••–‚.˜^',0 snd_active db 0 db 0 -byte_DBF0 db 0FFh - db 0 - db 0 - db 20h - db 9 - db 2 - db 10h - db 5 - db 6 - db 30h ; 0 - db 8 - db 9 - db 5 - db 10h - db 0Ah - db 11h - db 0Ch - db 20h - db 20h - db 10h - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 0Ah - db 30h ; 0 - db 50h ; P - db 18h - db 11h - db 0Bh - db 4 - db 50h ; P - db 10h - db 30h ; 0 - db 4Ah ; J - db 20h - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 -byte_DC33 db 0 +include th02/hardware/snd_se[data].asm byte_DC34 db 1 db 0 include th02/strings/hiscore[data].asm diff --git a/th03/hardware/snd_se_priority[data].asm b/th03/hardware/snd_se_priority[data].asm new file mode 100644 index 00000000..1eb225ef --- /dev/null +++ b/th03/hardware/snd_se_priority[data].asm @@ -0,0 +1,66 @@ +snd_se_priorities db 0 + db 0 + db 32 + db 16 + db 2 + db 18 + db 18 + db 18 + db 64 + db 16 + db 17 + db 2 + db 17 + db 32 + db 18 + db 18 + db 18 + db 18 + db 32 + db 32 + db 18 + db 18 + db 14 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 +snd_se_priority_frames db 0 + db 0 + db 36 + db 16 + db 4 + db 16 + db 8 + db 10 + db 48 + db 80 + db 24 + db 17 + db 11 + db 4 + db 80 + db 16 + db 48 + db 74 + db 50 + db 32 + db 24 + db 68 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 + db 0 diff --git a/th03/hardware/snd_se_state[data].asm b/th03/hardware/snd_se_state[data].asm new file mode 100644 index 00000000..05804d3c --- /dev/null +++ b/th03/hardware/snd_se_state[data].asm @@ -0,0 +1,2 @@ +snd_se_playing db -1 +snd_se_frame db 0 diff --git a/th03_main.asm b/th03_main.asm index 17566e27..1a2e2cd6 100644 --- a/th03_main.asm +++ b/th03_main.asm @@ -486,7 +486,7 @@ loc_977E: push word_1EFF8 push 6626h call sub_DA43 - call sub_EC76 + call snd_se_update test byte_1EFFB, 10h jz short loc_9845 call sub_C7A5 @@ -1131,7 +1131,7 @@ loc_9E24: mov dx, 0A4h mov al, 1 out dx, al - call sub_EC2E + call snd_se_reset nopcall sub_B8F7 nopcall sub_BAE0 pushd 0 @@ -1532,7 +1532,7 @@ sub_A21F proc near call farfp_20F28 mov word_23B6A, 4110h mov word_23BEA, 4110h - call sub_EC2E + call snd_se_reset nopcall sub_B8F7 nopcall sub_A38E nopcall sub_BAE0 @@ -4307,8 +4307,7 @@ arg_0 = word ptr 4 add ax, 0FFF8h mov word_20E40, ax mov byte_20E3C, 1 - push 0Eh - call sub_EC3A + call snd_se_play pascal, 14 mov al, byte ptr word_23AF0 mov ah, 0 mov bx, 1 @@ -5284,10 +5283,9 @@ loc_C7C1: ; --------------------------------------------------------------------------- loc_C7C8: - call sub_EC2E - push 15h - call sub_EC3A - call sub_EC76 + call snd_se_reset + call snd_se_play pascal, 21 + call snd_se_update jmp short loc_C7E7 ; --------------------------------------------------------------------------- @@ -5319,10 +5317,9 @@ loc_C80A: loc_C816: cmp word ptr unk_1EFFA, 0 jnz short loc_C80A - call sub_EC2E - push 15h - call sub_EC3A - call sub_EC76 + call snd_se_reset + call snd_se_play pascal, 21 + call snd_se_update pop bp retn sub_C7A5 endp @@ -5633,10 +5630,9 @@ sub_CA3C proc far jnz short loc_CAC8 loc_CA4E: - call sub_EC2E - push 13h - call sub_EC3A - call sub_EC76 + call snd_se_reset + call snd_se_play pascal, 19 + call snd_se_update push 0 nopcall sub_BA91 push 1 @@ -7035,8 +7031,7 @@ loc_D56B: mov al, byte_220CA cmp byte_220DC, al jnb short locret_D5A0 - push 8 - call sub_EC3A + call snd_se_play pascal, 8 les bx, dword_1F2F0 assume es:nothing inc byte ptr es:[bx+34h] @@ -8023,8 +8018,7 @@ loc_DBFE: loc_DC34: cmp word ptr [si+18h], 180h jnz loc_DD3C - push 9 - call sub_EC3A + call snd_se_play pascal, 9 jmp loc_DD3C ; --------------------------------------------------------------------------- @@ -8489,8 +8483,7 @@ arg_0 = word ptr 4 mov si, [bp+arg_0] cmp byte ptr [si+10h], 40h jnz short loc_E036 - push 2 - call sub_EC3A + call snd_se_play pascal, 2 push 3Fh ; '?' call sub_A41E mov [si+12h], al @@ -8599,8 +8592,7 @@ loc_E0BF: mov ah, 0 mov bx, ax mov byte ptr [bx+658Bh], 1 - push 7 - call sub_EC3A + call snd_se_play pascal, 7 mov al, [si+8] mov [si+1Eh], al push word ptr [si] @@ -9366,8 +9358,7 @@ loc_E7B3: loc_E7C0: mov di, 66A6h - push 1 - call sub_EC3A + call snd_se_play pascal, 1 jmp short loc_E7D4 ; --------------------------------------------------------------------------- @@ -9538,7 +9529,7 @@ seg001 ends ; =========================================================================== ; Segment type: Pure code -seg002 segment byte public 'CODE' use16 +seg002 segment word public 'CODE' use16 assume cs:seg002 ;org 8 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing @@ -9872,87 +9863,7 @@ sub_EA8C endp ; --------------------------------------------------------------------------- nop - -; =============== S U B R O U T I N E ======================================= - - -sub_EC2E proc far - mov byte_1DB4B, 0 - mov byte_1DB4A, 0FFh - retf -sub_EC2E endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_EC3A proc far - -arg_0 = word ptr 6 - - push bp - mov bp, sp - mov dx, [bp+arg_0] - cmp snd_fm_possible, 0 - jz short loc_EC72 - cmp byte_1DB4A, 0FFh - jnz short loc_EC56 - mov byte_1DB4A, dl - pop bp - retf 2 -; --------------------------------------------------------------------------- - -loc_EC56: - mov al, byte_1DB4A - mov ah, 0 - mov bx, ax - mov al, [bx+5F2h] - mov bx, dx - cmp al, [bx+5F2h] - ja short loc_EC72 - mov byte_1DB4A, dl - mov byte_1DB4B, 0 - -loc_EC72: - pop bp - retf 2 -sub_EC3A endp - - -; =============== S U B R O U T I N E ======================================= - - -sub_EC76 proc far - cmp snd_fm_possible, 0 - jz short locret_ECB1 - cmp byte_1DB4A, 0FFh - jz short locret_ECB1 - cmp byte_1DB4B, 0 - jnz short loc_EC92 - mov ah, PMD_SE_PLAY - mov al, byte_1DB4A - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - -loc_EC92: - inc byte_1DB4B - mov al, byte_1DB4A - mov ah, 0 - mov bx, ax - mov al, [bx+613h] - cmp al, byte_1DB4B - jnb short locret_ECB1 - mov byte_1DB4B, 0 - mov byte_1DB4A, 0FFh - -locret_ECB1: - retf -sub_EC76 endp - +include th02/hardware/snd_se.asm include th02/hardware/snd_kaja_func.asm ; =============== S U B R O U T I N E ======================================= @@ -10779,8 +10690,7 @@ arg_4 = word ptr 8 mov di, [bp+arg_4] cmp [bp+arg_0], 1 jnz short loc_F210 - push 10h - call sub_EC3A + call snd_se_play pascal, 16 loc_F210: push di @@ -11038,8 +10948,7 @@ loc_F42B: mov ah, 0 mov bx, ax mov byte ptr [bx+2D54h], 0 - push 12h - call sub_EC3A + call snd_se_play pascal, 18 mov al, 1 sub al, byte ptr word_1FE88 push ax @@ -11934,8 +11843,7 @@ loc_FBB5: jb loc_FC69 test byte ptr word_1F3B0, 1 jnz loc_FC51 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov al, byte_20E28 mov byte ptr word_23E42+1, al mov byte ptr word_23E44+1, 22h ; '"' @@ -12077,8 +11985,7 @@ loc_FD12: loc_FD47: test byte ptr word_1F3B0, 1 jnz short loc_FD55 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 loc_FD55: cmp word_1F3B0, 80h @@ -12150,8 +12057,7 @@ loc_FDCB: mov byte ptr word_23E44+1, 18h loc_FDD0: - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov byte ptr word_23E42+1, 0 mov ax, word_1F33E add ax, 180h @@ -12237,8 +12143,7 @@ loc_FE54: mov al, byte_1F3A5 mov byte ptr word_23E42, al call sub_17730 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov al, byte_20E2A add byte_20E2B, al @@ -12805,8 +12710,7 @@ loc_10376: push ax call sub_CDBD mov byte_1F353, 2 - push 5 - call sub_EC3A + call snd_se_play pascal, 5 loc_103A5: test byte ptr word_1F3B0, 3 @@ -12909,8 +12813,7 @@ loc_1047F: loc_104A7: test byte ptr word_1F3B0, 1 jnz short loc_104F6 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov ax, word_20E50 mov word_23E3E, ax mov ax, word_20E52 @@ -13243,9 +13146,8 @@ loc_107B2: jnz short loc_107CC loc_107C0: - call sub_EC2E - push 5 - call sub_EC3A + call snd_se_reset + call snd_se_play pascal, 5 loc_107CC: cmp word_1F3B0, 60h @@ -14758,8 +14660,7 @@ loc_114D1: loc_114E1: cmp word_1F3B0, 24h ; '$' jnz short loc_1150B - push 3 - call sub_EC3A + call snd_se_play pascal, 3 xor si, si jmp short loc_11504 ; --------------------------------------------------------------------------- @@ -14785,8 +14686,7 @@ loc_1150B: jnz short loc_1152D loc_11519: - push 3 - call sub_EC3A + call snd_se_play pascal, 3 call sub_17730 mov al, byte_23DE2 add al, 8 @@ -14931,8 +14831,7 @@ sub_11620 proc near div bx cmp dx, 1 jnz short loc_116A2 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov byte ptr word_23E44+1, 0Eh mov ax, word_1F33E mov word_23E3E, ax @@ -15587,8 +15486,7 @@ loc_11B6B: mov byte ptr word_23E42, al push 1 call sub_11AC1 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov byte_1F353, 0 mov byte_1F34F, 1 mov word_1F3B0, 0 @@ -15646,8 +15544,7 @@ loc_11BE5: mov byte ptr word_23E42, al push 0 call sub_11AC1 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov byte_1F353, 0 mov byte_1F34F, 1 mov word_1F3B0, 0 @@ -15682,8 +15579,7 @@ sub_11C5F proc near div bx cmp dx, 1 jnz loc_11D06 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov byte_23E4E, 1 mov al, byte ptr word_1F3B0 mov byte ptr word_23E42+1, al @@ -15850,8 +15746,7 @@ loc_11E18: mov ah, 0 cmp ax, di jg loc_11D77 - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov byte_1F353, 0 mov byte_1F34F, 1 mov word_1F3B0, 0 @@ -17567,8 +17462,7 @@ loc_12C8B: mov word_23E40, ax mov byte ptr word_23E42, 30h ; '0' call sub_17730 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 pop bp retn ; --------------------------------------------------------------------------- @@ -17656,8 +17550,7 @@ loc_12DC5: mov al, byte_1F3A1 mov byte_23E47, al call sub_17730 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov byte_23E4E, 1 mov byte ptr word_23E42+1, 20h ; ' ' mov byte ptr word_23E42, 10h @@ -17697,8 +17590,7 @@ loc_12E2B: loc_12E4D: mov byte_23E47, al call sub_17730 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 jmp short loc_12E75 ; --------------------------------------------------------------------------- @@ -17762,8 +17654,7 @@ loc_12EB0: mov word_23E40, ax mov byte ptr word_23E42, 30h ; '0' call sub_17730 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 loc_12EED: cmp word_1F3B0, 64h ; 'd' @@ -17857,8 +17748,7 @@ loc_12F77: mov al, byte_23DE6 mov byte ptr word_23E42+1, al call sub_17730 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 loc_12FBF: cmp word_1F3B0, 40h @@ -18442,8 +18332,7 @@ loc_13483: mov ah, 0 cmp ax, si jg short loc_13426 - push 5 - call sub_EC3A + call snd_se_play pascal, 5 jmp short loc_134A7 ; --------------------------------------------------------------------------- @@ -18560,10 +18449,10 @@ loc_1356B: loc_13581: cmp si, 4 jl short loc_1356B - push 0Ah + push 10 loc_13588: - call sub_EC3A + call snd_se_play jmp short loc_135A1 ; --------------------------------------------------------------------------- @@ -18647,8 +18536,7 @@ loc_135F8: jnz short loc_1364C loc_13633: - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 call sub_17730 mov al, byte_23DE8 add al, 80h @@ -20406,8 +20294,7 @@ loc_1430F: loc_1432F: cmp si, 0Ch jl short loc_1430F - push 6 - call sub_EC3A + call snd_se_play pascal, 6 pop si pop bp retf 4 @@ -20460,8 +20347,7 @@ loc_14362: loc_14398: cmp si, 0Ch jl short loc_14362 - push 6 - call sub_EC3A + call snd_se_play pascal, 6 loc_143A4: mov bx, word_1FE4E @@ -21129,8 +21015,7 @@ loc_14914: jnb loc_149D1 test [bp+var_1], 1 jz short loc_14929 - push 10h - call sub_EC3A + call snd_se_play pascal, 16 loc_14929: mov al, [bp+var_1] @@ -22006,8 +21891,7 @@ sub_1501E proc far mov ah, 0 mov bx, ax mov byte ptr [bx+307Eh], 0 - push 12h - call sub_EC3A + call snd_se_play pascal, 18 loc_1505C: mov al, byte ptr word_1FE88 @@ -22076,8 +21960,7 @@ loc_150CA: loc_150E1: cmp si, 20h ; ' ' jl short loc_150CA - push 12h - call sub_EC3A + call snd_se_play pascal, 18 loc_150ED: mov al, byte ptr word_1FE88 @@ -22288,8 +22171,7 @@ loc_152C2: jnb loc_15360 test [bp+var_1], 1 jz short loc_152D7 - push 10h - call sub_EC3A + call snd_se_play pascal, 16 loc_152D7: cmp [bp+var_1], 60h @@ -22529,8 +22411,7 @@ arg_2 = byte ptr 6 mov ax, [bx+65A8h] mov bx, word_20E22 mov [bx+4], ax - push 0Dh - call sub_EC3A + call snd_se_play pascal, 13 pop bp retn 4 sub_1546C endp @@ -23376,8 +23257,7 @@ loc_15BB9: jnb loc_15C57 test [bp+var_F], 7 jnz short loc_15BEC - push 5 - call sub_EC3A + call snd_se_play pascal, 5 mov PaletteTone, 8Ch call far ptr palette_show push 9000B80h @@ -23886,8 +23766,7 @@ sub_15F9D proc near cmp byte ptr [bx+1], 0Ah jnz short loc_15FB6 mov byte ptr [bx], 0Ah - push 3 - call sub_EC3A + call snd_se_play pascal, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -25232,8 +25111,7 @@ var_1 = byte ptr -1 loc_16AC4: mov byte ptr [si], 2 mov byte ptr [si+1], 0 - push 7 - call sub_EC3A + call snd_se_play pascal, 7 jmp short loc_16AF9 ; --------------------------------------------------------------------------- @@ -25247,8 +25125,7 @@ loc_16AD4: idiv bx or dx, dx jnz short loc_16AF0 - push 0Fh - call sub_EC3A + call snd_se_play pascal, 15 loc_16AF0: cmp [bp+var_1], 40h @@ -25304,8 +25181,7 @@ yumemi_16B0C proc far jl short loc_16BB0 mov byte ptr [si], 2 mov byte ptr [si+1], 0 - push 7 - call sub_EC3A + call snd_se_play pascal, 7 jmp short loc_16BB0 ; --------------------------------------------------------------------------- @@ -25986,8 +25862,7 @@ loc_17081: loc_17099: cmp si, 8 jl short loc_17081 - push 12h - call sub_EC3A + call snd_se_play pascal, 18 loc_170A5: mov al, byte ptr word_1FE88 @@ -26186,8 +26061,7 @@ loc_17255: jnb loc_17332 test [bp+var_1], 1 jnz short loc_1727B - push 10h - call sub_EC3A + call snd_se_play pascal, 16 mov al, byte ptr word_1FE88 mov ah, 0 imul ax, 3 @@ -28505,8 +28379,7 @@ loc_184A5: idiv bx or dx, dx jnz short loc_18518 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov al, [bp+var_1] mov ah, 0 add ax, 0FFC0h @@ -28653,8 +28526,7 @@ loc_185E9: loc_18601: cmp si, 8 jl short loc_185E9 - push 11h - call sub_EC3A + call snd_se_play pascal, 17 loc_1860D: mov al, byte ptr word_1FE88 @@ -28879,8 +28751,7 @@ loc_18801: jnb loc_18911 test [bp+var_3], 1 jz short loc_18845 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov al, byte ptr word_1FE88 mov ah, 0 imul ax, 3 @@ -29102,8 +28973,7 @@ loc_18A10: and ax, 3 cmp ax, 2 jge short loc_18A4E - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 push 0A0h push word_1FE88 call sub_A3D2 @@ -29360,8 +29230,7 @@ loc_18C95: and ax, 3 cmp ax, 2 jge short loc_18CD2 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 mov PaletteTone, 0AAh ; 'ª' mov byte_23B01, 1 mov al, byte ptr word_1FE88 @@ -29661,8 +29530,7 @@ loc_18F71: idiv bx or dx, dx jnz short loc_18FE2 - push 5 - call sub_EC3A + call snd_se_play pascal, 5 jmp short loc_18FE2 ; --------------------------------------------------------------------------- @@ -30061,8 +29929,7 @@ loc_1928B: loc_192CC: cmp byte ptr [si+1], 10h jnz short loc_192DB - push 14h - call sub_EC3A + call snd_se_play pascal, 20 jmp short loc_1930C ; --------------------------------------------------------------------------- @@ -30709,8 +30576,7 @@ loc_197CA: mov byte ptr [bx+1], 0 mov bx, [di] mov byte ptr [bx], 1 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 loc_197DC: mov bx, [di] @@ -31475,8 +31341,7 @@ loc_19CEF: loc_19D0E: mov byte ptr [si+1], 0 mov byte ptr [si], 1 - push 14h - call sub_EC3A + call snd_se_play pascal, 20 loc_19D1C: inc byte ptr [si+1] @@ -31754,8 +31619,7 @@ sub_19E2A endp sub_19EF9 proc near push bp mov bp, sp - push 3 - call sub_EC3A + call snd_se_play pascal, 3 mov bx, word_2028A push word ptr [bx+2] push word ptr [bx+4] @@ -33088,8 +32952,7 @@ loc_1A8A6: loc_1A8AF: mov word ptr [si+0Eh], 0 mov byte ptr [si], 1 - push 0Ah - call sub_EC3A + call snd_se_play pascal, 10 loc_1A8BE: inc word ptr [si+0Eh] @@ -33907,8 +33770,7 @@ loc_1AF4D: mov word ptr [si+14h], 10h mov byte ptr [si+1], 0 mov byte ptr [si], 1 - push 7 - call sub_EC3A + call snd_se_play pascal, 7 loc_1AF60: inc byte ptr [si+1] @@ -34476,8 +34338,7 @@ loc_1B2EF: mov bx, ax mov ax, [bx+65A8h] mov [si+4], ax - push 0Fh - call sub_EC3A + call snd_se_play pascal, 15 jmp short loc_1B34F ; --------------------------------------------------------------------------- @@ -35176,8 +35037,7 @@ loc_1B871: mov [bx], al cmp al, 1 jnz short loc_1B886 - push 1 - call sub_EC3A + call snd_se_play pascal, 1 loc_1B886: mov bx, word_1F868 @@ -36356,8 +36216,7 @@ arg_2 = word ptr 8 mov ax, [bp+arg_0] mov [bx+4], ax mov word ptr [bx+6], 0FFF0h - push 6 - call sub_EC3A + call snd_se_play pascal, 6 pop bp retf 4 kotohime_1C167 endp @@ -37583,75 +37442,9 @@ snd_active db 0 db 0 include libs/master.lib/respal_exist[data].asm include libs/master.lib/draw_trapezoid[data].asm -byte_1DB4A db 0FFh -byte_1DB4B db 0 +include th03/hardware/snd_se_state[data].asm include th02/formats/pfopen[data].asm - db 0 - db 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 11h - db 20h - db 12h - db 12h - db 12h - db 12h - db 20h - db 20h - db 12h - db 12h - db 0Eh - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 0Ah - db 30h ; 0 - db 50h ; P - db 18h - db 11h - db 0Bh - db 4 - db 50h ; P - db 10h - db 30h ; 0 - db 4Ah ; J - db 32h ; 2 - db 20h - db 18h - db 44h ; D - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 +include th03/hardware/snd_se_priority[data].asm aYume_cfg db 'YUME.CFG',0 db 0 byte_1DB9E db 0FFh diff --git a/th03_mainl.asm b/th03_mainl.asm index fa29c77b..5d7355fe 100644 --- a/th03_mainl.asm +++ b/th03_mainl.asm @@ -1153,7 +1153,7 @@ loc_9DAD: push offset aMikoft_bft ; "MIKOFT.bft" call gaiji_entry_bfnt call snd_load c, offset aYume_efc, ds, SND_LOAD_SE - call sub_CE3E + call snd_se_reset call sub_D784 les bx, dword_105DA cmp byte ptr es:[bx+35h], 0 @@ -2793,10 +2793,9 @@ loc_ABFE: lea ax, [bp+var_2] push ax call sub_A50A - call sub_CE3E - push [bp+var_2] - call sub_CE4A - call sub_CE86 + call snd_se_reset + call snd_se_play pascal, [bp+var_2] + call snd_se_update jmp short loc_AC1E ; default ; --------------------------------------------------------------------------- @@ -6724,87 +6723,7 @@ sub_CB68 endp include th02/formats/pi_slot_palette_apply.asm include th02/formats/pi_slot_put.asm include th03/formats/pi_slot_put_interlace.asm - -; =============== S U B R O U T I N E ======================================= - - -sub_CE3E proc far - mov byte_EC7D, 0 - mov byte_EC7C, 0FFh - retf -sub_CE3E endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_CE4A proc far - -arg_0 = word ptr 6 - - push bp - mov bp, sp - mov dx, [bp+arg_0] - cmp snd_fm_possible, 0 - jz short loc_CE82 - cmp byte_EC7C, 0FFh - jnz short loc_CE66 - mov byte_EC7C, dl - pop bp - retf 2 -; --------------------------------------------------------------------------- - -loc_CE66: - mov al, byte_EC7C - mov ah, 0 - mov bx, ax - mov al, [bx+896h] - mov bx, dx - cmp al, [bx+896h] - ja short loc_CE82 - mov byte_EC7C, dl - mov byte_EC7D, 0 - -loc_CE82: - pop bp - retf 2 -sub_CE4A endp - - -; =============== S U B R O U T I N E ======================================= - - -sub_CE86 proc far - cmp snd_fm_possible, 0 - jz short locret_CEC1 - cmp byte_EC7C, 0FFh - jz short locret_CEC1 - cmp byte_EC7D, 0 - jnz short loc_CEA2 - mov ah, PMD_SE_PLAY - mov al, byte_EC7C - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - -loc_CEA2: - inc byte_EC7D - mov al, byte_EC7C - mov ah, 0 - mov bx, ax - mov al, [bx+8B7h] - cmp al, byte_EC7D - jnb short locret_CEC1 - mov byte_EC7D, 0 - mov byte_EC7C, 0FFh - -locret_CEC1: - retf -sub_CE86 endp - +include th02/hardware/snd_se.asm include th02/hardware/snd_kaja_func.asm ; =============== S U B R O U T I N E ======================================= @@ -8043,77 +7962,11 @@ include libs/master.lib/superpa[data].asm snd_active db 0 db 0 include libs/master.lib/respal_exist[data].asm -byte_EC7C db 0FFh -byte_EC7D db 0 +include th03/hardware/snd_se_state[data].asm include th02/formats/pfopen[data].asm byte_EC84 db 0 db 0 - db 0 - db 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 11h - db 20h - db 12h - db 12h - db 12h - db 12h - db 20h - db 20h - db 12h - db 12h - db 0Eh - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 0Ah - db 30h ; 0 - db 50h ; P - db 18h - db 11h - db 0Bh - db 4 - db 50h ; P - db 10h - db 30h ; 0 - db 4Ah ; J - db 32h ; 2 - db 20h - db 18h - db 44h ; D - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 - db 0 +include th03/hardware/snd_se_priority[data].asm db 30h ; 0 db 0 aOver_pi db 'over.pi',0 diff --git a/th04/hardware/snd_se.asm b/th04/hardware/snd_se.asm new file mode 100644 index 00000000..91618704 --- /dev/null +++ b/th04/hardware/snd_se.asm @@ -0,0 +1,67 @@ +; void snd_se_reset(void) +func snd_se_reset + mov snd_se_frame, 0 + mov snd_se_playing, -1 + ret +endfunc + + +; void DEFCONV snd_se_play(unsigned char se) +func snd_se_play + mov bx, sp + mov dx, ss:[bx+4] + cmp snd_se_mode, SND_SE_OFF + jz short @@ret + cmp snd_se_playing, -1 + jnz short @@priority? + mov snd_se_playing, dl + ret 2 + +@@priority?: + mov bl, snd_se_playing + xor bh, bh + mov al, snd_se_priorities[bx] + mov bx, dx + cmp al, snd_se_priorities[bx] + ja short @@ret + mov snd_se_playing, dl + mov snd_se_frame, 0 + +@@ret: + ret 2 +endfunc + + +; void snd_se_update(void) +func snd_se_update + cmp snd_se_mode, SND_SE_OFF + jz short @@ret + cmp snd_se_playing, -1 + jz short @@ret + cmp snd_se_frame, 0 + jnz short @@unlock? + mov al, snd_se_playing + cmp snd_se_mode, SND_SE_BEEP + jz short @@beep + mov ah, PMD_SE_PLAY + int 60h + jmp short @@unlock? + +@@beep: + xor ah, ah + push ax + call bgm_sound + +@@unlock?: + inc snd_se_frame + mov bl, snd_se_playing + xor bh, bh + mov al, snd_se_priority_frames[bx] + cmp al, snd_se_frame + jnb short @@ret + mov snd_se_frame, 0 + mov snd_se_playing, -1 + +@@ret: + ret +endfunc diff --git a/th04/hardware/snd_se_priority[data].asm b/th04/hardware/snd_se_priority[data].asm new file mode 100644 index 00000000..cf553cdd --- /dev/null +++ b/th04/hardware/snd_se_priority[data].asm @@ -0,0 +1,34 @@ +snd_se_priorities db 0 + db 0 + db 32 + db 16 + db 2 + db 18 + db 18 + db 64 + db 16 + db 17 + db 2 + db 18 + db 32 + db 32 + db 32 + db 32 + db 0 +snd_se_priority_frames db 0 + db 0 + db 36 + db 16 + db 4 + db 16 + db 8 + db 48 + db 80 + db 17 + db 4 + db 11 + db 80 + db 80 + db 80 + db 32 + db 0 diff --git a/th04_main.asm b/th04_main.asm index 2bc72ce5..aba330ce 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -573,7 +573,7 @@ loc_AC7A: out dx, al mov byte_25A3D, al xor byte_25A3C, 1 - call sub_138EC + call snd_se_update inc dword_266C6 mov ax, word_266CA mov dx, ax @@ -6024,10 +6024,9 @@ loc_D47B: lea ax, [bp+var_2] push ax call sub_D0CA - call sub_138A6 - push [bp+var_2] - call sub_138B2 - call sub_138EC + call snd_se_reset + call snd_se_play pascal, [bp+var_2] + call snd_se_update jmp loc_D528 ; default ; --------------------------------------------------------------------------- @@ -9436,8 +9435,7 @@ loc_EE8C: nopcall sub_EEE8 mov byte_259DB, 1 mov fp_259DE, offset sub_112D8 - push 7 - call sub_138B2 + call snd_se_play pascal, 7 locret_EEA3: leave @@ -11762,8 +11760,7 @@ loc_FFED: mov ax, fp_255AC mov fp_255AA, ax mov byte_2CFFA, 0C0h - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_236E0, 1 les bx, dword_2CDC6 inc byte ptr es:[bx+32h] @@ -11866,8 +11863,7 @@ loc_10096: push word_266DA push word_266DC nopcall sub_C64A - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_100FE: call sub_C156 @@ -11975,8 +11971,7 @@ loc_101D7: shl ax, 4 push ax nopcall sub_C64A - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_101F4: call sub_C156 @@ -12061,8 +12056,7 @@ loc_10288: loc_1028E: cmp byte_256A9, 0B0h ; '°' jnz short loc_102A8 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 mov byte_255BC, 1 mov byte_236E0, 0 jmp short loc_102AF @@ -13033,8 +13027,7 @@ loc_109E9: mov word_2D00C, ax nopcall sub_F07A nopcall sub_11DE6 - push 2 - call sub_138B2 + call snd_se_play pascal, 2 cmp byte_266D5, 16h jb short loc_10A16 mov byte_266D5, 15h @@ -13205,8 +13198,7 @@ loc_10B97: loc_10BB0: call fp_257DA - push 1 - call sub_138B2 + call snd_se_play pascal, 1 jmp short loc_10BC7 ; --------------------------------------------------------------------------- @@ -18049,11 +18041,10 @@ seg001 ends ; =========================================================================== ; Segment type: Pure code -seg002 segment byte public 'CODE' use16 +seg002 segment word public 'CODE' use16 assume cs:seg002 ;org 0Dh assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing - db 0 include th01/hardware/vram_planes_set.asm @@ -18837,88 +18828,7 @@ sub_137A4 endp ; --------------------------------------------------------------------------- nop -; =============== S U B R O U T I N E ======================================= - - -sub_138A6 proc far - mov byte_21C55, 0 - mov byte_21C54, 0FFh - retf -sub_138A6 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_138B2 proc far - mov bx, sp - mov dx, ss:[bx+4] - cmp snd_se_mode, SND_SE_OFF - jz short locret_138E8 - cmp byte_21C54, 0FFh - jnz short loc_138CD - mov byte_21C54, dl - retf 2 -; --------------------------------------------------------------------------- - -loc_138CD: - mov bl, byte_21C54 - xor bh, bh - mov al, [bx+8D2h] - mov bx, dx - cmp al, [bx+8D2h] - ja short locret_138E8 - mov byte_21C54, dl - mov byte_21C55, 0 - -locret_138E8: - retf 2 -sub_138B2 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_138EC proc far - cmp snd_se_mode, SND_SE_OFF - jz short locret_13937 - cmp byte_21C54, 0FFh - jz short locret_13937 - cmp byte_21C55, 0 - jnz short loc_13919 - mov al, byte_21C54 - cmp snd_se_mode, SND_SE_BEEP - jz short loc_13911 - mov ah, PMD_SE_PLAY - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - jmp short loc_13919 -; --------------------------------------------------------------------------- - -loc_13911: - xor ah, ah - push ax - call bgm_sound - -loc_13919: - inc byte_21C55 - mov bl, byte_21C54 - xor bh, bh - mov al, [bx+8E3h] - cmp al, byte_21C55 - jnb short locret_13937 - mov byte_21C55, 0 - mov byte_21C54, 0FFh - -locret_13937: - retf -sub_138EC endp - +include th04/hardware/snd_se.asm ; =============== S U B R O U T I N E ======================================= @@ -19226,44 +19136,11 @@ byte_21AF2 db 1 db 0 include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm - dw 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 12h - db 20h - db 20h - db 20h - db 20h - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 30h ; 0 - db 50h ; P - db 11h - db 4 - db 0Bh - db 50h ; P - db 50h ; P - db 50h ; P - db 20h - db 0 +include th04/hardware/snd_se_priority[data].asm include th04/hardware/snd[data].asm db 0 include th04/hardware/snd_load[data].asm -byte_21C54 db 0FFh -byte_21C55 db 0 +include th03/hardware/snd_se_state[data].asm byte_21C56 db 0 db 0 word_21C58 dw 0 diff --git a/th04_main_seg3+4.inc b/th04_main_seg3+4.inc index 97bc23aa..b3dbdb37 100644 --- a/th04_main_seg3+4.inc +++ b/th04_main_seg3+4.inc @@ -993,7 +993,7 @@ sub_14017 proc far push 9 loc_14117: - call sub_138B2 + call snd_se_play jmp loc_142E4 ; --------------------------------------------------------------------------- @@ -1035,8 +1035,7 @@ loc_14158: push word ptr dword_266F4+2 push 300020h call sub_13E8C - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1419A: mov word_257E2, 100h @@ -1146,8 +1145,7 @@ loc_142AC: push word ptr dword_266F4+2 push 800030h call sub_13E8C - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov byte_255B7, 4 jmp short loc_142E4 ; --------------------------------------------------------------------------- @@ -1206,8 +1204,7 @@ loc_14339: mov byte_266ED, al call fp_2D004 call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1436F: cmp word_26706, 20h ; ' ' @@ -1241,8 +1238,7 @@ sub_14383 proc near mov byte_266ED, al call fp_2D004 call sub_1CFA2 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_143C5: pop bp @@ -1278,8 +1274,7 @@ loc_143D6: mov byte_26709, al call fp_2D004 call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_14411: cmp word_26706, 20h ; ' ' @@ -1321,8 +1316,7 @@ loc_14435: mov byte_266EF, 18h call fp_2D004 call sub_1CFA2 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 mov al, byte_26709 add al, 6 mov byte_26709, al @@ -1535,8 +1529,7 @@ loc_14629: push word ptr dword_266F4+2 push 600030h call sub_13E8C - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 push word ptr dword_266F4 push word ptr dword_266F4+2 push 5 @@ -1698,8 +1691,7 @@ sub_14798 proc near mov byte_266EE, al call fp_2D004 call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_147D9: pop bp @@ -1730,8 +1722,7 @@ sub_147DB proc near call fp_2D004 mov byte_2CFF7, 2 call fp_2D002 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_14826: pop bp @@ -1796,8 +1787,7 @@ loc_1488D: jmp word ptr cs:[bx+2Ah] ; switch jump loc_14891: - push 9 ; jumptable 0001488D cases 250,258,266,274 - call sub_138B2 + call snd_se_play pascal, 9 ; jumptable 0001488D cases 250,258,266,274 push word ptr dword_266F4 push word ptr dword_266F4+2 push 2 @@ -1805,8 +1795,7 @@ loc_14891: ; --------------------------------------------------------------------------- loc_148A4: - push 3 ; jumptable 0001488D cases 290,298,306,314,390,398,406,414,490,498,506,514 - call sub_138B2 + call snd_se_play pascal, 3 ; jumptable 0001488D cases 290,298,306,314,390,398,406,414,490,498,506,514 mov byte_266EC, 2Eh ; '.' mov byte_266EF, 5 mov byte_266F0, 6 @@ -1822,7 +1811,7 @@ loc_148CE: push 9 ; jumptable 0001488D cases 350,358,366,374 loc_148D0: - call sub_138B2 + call snd_se_play push word ptr dword_266F4 push word ptr dword_266F4+2 push 3 @@ -1830,8 +1819,7 @@ loc_148D0: ; --------------------------------------------------------------------------- loc_148E1: - push 9 ; jumptable 0001488D case 450 - call sub_138B2 + call snd_se_play pascal, 9 ; jumptable 0001488D case 450 push word ptr dword_266F4 push word ptr dword_266F4+2 push 5 @@ -2102,8 +2090,7 @@ sub_14AF2 proc near idiv bx or dx, dx jnz short loc_14B63 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov al, byte_255B3 shl al, 5 add al, 20h ; ' ' @@ -2162,8 +2149,7 @@ sub_14B76 proc near idiv bx or dx, dx jnz short loc_14BBA - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov al, byte_255B3 shl al, 5 add al, 20h ; ' ' @@ -2207,8 +2193,7 @@ sub_14BCD proc near idiv bx or dx, dx jnz short loc_14C32 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov byte_266EE, 40h mov byte_266EC, 0 mov al, byte_255B3 @@ -2275,8 +2260,7 @@ loc_14C6B: idiv bx or dx, dx jnz short loc_14CCC - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov byte_266EE, 28h ; '(' mov byte_266EC, 2Dh ; '-' mov byte_266EF, 5 @@ -2527,10 +2511,10 @@ loc_14EE0: push word ptr dword_266F4+2 push 800030h call sub_13E8C - push 0Ch + push 12 loc_14F0F: - call sub_138B2 + call snd_se_play jmp short loc_14F57 ; --------------------------------------------------------------------------- @@ -2628,7 +2612,7 @@ loc_14F9B: push 3 loc_14FF9: - call sub_138B2 + call snd_se_play pop bp retn ; --------------------------------------------------------------------------- @@ -2674,8 +2658,7 @@ var_1 = byte ptr -1 mov byte_26704, al cmp word_26706, 18h jnz locret_1511B - push 6 - call sub_138B2 + call snd_se_play pascal, 6 cmp word ptr dword_266F4, 0C00h jge short loc_1505D mov byte_266ED, 36h ; '6' @@ -2719,8 +2702,7 @@ loc_150A6: mov byte_266ED, al mov al, byte_266ED mov [bp+var_1], al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov byte_266E2, 2 mov byte_266E3, 3Ah ; ':' call fp_2D004 @@ -2844,7 +2826,7 @@ loc_151A5: push 3 loc_151D3: - call sub_138B2 + call snd_se_play jmp short loc_151FF ; --------------------------------------------------------------------------- @@ -2887,8 +2869,7 @@ sub_15202 proc near mov byte_26704, al cmp word_26706, 18h jnz loc_152B2 - push 6 - call sub_138B2 + call snd_se_play pascal, 6 mov byte_266ED, 0E0h pop bp retn @@ -2919,8 +2900,7 @@ loc_15263: mov byte_266ED, al loc_1527C: - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov al, byte_266ED add al, 6 mov byte_266ED, al @@ -3130,8 +3110,7 @@ loc_15414: push word ptr dword_266F4+2 push 600030h call sub_13E8C - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 cmp word_26700, 0AF0h jnz short loc_15480 push word ptr dword_266F4 @@ -3800,8 +3779,7 @@ loc_159E5: loc_159F6: mov al, es:[di+1] mov ah, 0 - push ax - call sub_138B2 + call snd_se_play pascal, ax jmp loc_15AE4 ; --------------------------------------------------------------------------- @@ -4204,8 +4182,7 @@ loc_15CDE: mov word ptr [si+0Ch], 0D0h loc_15CE8: - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 pop si pop bp retn 2 @@ -4268,8 +4245,7 @@ loc_15D56: mov word ptr [si+0Ch], 0D0h loc_15D60: - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 pop si pop bp retn 2 @@ -4357,8 +4333,7 @@ loc_15DC9: jnz short loc_15DDB push si call sub_15DA5 - push 5 - call sub_138B2 + call snd_se_play pascal, 5 jmp short loc_15DE4 ; --------------------------------------------------------------------------- @@ -4406,8 +4381,7 @@ loc_15DFB: jl short loc_15E6B inc byte ptr [si] mov word ptr [si+0Ah], 0 - push 6 - call sub_138B2 + call snd_se_play pascal, 6 jmp short loc_15E6B ; --------------------------------------------------------------------------- @@ -4689,8 +4663,7 @@ loc_1607E: mov ax, word ptr dword_2670A+2 mov word ptr dword_266E4+2, ax call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_160A3: pop bp @@ -4750,8 +4723,7 @@ loc_160F4: mov byte_266EF, al mov byte_25664, 1 mov byte_25665, 0 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 mov byte_266E3, 4Ch ; 'L' pop bp retn @@ -4768,8 +4740,7 @@ loc_16150: loc_16164: mov byte_266ED, al call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 inc byte_25664 mov al, byte_25665 add al, 0F0h @@ -4794,8 +4765,7 @@ loc_16187: mov byte_266EF, 20h ; ' ' call fp_2D004 call sub_1CFB5 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 pop bp retn ; --------------------------------------------------------------------------- @@ -4886,8 +4856,7 @@ loc_1626B: call sub_13D52 mov byte_266ED, al call fp_2D002 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 locret_16290: leave @@ -4940,8 +4909,7 @@ loc_162EA: mov al, byte_266EF add al, 3 mov byte_266EF, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1630B: pop bp @@ -4995,8 +4963,7 @@ loc_16366: add al, 0FCh mov byte_266F0, al call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_16387: pop bp @@ -5037,8 +5004,7 @@ loc_163AD: loc_163B5: mov byte_266ED, 0 ; jumptable 000163A9 case 48 - push 8 - call sub_138B2 + call snd_se_play pascal, 8 mov byte_25666, 64h ; 'd' loc_163C6: @@ -5128,8 +5094,7 @@ loc_16476: mov al, byte_266ED add al, 2 mov byte_266ED, al - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_164BB: cmp word_2671A, 0C0h @@ -5239,8 +5204,7 @@ loc_1656A: mov al, byte_2D02D add al, 9 mov byte_2D02D, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1660E: pop bp @@ -5283,8 +5247,7 @@ loc_16651: jle loc_169B8 inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_25667, 0 mov byte_2CDCA, 0Fh mov fp_255AC, offset sub_12364 @@ -5617,8 +5580,7 @@ loc_16963: loc_16986: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov Palettes, 0 mov Palettes+1, 0 mov Palettes+2, 0 @@ -5725,8 +5687,7 @@ loc_16A71: cmp word_2671A, 10h jnz short loc_16A86 mov byte_26718, 82h - push 8 - call sub_138B2 + call snd_se_play pascal, 8 jmp short loc_16ADA ; --------------------------------------------------------------------------- @@ -5762,8 +5723,7 @@ loc_16AC3: cmp word_2671A, 40h jnz short loc_16ADA mov byte_26718, 82h - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 mov al, 2 pop bp retn @@ -6100,8 +6060,7 @@ loc_16CFC: jg short loc_16D53 mov word ptr [si+6], 4 mov byte ptr [si], 80h - push 3 - call sub_138B2 + call snd_se_play pascal, 3 add dword_2569A, 1400h push word ptr [si+2] push word ptr [si+4] @@ -6466,8 +6425,7 @@ loc_16FC6: call fp_2D000 loc_17026: - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1702D: cmp word_2671A, 0A0h @@ -6604,8 +6562,7 @@ loc_17136: mov al, byte_266EE add al, 4 mov byte_266EE, al - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_17145: cmp word_2671A, 0A0h @@ -6711,8 +6668,7 @@ loc_1720D: mov byte_266F0, 6 call fp_2D004 mov byte_266EE, 40h - push 9 - call sub_138B2 + call snd_se_play pascal, 9 call sub_16DD7 jmp loc_17331 ; --------------------------------------------------------------------------- @@ -6766,8 +6722,7 @@ loc_1726E: mov byte_266EC, 2Dh ; '-' mov byte_266ED, 80h mov byte_266F0, 8 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 loc_1729F: mov ax, word_2671A @@ -6827,8 +6782,7 @@ loc_17318: ; --------------------------------------------------------------------------- loc_1732A: - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 loc_17331: pop di @@ -6886,8 +6840,7 @@ loc_1736D: loc_173A2: call sub_16DD7 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_173AC: cmp word_2671A, 0A0h @@ -6977,8 +6930,7 @@ loc_1746A: loc_1746F: cmp si, 20h ; ' ' jl short loc_17409 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 jmp short loc_1748D ; --------------------------------------------------------------------------- @@ -7075,8 +7027,7 @@ loc_17515: call sub_1CFB5 loc_17560: - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp loc_17683 ; --------------------------------------------------------------------------- @@ -7194,8 +7145,7 @@ loc_17634: mov al, byte_266ED add al, 0F8h mov byte_266ED, al - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 loc_17675: cmp byte_266ED, 80h @@ -7254,8 +7204,7 @@ loc_176D9: cmp byte_266CD, 0 jnz locret_17811 call sub_16DD7 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 leave retn ; --------------------------------------------------------------------------- @@ -7343,8 +7292,7 @@ loc_177B8: mov al, byte_266ED add al, 8 mov byte_266ED, al - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 loc_177F9: cmp word_2671A, 0C0h @@ -7408,8 +7356,7 @@ loc_1784F: call fp_2D000 mov al, byte_2D02D add byte_266ED, al - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_17874: cmp word_2671A, 80h @@ -7490,8 +7437,7 @@ loc_178F6: call sub_16DD7 loc_17936: - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1793D: cmp word_2671A, 0A0h @@ -7534,8 +7480,7 @@ loc_1795F: mov byte_266EE, 10h call fp_2D004 call sub_1CFA2 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 jmp short loc_179B8 sub_1788E endp @@ -7630,8 +7575,7 @@ loc_17A31: mov Palettes+2, 7 mov byte_266D3, 1 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov fp_255AC, offset sub_122D7 mov byte_2CDCA, 0Fh mov byte_25670, 0 @@ -7870,8 +7814,7 @@ loc_17C54: loc_17C77: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov Palettes, 0 mov Palettes+2, 0 mov byte_266D3, 1 @@ -8210,8 +8153,7 @@ loc_17F3C: push word ptr [si+4] push word ptr [si+23h] call sub_1DA38 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 movzx eax, word ptr [si+14h] add dword_2569A, eax push word ptr [si+2] @@ -8229,8 +8171,7 @@ loc_17F8E: ; --------------------------------------------------------------------------- loc_17F94: - push 0Ah - call sub_138B2 + call snd_se_play pascal, 10 loc_17F9B: cmp byte ptr [si+29h], 0 @@ -8404,8 +8345,7 @@ sub_180BB proc near jge short loc_18106 cmp word_2671A, 18h jnz short loc_180F1 - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_180F1: cmp byte_266CC, 0 @@ -8513,8 +8453,7 @@ loc_1818D: jge short loc_181B7 cmp word_2671A, 20h ; ' ' jnz short loc_181A2 - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_181A2: cmp byte_266CC, 0 @@ -8657,8 +8596,7 @@ loc_18281: jge short loc_182AC cmp word_2671A, 30h ; '0' jnz short loc_18297 - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_18297: cmp byte_266CC, 0 @@ -8788,8 +8726,7 @@ loc_1836B: loc_1836D: add al, byte_266ED mov byte_266ED, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -8826,8 +8763,7 @@ var_2 = word ptr -2 ; --------------------------------------------------------------------------- loc_183A7: - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 mov byte_266E2, 2 mov byte_266E3, 3Bh ; ';' mov byte_266ED, 0 @@ -8876,8 +8812,7 @@ loc_1841E: call fp_2D000 cmp byte_266CD, 0 jnz short locret_1845C - push 3 - call sub_138B2 + call snd_se_play pascal, 3 leave retn ; --------------------------------------------------------------------------- @@ -8918,8 +8853,7 @@ loc_18473: call sub_13D52 mov byte_266ED, al call fp_2D000 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 pop bp retn ; --------------------------------------------------------------------------- @@ -8990,8 +8924,7 @@ loc_184D9: mov byte_266ED, 80h mov byte_2CFF8, 0C0h call fp_2D002 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 pop bp retn ; --------------------------------------------------------------------------- @@ -9059,8 +8992,7 @@ loc_18580: call sub_13D52 mov byte_266ED, al call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -9269,8 +9201,7 @@ loc_1876B: jle loc_189A1 inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_2CDCA, 0Fh mov fp_255AC, offset sub_12979 jmp loc_189A1 @@ -9489,8 +9420,7 @@ loc_1895A: loc_1897E: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov byte_266D3, 1 mov byte_259A2, 0FFh jmp short loc_189A1 @@ -9607,8 +9537,7 @@ loc_18A20: push [bp+arg_0] push 100h call sub_13117 - push 5 - call sub_138B2 + call snd_se_play pascal, 5 jmp short loc_18A73 ; --------------------------------------------------------------------------- @@ -9694,8 +9623,7 @@ loc_18AFA: cmp [bp+var_4], 3 jl short loc_18AEC inc byte ptr [si] - push 6 - call sub_138B2 + call snd_se_play pascal, 6 mov byte_25592, 9 push word ptr dword_266E4 push word ptr dword_266E4+2 @@ -9831,8 +9759,7 @@ loc_18BF7: push ax call sub_C696 mov byte_25592, 0Fh - push 8 - call sub_138B2 + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -9897,8 +9824,7 @@ loc_18C87: push ax call sub_C696 mov byte_25592, 0Fh - push 8 - call sub_138B2 + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -9971,8 +9897,7 @@ loc_18D16: push ax call sub_C696 mov byte_25592, 0Fh - push 8 - call sub_138B2 + call snd_se_play pascal, 8 leave retn ; --------------------------------------------------------------------------- @@ -10111,8 +10036,7 @@ loc_18E54: push ax call sub_C696 mov byte_25592, 0Fh - push 8 - call sub_138B2 + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -10190,8 +10114,7 @@ loc_18EF8: push ax call sub_C696 mov byte_25592, 0Fh - push 8 - call sub_138B2 + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -10277,8 +10200,7 @@ loc_18F9C: push ax call sub_C696 mov byte_25592, 0Fh - push 8 - call sub_138B2 + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -10393,8 +10315,7 @@ loc_1908E: mov byte_2D02B, 0 loc_190D7: - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 loc_190DE: mov byte_266E2, 4 @@ -10513,8 +10434,7 @@ loc_191FB: jl short loc_19235 inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_259F1, 0 mov fp_255AC, offset sub_121EB mov byte_2CDCA, 0 @@ -10524,8 +10444,7 @@ loc_191FB: loc_19226: cmp word_2671A, 80h jnz short loc_19235 - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_19235: call sub_1E67C @@ -10540,8 +10459,7 @@ loc_1923B: call sub_1E6F3 mov byte_2671D, 3 mov byte_2671E, 0C0h - push 6 - call sub_138B2 + call snd_se_play pascal, 6 jmp loc_195A9 ; --------------------------------------------------------------------------- @@ -10897,8 +10815,7 @@ loc_1955E: loc_19581: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov Palettes, 0 mov byte_266D3, 1 mov byte_259A2, 0FFh @@ -11086,8 +11003,7 @@ loc_196C2: call fp_2D000 mov al, byte_2671F add byte_2671E, al - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_19712: cmp word_2671A, 76h ; 'v' @@ -11144,8 +11060,7 @@ loc_19751: add al, 40h mov byte_266ED, al call fp_2D002 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov al, byte_266EE add al, 6 mov byte_266EE, al @@ -11185,8 +11100,7 @@ sub_197BB proc near mov byte_266ED, 0 call fp_2D004 call fp_2D000 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_19806: cmp word_2671A, 76h ; 'v' @@ -11227,8 +11141,7 @@ sub_19814 proc near call fp_2D000 add word ptr dword_266E4, 400h call fp_2D000 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1986A: cmp word_2671A, 76h ; 'v' @@ -11517,8 +11430,7 @@ loc_19AEF: mov al, byte_26718 add al, 2 mov byte_26718, al - push 8 - call sub_138B2 + call snd_se_play pascal, 8 mov ax, word ptr dword_2670A add ax, 80h mov word ptr dword_2A8C6, ax @@ -11549,8 +11461,7 @@ loc_19B56: jl loc_19C02 inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_2D02D, 0 mov byte_2D02C, 0FFh mov fp_255AC, offset sub_1217E @@ -11595,8 +11506,7 @@ loc_19BE9: loc_19BF6: cmp si, 3 jl short loc_19BE9 - push 6 - call sub_138B2 + call snd_se_play pascal, 6 loc_19C02: push 1000100h @@ -11861,8 +11771,7 @@ loc_19E3D: loc_19E60: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov Palettes, 0 mov Palettes+2, 0 mov byte_266D3, 1 @@ -12242,8 +12151,7 @@ sub_1A0D1 proc near mov [si+4], ax mov word ptr [si+10h], 8 mov word ptr [si+12h], 50h ; 'P' - push 8 - call sub_138B2 + call snd_se_play pascal, 8 pop si pop bp retn @@ -12347,16 +12255,14 @@ loc_1A1CF: mov [si+16h], ax or ax, ax jz short loc_1A1EE - push 4 - call sub_138B2 + call snd_se_play pascal, 4 loc_1A1EE: mov ax, [si+16h] sub [si+14h], ax cmp word ptr [si+14h], 0 jg short loc_1A22E - push 3 - call sub_138B2 + call snd_se_play pascal, 3 add dword_2569A, 0BB8h mov byte ptr [si], 10h mov word ptr [si+0Eh], 0 @@ -12522,8 +12428,7 @@ loc_1A32D: loc_1A39A: cmp di, 8 jl short loc_1A32D - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp short loc_1A3BC ; --------------------------------------------------------------------------- @@ -13431,8 +13336,7 @@ loc_1A926: jmp word ptr cs:[bx+8] ; switch jump loc_1A92A: - push 8 ; jumptable 0001A926 case 16 - call sub_138B2 + call snd_se_play pascal, 8 ; jumptable 0001A926 case 16 mov word_2A8CE, 1400h mov ax, word ptr dword_2670A+2 add ax, 0FFC0h @@ -13530,8 +13434,7 @@ loc_1A9E9: jmp word ptr cs:[bx+8] ; switch jump loc_1A9ED: - push 8 ; jumptable 0001A9E9 case 48 - call sub_138B2 + call snd_se_play pascal, 8 ; jumptable 0001A9E9 case 48 mov word_2A8CE, 1400h mov ax, word ptr dword_2670A+2 add ax, 200h @@ -13599,8 +13502,7 @@ loc_1AA64: jmp word ptr cs:[bx+8] ; switch jump loc_1AA68: - push 8 ; jumptable 0001AA64 case 32 - call sub_138B2 + call snd_se_play pascal, 8 ; jumptable 0001AA64 case 32 mov word_2A8CE, 1400h mov word_2A8D0, 8 mov byte_2A8D2, 9 @@ -13681,8 +13583,7 @@ loc_1AB04: jmp word ptr cs:[bx+8] ; switch jump loc_1AB08: - push 8 ; jumptable 0001AB04 case 16 - call sub_138B2 + call snd_se_play pascal, 8 ; jumptable 0001AB04 case 16 mov word_2A8CE, 1400h mov ax, word ptr dword_2670A+2 mov word ptr dword_2A8C6+2, ax @@ -13766,8 +13667,7 @@ loc_1AB86: call sub_1CFB5 mov byte_2CFF8, 40h call sub_1CFB5 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 mov al, byte_266EE add al, 10h mov byte_266EE, al @@ -13846,8 +13746,7 @@ loc_1ABFF: call fp_2D000 cmp byte_266CD, 0 jnz short loc_1AC96 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1AC96: mov ax, word_2671A @@ -13928,8 +13827,7 @@ loc_1ACD9: mov byte_266ED, al add word ptr dword_266E4, 2C0h call sub_1CFB5 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 jmp short loc_1AD6A ; --------------------------------------------------------------------------- @@ -14051,8 +13949,7 @@ loc_1AE40: mov byte_266F0, 0Ah call fp_2D004 call sub_1CFA2 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 mov byte_266E2, 1 mov byte_266EC, 1Ch mov byte_266EF, 4 @@ -14123,8 +14020,7 @@ loc_1AEB7: mov al, byte_266EE add al, 0Ch mov byte_266EE, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp short loc_1AF59 ; --------------------------------------------------------------------------- @@ -14243,10 +14139,7 @@ loc_1AFD0: mov ax, word_25A0C mov word ptr dword_266E4, ax call fp_2D000 - push 9 - -loc_1B05F: - call sub_138B2 + call snd_se_play pascal, 9 mov al, byte_2D02D add al, 6 mov byte_2D02D, al @@ -14309,8 +14202,7 @@ loc_1B0AF: loc_1B0D2: cmp byte_266CD, 0 jnz short loc_1B0E0 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1B0E0: cmp word_2671A, 70h ; 'p' @@ -14334,8 +14226,7 @@ loc_1B0F0: loc_1B110: cmp byte_266CD, 0 jnz short loc_1B125 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp short loc_1B125 ; --------------------------------------------------------------------------- @@ -14432,8 +14323,7 @@ sub_1B1B1 proc near mov byte_26718, al cmp byte_266CE, 0 jnz short loc_1B213 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov al, byte_266ED add al, 2 mov byte_266ED, al @@ -14495,8 +14385,7 @@ sub_1B22B proc near push ax push 20h ; ' ' call sub_1A087 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp short loc_1B26D ; --------------------------------------------------------------------------- @@ -14636,8 +14525,7 @@ loc_1B391: mov ax, word_25A0C mov word ptr dword_266E4, ax call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp short loc_1B3DD ; --------------------------------------------------------------------------- @@ -14683,8 +14571,7 @@ sub_1B3E2 proc near mov byte_25A1E, al or al, al jz short loc_1B417 - push 4 - call sub_138B2 + call snd_se_play pascal, 4 loc_1B417: mov al, byte_25A1E @@ -14772,8 +14659,7 @@ loc_1B4BA: jle loc_1B8EA inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_25A02, 0 mov fp_255AC, offset sub_128B9 mov byte_2CDCA, 0Fh @@ -15212,8 +15098,7 @@ loc_1B8A4: loc_1B8C7: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov byte_266D3, 1 mov byte_259A2, 0FFh jmp short loc_1B8EA @@ -15311,16 +15196,14 @@ loc_1B982: loc_1B99B: cmp word_25A34, 0 jnz short loc_1B9AC - push 8 - call sub_138B2 + call snd_se_play pascal, 8 jmp loc_1BBA4 ; --------------------------------------------------------------------------- loc_1B9AC: cmp word_25A34, 38h ; '8' jnz short loc_1B9CE - push 9 - call sub_138B2 + call snd_se_play pascal, 9 mov byte_25A27, 1 mov ax, word ptr dword_2670A mov word_25A28, ax @@ -15893,8 +15776,7 @@ loc_1BEA5: idiv bx or dx, dx jnz short loc_1BEB9 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1BEB9: cmp word_2671A, 48h ; 'H' @@ -16033,8 +15915,7 @@ loc_1BFD7: idiv bx or dx, dx jnz short loc_1BFEB - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1BFEB: cmp word_2671A, 50h ; 'P' @@ -16113,8 +15994,7 @@ loc_1C07C: neg al add al, 0FDh mov byte_266ED, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1C0AB: cmp byte_25A26, 0 @@ -16161,8 +16041,7 @@ loc_1C0EB: idiv bx or dx, dx jnz short loc_1C0FF - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1C0FF: cmp word_2671A, 50h ; 'P' @@ -16244,8 +16123,7 @@ loc_1C19C: or dx, dx jnz short loc_1C1BB call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1C1BB: cmp byte_25A26, 0 @@ -16303,8 +16181,7 @@ loc_1C21B: mov byte_266ED, al add word ptr dword_266E4+2, 400h call fp_2D000 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 ; START OF FUNCTION CHUNK FOR sub_1C1CF loc_1C245: @@ -16349,8 +16226,7 @@ loc_1C26C: mov byte_266ED, 0 call fp_2D004 call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1C2AD: cmp word_26716, 0C8h @@ -16467,8 +16343,7 @@ loc_1C39E: jb loc_1C67A inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov word_26714, 8 mov fp_255AC, offset sub_1226F mov byte_2CDCA, 0 @@ -16761,8 +16636,7 @@ loc_1C62F: loc_1C652: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov byte_259A2, 0FFh mov byte_25A26, 0 mov byte_25A27, 0 @@ -19761,8 +19635,7 @@ loc_1DD47: les bx, dword_2CDC6 inc byte ptr es:[bx+0Bh] call sub_EEE8 - push 7 - call sub_138B2 + call snd_se_play pascal, 7 mov byte_259DB, 1 mov fp_259DE, offset sub_112D8 jmp short loc_1DD90 ; jumptable 0001CCD9 case 696 @@ -20016,8 +19889,7 @@ loc_1DF10: ja short loc_1DF47 push si call sub_1DBAE - push 0Bh - call sub_138B2 + call snd_se_play pascal, 11 mov byte ptr [si], 2 jmp short loc_1DF4A ; --------------------------------------------------------------------------- @@ -20515,8 +20387,7 @@ arg_4 = word ptr 8 mov si, ax or si, si jz short loc_1E60C - push [bp+arg_0] - call sub_138B2 + call snd_se_play pascal, [bp+arg_0] loc_1E60C: mov byte_22E9C, 0 @@ -20552,8 +20423,7 @@ arg_4 = word ptr 8 mov si, ax or si, si jz short loc_1E647 - push [bp+arg_0] - call sub_138B2 + call snd_se_play pascal, [bp+arg_0] loc_1E647: mov ax, si @@ -21075,8 +20945,7 @@ loc_1EA6F: mov byte_2A8D2, 9 call sub_13B21 mov byte_26718, 81h - push 8 - call sub_138B2 + call snd_se_play pascal, 8 mov byte_25592, 0Fh jmp short loc_1EAF9 ; default ; --------------------------------------------------------------------------- @@ -21124,8 +20993,7 @@ loc_1EAE2: loc_1EAE9: mov byte_26718, 81h - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov al, 2 leave retn @@ -21476,8 +21344,7 @@ loc_1ED71: mov al, byte_2671E mov byte_266ED, al call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 cmp word_2671A, 40h jl short loc_1EDA3 mov al, byte_2D03A @@ -21557,8 +21424,7 @@ sub_1EE21 proc near mov ah, 0 push ax call sub_1EB8C - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_1EE57: cmp word_2671A, 60h @@ -21624,8 +21490,7 @@ loc_1EED3: mov byte_266EF, 10h call fp_2D004 call sub_1CFB5 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1EEF5: mov ax, word_2671A @@ -21669,8 +21534,7 @@ loc_1EF5D: mov byte_266ED, al cmp si, 0Ch jl short loc_1EF53 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1EF6C: cmp word_2671A, 120h @@ -21744,8 +21608,7 @@ var_1 = byte ptr -1 mov byte_266ED, 0 mov byte_266E3, 3Dh ; '=' call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1F034: cmp word_2671A, 0C0h @@ -21823,10 +21686,10 @@ loc_1F0B0: mov byte_2CFF7, 1 call fp_2D004 call fp_2D002 - push 0Fh + push 15 loc_1F0F8: - call sub_138B2 + call snd_se_play leave retn ; --------------------------------------------------------------------------- @@ -21858,8 +21721,7 @@ sub_1F111 proc near mov word_2D03F+1, ax mov ax, word ptr dword_2670A+2 mov word_2D042, ax - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_1F13D: cmp word_2671A, 20h ; ' ' @@ -21954,8 +21816,7 @@ loc_1F218: mov byte_266ED, al cmp si, 8 jl short loc_1F20E - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1F227: pop si @@ -22032,8 +21893,7 @@ loc_1F263: add al, 80h mov byte_266ED, al call fp_2D002 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_1F2D9: cmp word_2671A, 0E0h @@ -22095,8 +21955,7 @@ loc_1F345: loc_1F351: cmp si, 5 jl short loc_1F345 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 loc_1F35D: cmp word_2671A, 80h @@ -22179,8 +22038,7 @@ loc_1F3E2: mov Palettes+2, 0E0h mov byte_266D3, 1 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov fp_255AC, offset sub_122D7 mov byte_2CDCA, 0Fh jmp loc_1F8A5 @@ -22688,8 +22546,7 @@ loc_1F855: loc_1F878: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov Palettes, 0 mov Palettes+2, 0 mov byte_266D3, 1 @@ -22970,8 +22827,7 @@ loc_1FA59: jge short loc_1FA85 cmp word_2671A, 20h ; ' ' jnz short loc_1FA6E - push 8 - call sub_138B2 + call snd_se_play pascal, 8 loc_1FA6E: cmp byte_266CC, 0 @@ -23040,8 +22896,7 @@ loc_1FABE: call sub_13D52 mov byte_266ED, al call fp_2D000 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 pop bp retn ; --------------------------------------------------------------------------- @@ -23110,8 +22965,7 @@ loc_1FB36: mov al, byte_2D02D add al, 7 mov byte_2D02D, al - push 9 - call sub_138B2 + call snd_se_play pascal, 9 pop bp retn ; --------------------------------------------------------------------------- @@ -23182,8 +23036,7 @@ loc_1FBAD: mov byte_266EE, al mov byte_266ED, 0A0h call fp_2D002 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 cmp byte_266CF, 1 jnz short loc_1FC44 mov byte_266E3, 4Ch ; 'L' @@ -23265,8 +23118,7 @@ loc_1FC93: mov byte_266ED, 0 mov byte_2CFF8, 40h call fp_2D002 - push 9 - call sub_138B2 + call snd_se_play pascal, 9 loc_1FCE0: cmp byte_266CD, 0 @@ -23346,8 +23198,7 @@ loc_1FD83: loc_1FD8F: cmp si, 4 jl short loc_1FD83 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 mov al, byte_266EF add al, 2 mov byte_266EF, al @@ -23372,8 +23223,7 @@ loc_1FDCD: jnz short loc_1FDF1 mov byte_266E2, 4 call fp_2D000 - push 0Fh - call sub_138B2 + call snd_se_play pascal, 15 jmp short loc_1FDF1 ; --------------------------------------------------------------------------- @@ -23435,8 +23285,7 @@ loc_1FE45: jnz short loc_1FE68 call fp_2D000 inc byte_266EF - push 9 - call sub_138B2 + call snd_se_play pascal, 9 pop bp retn ; --------------------------------------------------------------------------- @@ -23493,8 +23342,7 @@ loc_1FEA3: mov al, 78h ; 'x' sub al, byte_266ED mov byte_266ED, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -23577,8 +23425,7 @@ loc_1FF44: mov byte_266EE, 7Fh call fp_2D004 call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 mov ax, word ptr dword_2598E+2 sub ax, word ptr dword_266E4+2 push ax @@ -23643,8 +23490,7 @@ loc_2001E: loc_2002B: cmp di, 10h jl short loc_2001E - push 3 - call sub_138B2 + call snd_se_play pascal, 3 jmp short loc_20044 ; --------------------------------------------------------------------------- @@ -23698,8 +23544,7 @@ sub_20050 proc near add al, 10h mov byte_266EE, al call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_200B4: pop bp @@ -23778,8 +23623,7 @@ loc_2017D: mov al, byte_2D02C add al, 0Bh mov byte_2D02C, al - push 3 - call sub_138B2 + call snd_se_play pascal, 3 pop bp retn ; --------------------------------------------------------------------------- @@ -23833,8 +23677,7 @@ loc_201B4: mov byte_266ED, al mov byte_266EE, 64h ; 'd' call fp_2D000 - push 3 - call sub_138B2 + call snd_se_play pascal, 3 loc_20200: pop bp @@ -23941,8 +23784,7 @@ loc_202B0: mov word_26720, 396Ch inc byte_26719 mov word_2671A, 0 - push 0Dh - call sub_138B2 + call snd_se_play pascal, 13 mov byte_2CDCA, 0Fh mov fp_255AC, offset sub_12979 jmp loc_206B6 @@ -24371,8 +24213,7 @@ loc_2066F: loc_20693: mov byte_26718, 4 mov word_2671A, 0 - push 0Ch - call sub_138B2 + call snd_se_play pascal, 12 mov byte_266D3, 1 mov byte_259A2, 0FFh jmp short loc_206B6 diff --git a/th04_maine.asm b/th04_maine.asm index 83340197..fe925944 100644 --- a/th04_maine.asm +++ b/th04_maine.asm @@ -1888,10 +1888,9 @@ loc_AD95: lea ax, [bp+var_2] push ax call sub_A64D - call sub_D594 - push [bp+var_2] - call sub_D5A0 - call sub_D5DA + call snd_se_reset + call snd_se_play pascal, [bp+var_2] + call snd_se_update jmp short loc_ADB5 ; default ; --------------------------------------------------------------------------- @@ -6262,91 +6261,7 @@ locret_D592: retf sub_D492 endp -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_D594 proc far - mov byte_EB31, 0 - mov byte_EB30, 0FFh - retf -sub_D594 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_D5A0 proc far - mov bx, sp - mov dx, ss:[bx+4] - cmp snd_se_mode, SND_SE_OFF - jz short locret_D5D6 - cmp byte_EB30, 0FFh - jnz short loc_D5BB - mov byte_EB30, dl - retf 2 -; --------------------------------------------------------------------------- - -loc_D5BB: - mov bl, byte_EB30 - xor bh, bh - mov al, [bx+55Eh] - mov bx, dx - cmp al, [bx+55Eh] - ja short locret_D5D6 - mov byte_EB30, dl - mov byte_EB31, 0 - -locret_D5D6: - retf 2 -sub_D5A0 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_D5DA proc far - cmp snd_se_mode, SND_SE_OFF - jz short locret_D625 - cmp byte_EB30, 0FFh - jz short locret_D625 - cmp byte_EB31, 0 - jnz short loc_D607 - mov al, byte_EB30 - cmp snd_se_mode, SND_SE_BEEP - jz short loc_D5FF - mov ah, PMD_SE_PLAY - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - jmp short loc_D607 -; --------------------------------------------------------------------------- - -loc_D5FF: - xor ah, ah - push ax - call bgm_sound - -loc_D607: - inc byte_EB31 - mov bl, byte_EB30 - xor bh, bh - mov al, [bx+56Fh] - cmp al, byte_EB31 - jnb short locret_D625 - mov byte_EB31, 0 - mov byte_EB30, 0FFh - -locret_D625: - retf -sub_D5DA endp - +include th04/hardware/snd_se.asm ; =============== S U B R O U T I N E ======================================= @@ -6789,39 +6704,7 @@ include libs/master.lib/superpa[data].asm include th02/formats/pfopen[data].asm include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm - dw 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 12h - db 20h - db 20h - db 20h - db 20h - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 30h ; 0 - db 50h ; P - db 11h - db 4 - db 0Bh - db 50h ; P - db 50h ; P - db 50h ; P - db 20h - db 0 +include th04/hardware/snd_se_priority[data].asm db 0FFh db 0FFh db 7Fh @@ -6919,8 +6802,7 @@ include th04/hardware/snd_load[data].asm db 55h ; U word_EB2C dw 2 word_EB2E dw 10h -byte_EB30 db 0FFh -byte_EB31 db 0 +include th03/hardware/snd_se_state[data].asm word_EB32 dw 0 word_EB34 dw 0 word_EB36 dw 0 diff --git a/th04_op.asm b/th04_op.asm index 26d6d886..eb66b719 100644 --- a/th04_op.asm +++ b/th04_op.asm @@ -1092,10 +1092,9 @@ loc_AE76: push ax push 8 call fp_10DAA - call sub_E2E6 - push 1 - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 1 + call snd_se_update pop bp retn 4 sub_AE28 endp @@ -1173,10 +1172,9 @@ loc_AF1C: jz loc_B02B loc_AF2C: - call sub_E2E6 - push 0Bh - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update mov al, byte_F3DB cbw mov bx, ax @@ -1376,10 +1374,9 @@ loc_B0F4: ; --------------------------------------------------------------------------- loc_B14F: - call sub_E2E6 - push 0Bh - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update mov byte_F447, 0 mov byte_F3DB, 4 mov byte_10DA8, 0 @@ -2615,8 +2612,7 @@ loc_BB29: jnb short loc_BB83 cmp byte ptr [si+1], 10h jnz short loc_BB3C - push 0Fh - call sub_E2F2 + call snd_se_play pascal, 15 loc_BB3C: mov ax, [si+8] @@ -3011,7 +3007,7 @@ loc_BE66: call far ptr palette_show loc_BE81: - call sub_E32C + call snd_se_update inc di loc_BE87: @@ -5950,10 +5946,9 @@ loc_D7BB: jz short loc_D84C loc_D7D6: - call sub_E2E6 - push 1 - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 1 + call snd_se_update mov al, 1 sub al, byte_132B8 mov byte_132B8, al @@ -5999,10 +5994,9 @@ loc_D84C: jz short loc_D8B2 loc_D85A: - call sub_E2E6 - push 0Bh - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update mov al, byte_132B8 mov ah, 0 add ax, ax @@ -6110,10 +6104,9 @@ loc_D939: mov dx, 0A4h ; '¤' mov al, 0 out dx, al - call sub_E2E6 - push 1 - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 1 + call snd_se_update loc_D986: test byte ptr word_11A50+1, 20h @@ -6122,10 +6115,9 @@ loc_D986: jz short loc_D9D5 loc_D994: - call sub_E2E6 - push 0Bh - call sub_E2F2 - call sub_E32C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update les bx, dword_10DA4 mov al, byte_132B9 mov es:[bx+19h], al @@ -7047,91 +7039,7 @@ locret_E2E4: retf sub_E1E4 endp -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_E2E6 proc far - mov byte_FD81, 0 - mov byte_FD80, 0FFh - retf -sub_E2E6 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_E2F2 proc far - mov bx, sp - mov dx, ss:[bx+4] - cmp snd_se_mode, SND_SE_OFF - jz short locret_E328 - cmp byte_FD80, 0FFh - jnz short loc_E30D - mov byte_FD80, dl - retf 2 -; --------------------------------------------------------------------------- - -loc_E30D: - mov bl, byte_FD80 - xor bh, bh - mov al, [bx+9BEh] - mov bx, dx - cmp al, [bx+9BEh] - ja short locret_E328 - mov byte_FD80, dl - mov byte_FD81, 0 - -locret_E328: - retf 2 -sub_E2F2 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_E32C proc far - cmp snd_se_mode, SND_SE_OFF - jz short locret_E377 - cmp byte_FD80, 0FFh - jz short locret_E377 - cmp byte_FD81, 0 - jnz short loc_E359 - mov al, byte_FD80 - cmp snd_se_mode, SND_SE_BEEP - jz short loc_E351 - mov ah, PMD_SE_PLAY - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - jmp short loc_E359 -; --------------------------------------------------------------------------- - -loc_E351: - xor ah, ah - push ax - call bgm_sound - -loc_E359: - inc byte_FD81 - mov bl, byte_FD80 - xor bh, bh - mov al, [bx+9CFh] - cmp al, byte_FD81 - jnb short locret_E377 - mov byte_FD81, 0 - mov byte_FD80, 0FFh - -locret_E377: - retf -sub_E32C endp - +include th04/hardware/snd_se.asm ; =============== S U B R O U T I N E ======================================= @@ -7792,40 +7700,7 @@ include libs/master.lib/draw_trapezoid[data].asm include th02/formats/pfopen[data].asm include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm - db 0 - db 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 12h - db 20h - db 20h - db 20h - db 20h - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 30h ; 0 - db 50h ; P - db 11h - db 4 - db 0Bh - db 50h ; P - db 50h ; P - db 50h ; P - db 20h - db 0 +include th04/hardware/snd_se_priority[data].asm include th04/hardware/snd[data].asm db 0 include th04/hardware/snd_load[data].asm @@ -7891,8 +7766,7 @@ include th04/hardware/snd_load[data].asm db 55h ; U word_FD7C dw 2 word_FD7E dw 10h -byte_FD80 db 0FFh -byte_FD81 db 0 +include th03/hardware/snd_se_state[data].asm word_FD82 dw 0 word_FD84 dw 0 word_FD86 dw 0 diff --git a/th05_main.asm b/th05_main.asm index 2a5bca0f..44c6d2e2 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -672,7 +672,7 @@ loc_B003: out dx, al mov byte_25353, al xor byte_25352, 1 - call sub_14D28 + call snd_se_update inc dword_25FDC mov ax, word_25FE0 mov dx, ax @@ -3415,8 +3415,7 @@ loc_C4BC: mov byte_2C979, al mov ax, fp_23F5A mov fp_23F58, ax - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov byte_2264E, 1 les bx, dword_23EF0 assume es:nothing @@ -3719,8 +3718,7 @@ loc_C777: ja short loc_C78C cmp byte_25FE3, 0 jnz short loc_C78C - push 9 - call sub_14CEE + call snd_se_play pascal, 9 loc_C78C: pop bp @@ -3773,8 +3771,7 @@ loc_C7D0: loc_C7D8: cmp byte_2429B, 80h jnz short loc_C7F9 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 cmp byte_25FEA, 5 jz short loc_C7F2 mov byte_2CE00, 1 @@ -3877,8 +3874,7 @@ loc_C87C: mov ax, word ptr dword_2CEA0+2 mov [si+2], ax mov word ptr [si+6], 18h - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 mov PaletteTone, 0AAh ; 'ª' jmp short loc_C8D4 ; --------------------------------------------------------------------------- @@ -4031,8 +4027,7 @@ loc_C9FD: loc_CA05: cmp byte_2429B, 50h ; 'P' jnz short loc_CA26 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 cmp byte_25FEA, 5 jz short loc_CA1F mov byte_2CE00, 1 @@ -4265,8 +4260,7 @@ loc_CC20: loc_CC28: cmp byte_2429B, 40h jnz short loc_CC49 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 cmp byte_25FEA, 5 jz short loc_CC42 mov byte_2CE00, 1 @@ -4405,8 +4399,7 @@ loc_CD59: idiv bx or dx, dx jnz short loc_CD77 - push 9 - call sub_14CEE + call snd_se_play pascal, 9 mov PaletteTone, 96h jmp short loc_CD8D ; --------------------------------------------------------------------------- @@ -4475,8 +4468,7 @@ loc_CDD6: loc_CDDE: cmp byte_2429B, 0A0h jnz short loc_CDFF - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 cmp byte_25FEA, 5 jz short loc_CDF8 mov byte_2CE00, 1 @@ -11099,8 +11091,7 @@ loc_FC67: cmp ax, [si+10h] jl loc_FD13 inc byte ptr [si] - push 6 - call sub_14CEE + call snd_se_play pascal, 6 jmp loc_FD13 ; --------------------------------------------------------------------------- @@ -15614,8 +15605,7 @@ loc_12064: mov al, [bp+var_1] sub byte_2CEBE, al nopcall sub_E4FC - push 2 - call sub_14CEE + call snd_se_play pascal, 2 cmp byte_25FEC, 26h ; '&' jbe short loc_12083 mov byte_25FEC, 26h ; '&' @@ -16743,8 +16733,7 @@ loc_1293E: mov [bp+var_1], 5 loc_12942: - push 1 - call sub_14CEE + call snd_se_play pascal, 1 jmp short loc_12955 ; --------------------------------------------------------------------------- @@ -21133,11 +21122,10 @@ seg001 ends ; =========================================================================== ; Segment type: Pure code -seg002 segment byte public 'CODE' use16 +seg002 segment word public 'CODE' use16 assume cs:seg002 ;org 3 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing - db 0 ; =============== S U B R O U T I N E ======================================= @@ -21327,91 +21315,7 @@ loc_14CDA: retf 6 sub_14C7C endp ; sp-analysis failed -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_14CE2 proc far - mov byte_21215, 0 - mov byte_21214, 0FFh - retf -sub_14CE2 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_14CEE proc far - mov bx, sp - mov dx, ss:[bx+4] - cmp snd_se_mode, SND_SE_OFF - jz short locret_14D24 - cmp byte_21214, 0FFh - jnz short loc_14D09 - mov byte_21214, dl - retf 2 -; --------------------------------------------------------------------------- - -loc_14D09: - mov bl, byte_21214 - xor bh, bh - mov al, [bx+812h] - mov bx, dx - cmp al, [bx+812h] - ja short locret_14D24 - mov byte_21214, dl - mov byte_21215, 0 - -locret_14D24: - retf 2 -sub_14CEE endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_14D28 proc far - cmp snd_se_mode, SND_SE_OFF - jz short locret_14D73 - cmp byte_21214, 0FFh - jz short locret_14D73 - cmp byte_21215, 0 - jnz short loc_14D55 - mov al, byte_21214 - cmp snd_se_mode, SND_SE_BEEP - jz short loc_14D4D - mov ah, PMD_SE_PLAY - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - jmp short loc_14D55 -; --------------------------------------------------------------------------- - -loc_14D4D: - xor ah, ah - push ax - call bgm_sound - -loc_14D55: - inc byte_21215 - mov bl, byte_21214 - xor bh, bh - mov al, [bx+823h] - cmp al, byte_21215 - jnb short locret_14D73 - mov byte_21215, 0 - mov byte_21214, 0FFh - -locret_14D73: - retf -sub_14D28 endp - +include th04/hardware/snd_se.asm ; =============== S U B R O U T I N E ======================================= @@ -22147,41 +22051,8 @@ include libs/master.lib/super_entry_bfnt[data].asm include libs/master.lib/superpa[data].asm include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm - dw 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 12h - db 20h - db 20h - db 20h - db 20h - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 30h ; 0 - db 50h ; P - db 11h - db 4 - db 0Bh - db 50h ; P - db 50h ; P - db 50h ; P - db 20h - db 0 -byte_21214 db 0FFh -byte_21215 db 0 +include th04/hardware/snd_se_priority[data].asm +include th03/hardware/snd_se_state[data].asm word_21216 dw 4E20h include th05/hardware/snd_load[data].asm include th04/hardware/snd[data].asm diff --git a/th05_main_seg3+4.inc b/th05_main_seg3+4.inc index 9c616cc1..c91651cc 100644 --- a/th05_main_seg3+4.inc +++ b/th05_main_seg3+4.inc @@ -620,8 +620,7 @@ loc_15668: loc_15677: mov al, ah mov ah, 0 - push ax - call sub_14CEE + call snd_se_play pascal, ax loc_15681: mov al, 2 @@ -2282,8 +2281,7 @@ loc_16161: call sub_16D84 loc_1618C: - push 3 - call sub_14CEE + call snd_se_play pascal, 3 movzx eax, word ptr [si+10h] add dword_2CE1A, eax push word ptr [si+2] @@ -2301,8 +2299,7 @@ loc_161B9: ; --------------------------------------------------------------------------- loc_161BF: - push 0Ah - call sub_14CEE + call snd_se_play pascal, 10 loc_161C6: cmp byte ptr [si+23h], 0 @@ -2490,8 +2487,7 @@ loc_1632E: mov word ptr [si+0Ch], 0D0h loc_16338: - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 pop si pop bp retn 2 @@ -2551,8 +2547,7 @@ sub_1637A proc near mov word ptr [si+0Ah], 0C0h mov word ptr [si+0Ch], 0C0h mov byte ptr [si+0Fh], 0 - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 pop si pop bp retn @@ -3984,8 +3979,7 @@ loc_16F3B: call sub_10407 mov byte_2CE87, 1 mov fp_2CE8A, offset sub_11DEA - push 7 - call sub_14CEE + call snd_se_play pascal, 7 loc_16F52: pop bp @@ -4196,8 +4190,7 @@ loc_1712C: call sub_E720 inc byte_25350 call sub_10407 - push 7 - call sub_14CEE + call snd_se_play pascal, 7 mov byte_2CE87, 1 mov fp_2CE8A, offset sub_11DEA jmp short loc_17171 @@ -4409,8 +4402,7 @@ loc_172AE: ja short loc_172E5 push si call sub_16F54 - push 0Bh - call sub_14CEE + call snd_se_play pascal, 11 mov byte ptr [si], 2 jmp short loc_172E8 ; --------------------------------------------------------------------------- @@ -4747,8 +4739,7 @@ loc_174E1: mov ah, 0 push ax call sub_14E6C - push 5 - call sub_14CEE + call snd_se_play pascal, 5 jmp short loc_17544 ; --------------------------------------------------------------------------- @@ -4802,8 +4793,7 @@ arg_0 = word ptr 4 mov byte ptr [si+0Bh], 1 mov al, byte_26312 mov [si+0Ah], al - push 5 - call sub_14CEE + call snd_se_play pascal, 5 loc_1759F: pop si @@ -4844,8 +4834,7 @@ arg_0 = word ptr 4 mov [si+14h], al mov al, byte_26312 mov [si+0Ah], al - push 5 - call sub_14CEE + call snd_se_play pascal, 5 loc_175F9: pop si @@ -4873,8 +4862,7 @@ arg_0 = word ptr 4 mov bx, si imul bx, 18h mov byte ptr [bx+5628h], 3 - push 6 - call sub_14CEE + call snd_se_play pascal, 6 loc_17622: pop si @@ -6319,8 +6307,7 @@ loc_1818B: push word ptr dword_26320+2 push 800030h call sub_1597C - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 jmp short loc_181C4 ; --------------------------------------------------------------------------- @@ -6368,8 +6355,7 @@ sub_181E5 proc near call sub_16A6B cmp word_26346, 1 jnz short loc_18239 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_2D085, 80h mov byte_2D084, 0 mov byte_2D083, 8 @@ -6475,8 +6461,7 @@ sub_182B1 proc near mov byte ptr word_26006+1, 10h call fp_25344 call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_182EB: pop bp @@ -6511,8 +6496,7 @@ sub_182ED proc near mov al, byte_2D083 add al, 0F8h mov byte_2D083, al - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_18339: pop bp @@ -6536,8 +6520,7 @@ sub_1833B proc near call sub_16A6B cmp word_26346, 10h jnz loc_183F3 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_26344, 0BCh mov byte_2D085, 38h ; '8' mov byte_2D084, 48h ; 'H' @@ -6653,8 +6636,7 @@ sub_183F5 proc near mov byte ptr word_26006+1, al call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1847B: pop bp @@ -6684,8 +6666,7 @@ sub_1847D proc near mov byte ptr dword_26002, 0Ch call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_184BA: pop bp @@ -6730,8 +6711,7 @@ sub_184BC proc near loc_18506: call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 mov al, byte_2D085 add al, 6 mov byte_2D085, al @@ -6782,8 +6762,7 @@ sub_18526 proc near loc_18570: call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 mov al, byte_2D084 add al, 0FAh mov byte_2D084, al @@ -6973,8 +6952,7 @@ loc_1874E: mov word_2A72C, 8 inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 loc_1877A: mov fp_23F5A, offset sub_D08C @@ -7359,8 +7337,7 @@ loc_18ADC: push word ptr dword_26320+2 push 400020h call sub_1597C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 push word ptr dword_26320 push word ptr dword_26320+2 push 0C000400h @@ -7404,8 +7381,7 @@ loc_18B67: push word ptr dword_26320+2 push 800030h call sub_1597C - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 jmp short loc_18BA0 ; --------------------------------------------------------------------------- @@ -7518,8 +7494,7 @@ arg_0 = word ptr 4 call sub_16A6B cmp word_26346, 10h jnz short loc_18C8E - push 8 - call sub_14CEE + call snd_se_play pascal, 8 jmp short loc_18C8E ; --------------------------------------------------------------------------- @@ -7596,8 +7571,7 @@ loc_18CE8: loc_18CED: call fp_25344 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 cmp byte_2D080, 24h ; '$' jnb short loc_18D07 mov al, byte_2D080 @@ -7702,8 +7676,7 @@ loc_18DBC: loc_18DC1: mov byte ptr word_26006, al - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 pop bp retn ; --------------------------------------------------------------------------- @@ -7952,8 +7925,7 @@ loc_18FBB: loc_18FC0: call fp_25344 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 call sub_15A70 pop bp retn @@ -8003,8 +7975,7 @@ loc_19029: loc_1902E: call sub_15A70 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_19038: pop bp @@ -8051,8 +8022,7 @@ loc_19097: jl loc_19263 inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_D0F4 jmp loc_19263 ; --------------------------------------------------------------------------- @@ -8329,8 +8299,7 @@ sub_192F3 proc near call sub_16A6B cmp word_26332, 1 jnz short loc_19319 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_26330, 0D2h pop bp retn @@ -8374,8 +8343,7 @@ loc_19336: loc_1935F: call fp_25344 call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 mov ax, word ptr dword_26320+2 mov word ptr dword_26324+2, ax sub word ptr dword_26320+2, 40h @@ -8453,8 +8421,7 @@ loc_19412: loc_19420: call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 mov ax, word ptr dword_26320+2 mov word ptr dword_26324+2, ax sub word ptr dword_26320+2, 40h @@ -8510,8 +8477,7 @@ loc_1946C: loc_19496: call fp_25344 call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 mov ax, word ptr dword_26320+2 mov word ptr dword_26324+2, ax sub word ptr dword_26320+2, 40h @@ -8655,8 +8621,7 @@ loc_195DA: push word ptr dword_26320+2 push 800030h call sub_1597C - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 jmp short loc_19613 ; --------------------------------------------------------------------------- @@ -8919,8 +8884,7 @@ loc_197FF: mov [si+16h], ax cmp word ptr [si+16h], 0 jz short loc_19823 - push 4 - call sub_14CEE + call snd_se_play pascal, 4 loc_19823: mov ax, [si+16h] @@ -8930,8 +8894,7 @@ loc_19823: inc byte ptr [si] mov word ptr [si+12h], 4 mov word ptr [si+16h], 0 - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 add dword_2CE1A, 64h ; 'd' jmp short loc_198A5 ; --------------------------------------------------------------------------- @@ -9364,10 +9327,10 @@ loc_19B8A: cmp si, 20h ; ' ' jl short loc_19B4D mov byte_26344, 0B6h - push 0Fh + push 15 loc_19B96: - call sub_14CEE + call snd_se_play loc_19B9B: pop si @@ -9431,7 +9394,7 @@ loc_19BE2: push 0Fh loc_19C19: - call sub_14CEE + call snd_se_play pop bp retn ; --------------------------------------------------------------------------- @@ -9481,10 +9444,10 @@ loc_19C5E: call fp_25344 call sub_15A5C mov byte_26344, 0B4h - push 0Fh + push 15 loc_19C95: - call sub_14CEE + call snd_se_play pop bp retn ; --------------------------------------------------------------------------- @@ -9551,8 +9514,7 @@ loc_19D22: jnb short loc_19D56 cmp word_2CE2E, 40h jnz short loc_19D37 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 loc_19D37: mov byte_2D07F, 3 @@ -9584,8 +9546,7 @@ loc_19D56: mov [bp+var_2], ax cmp [bp+var_2], 0 jz short loc_19D9D - push 9 - call sub_14CEE + call snd_se_play pascal, 9 loc_19D9D: mov ax, word ptr dword_2CEA0 @@ -9624,8 +9585,7 @@ loc_19DBD: mov byte ptr word_26006+1, 20h ; ' ' call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 locret_19E10: leave @@ -9650,8 +9610,7 @@ sub_19E12 proc near mov byte_26344, 0B8h cmp word_26346, 28h ; '(' jnz loc_19ED8 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -9725,8 +9684,7 @@ sub_19EDA proc near mov byte_2D085, 8 cmp word_26346, 28h ; '(' jnz short loc_19F73 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -9755,8 +9713,7 @@ loc_19F0E: add al, 5 mov byte_2D085, al mov byte_26344, 0B4h - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_19F61: cmp word_26346, 60h @@ -9788,8 +9745,7 @@ sub_19F75 proc near mov byte_2D085, 0 cmp word_26346, 28h ; '(' jnz short loc_1A003 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -9814,8 +9770,7 @@ loc_19FA9: add al, 2 mov byte_2D085, al mov byte_26344, 0B4h - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_19FF1: cmp word_26346, 60h @@ -9850,8 +9805,7 @@ sub_1A005 proc near mov word ptr dword_26002, 0A0Dh call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A042: pop bp @@ -9903,8 +9857,7 @@ loc_1A0AD: jl loc_1A3B2 inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_D180 jmp loc_1A3B2 ; --------------------------------------------------------------------------- @@ -10201,8 +10154,7 @@ arg_4 = word ptr 8 mov si, ax or si, si jz short loc_1A41F - push [bp+arg_0] - call sub_14CEE + call snd_se_play pascal, [bp+arg_0] loc_1A41F: mov byte_2297E, 0 @@ -10424,8 +10376,7 @@ sub_1A556 proc near mov byte_26344, 0B7h cmp word_26346, 20h ; ' ' jnz short loc_1A5B1 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -10516,8 +10467,7 @@ sub_1A5EB proc near mov byte ptr word_26006+1, al call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A641: cmp word_26346, 80h @@ -10557,8 +10507,7 @@ sub_1A651 proc near mov byte ptr word_26006+1, 3Ch ; '<' call fp_25344 call sub_15A9C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A69C: cmp word_26346, 60h @@ -10609,8 +10558,7 @@ loc_1A6BA: mov byte ptr word_26006+1, 32h ; '2' call fp_25344 call sub_15A8E - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A709: cmp word_26346, 0A0h @@ -10653,8 +10601,7 @@ sub_1A719 proc near mov byte ptr word_26006+1, 40h call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A765: cmp word_26346, 80h @@ -10818,8 +10765,7 @@ loc_1A843: mov byte_2D082, al loc_1A8B2: - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A8B9: cmp word_26346, 100h @@ -10972,8 +10918,7 @@ sub_1A9B3 proc near mov byte ptr word_26006+1, 40h call fp_25344 call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1A9FF: mov al, 0 @@ -11147,8 +11092,7 @@ loc_1AB57: call sub_15A24 mov byte ptr word_2BC71, al call sub_17687 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1AB72: mov al, 0 @@ -11193,8 +11137,7 @@ loc_1ABAE: call sub_15A24 mov byte ptr word_2BC71, al call sub_17687 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1ABC9: cmp word_26346, 80h @@ -11286,8 +11229,7 @@ loc_1AC5E: jl loc_1AFA7 ; default inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_D20C jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- @@ -11338,8 +11280,7 @@ loc_1ACF1: mov byte_2C979, 14h loc_1AD0D: - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 push 1 call sub_162CC push 2 @@ -11507,8 +11448,7 @@ loc_1AE98: mov al, byte ptr word_2634A+1 mov byte_2C978, al mov word_26346, 0 - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 mov byte_2CEBC, 0FFh jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- @@ -11639,8 +11579,7 @@ sub_1AFD4 proc near or si, si jnz short loc_1B004 mov byte_2D085, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov ax, word ptr dword_26320 mov word_2CE3A, ax @@ -11743,8 +11682,7 @@ sub_1B0A4 proc near push si cmp word_26332, 10h jnz short loc_1B0CE - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte ptr word_25FFA, 2 mov byte_26000, 0Dh mov byte ptr dword_26002, 7 @@ -11798,8 +11736,7 @@ loc_1B0FE: loc_1B12D: cmp si, 4 jl short loc_1B0F2 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1B139: cmp word_26332, 60h @@ -11824,8 +11761,7 @@ sub_1B153 proc near mov bp, sp cmp word_26332, 10h jnz short loc_1B17C - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_26000, 4 mov byte ptr dword_26002, 10h call fp_25344 @@ -11863,8 +11799,7 @@ loc_1B1BA: mov al, byte ptr word_26006 add al, 4 mov byte ptr word_26006, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1B1CC: cmp word_26332, 60h @@ -11888,8 +11823,7 @@ sub_1B1E5 proc near mov bp, sp cmp word_26332, 10h jnz short loc_1B221 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte ptr word_25FFA, 12h mov byte_26000, 9 mov byte ptr word_26006, 20h ; ' ' @@ -11917,8 +11851,7 @@ loc_1B221: mov al, byte ptr word_26006 add al, 0F8h mov byte ptr word_26006, al - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1B256: cmp word_26332, 60h @@ -12046,8 +11979,7 @@ loc_1B368: push word ptr dword_26320+2 push 800030h call sub_1597C - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 jmp short loc_1B3A1 ; --------------------------------------------------------------------------- @@ -12227,7 +12159,7 @@ loc_1B4B1: jz loc_1B548 cmp word ptr [si+12h], 0D4h jz short loc_1B4D2 - push 0Ah + push 10 jmp short loc_1B52E ; --------------------------------------------------------------------------- @@ -12235,8 +12167,7 @@ loc_1B4D2: mov word ptr [si+16h], 1 mov ax, [bp+var_2] sub [si+14h], ax - push 4 - call sub_14CEE + call snd_se_play pascal, 4 cmp word ptr [si+14h], 0 jge short loc_1B548 inc byte ptr [si] @@ -12264,7 +12195,7 @@ loc_1B52C: push 3 loc_1B52E: - call sub_14CEE + call snd_se_play jmp short loc_1B548 ; --------------------------------------------------------------------------- @@ -12344,8 +12275,7 @@ loc_1B599: mov byte_2D085, al loc_1B5DB: - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1B5E2: cmp word_26346, 0A0h @@ -12422,8 +12352,7 @@ loc_1B64D: mov al, byte ptr word_26006 add al, 6 mov byte ptr word_26006, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1B68E: cmp word_26346, 100h @@ -12488,8 +12417,7 @@ loc_1B6ED: add al, 20h ; ' ' mov byte ptr word_26006+1, al call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1B71B: cmp word_26346, 0A0h @@ -12580,8 +12508,7 @@ loc_1B799: add al, 0Ch mov byte ptr word_2BC71, al call sub_1B3DD - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1B7F9: cmp word_26346, 0A0h @@ -12635,8 +12562,7 @@ sub_1B832 proc near loc_1B858: cmp word_26346, 20h ; ' ' jnz short loc_1B866 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1B866: mov ax, word_26346 @@ -12718,8 +12644,7 @@ loc_1B8FC: call sub_15A5C mov al, byte_2D084 add byte_2D085, al - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1B927: cmp word_26346, 40h @@ -12867,8 +12792,7 @@ loc_1BA63: jl loc_1BD09 inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_D20C jmp loc_1BD09 ; --------------------------------------------------------------------------- @@ -13194,8 +13118,7 @@ loc_1BD79: loc_1BD8D: cmp si, 8 jl short loc_1BD79 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1BD99: cmp word_26346, 0A0h @@ -13284,8 +13207,7 @@ loc_1BE4E: mov al, byte_2D085 add al, 9 mov byte_2D085, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1BE60: cmp word_26346, 0C0h @@ -13517,8 +13439,7 @@ loc_1C043: loc_1C057: cmp si, 8 jl short loc_1C043 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 mov byte_26000, 0Ch mov byte ptr word_25FFA+1, 0 mov byte ptr dword_26002, 3 @@ -13616,8 +13537,7 @@ loc_1C121: neg al add al, 8 mov byte_2C977, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1C15E: cmp word_26346, 0C0h @@ -13687,8 +13607,7 @@ loc_1C1C1: call sub_1B3DD mov al, byte_2D081 add byte_2D080, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 jmp short loc_1C239 ; --------------------------------------------------------------------------- @@ -13799,8 +13718,7 @@ loc_1C2AB: mov byte_2D083, 0F8h loc_1C316: - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1C31D: mov byte ptr word_25FFA, 10h @@ -14087,8 +14005,7 @@ loc_1C58E: jl loc_1C805 inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_D20C jmp loc_1C805 ; --------------------------------------------------------------------------- @@ -14473,8 +14390,7 @@ loc_1C8CC: call sub_159E6 mov ah, 0 mov [si+12h], ax - push 3 - call sub_14CEE + call snd_se_play pascal, 3 jmp short loc_1C920 ; --------------------------------------------------------------------------- @@ -14736,8 +14652,7 @@ sub_1CAD7 proc near mov byte ptr word_26006+1, 3Ch ; '<' mov byte ptr dword_26002, 10h call fp_25344 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -14762,8 +14677,7 @@ loc_1CB23: push ax call sub_14E6C call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1CB5D: cmp word_26346, 50h ; 'P' @@ -14802,8 +14716,7 @@ var_1 = byte ptr -1 mov byte_26000, 0 mov byte ptr word_26006+1, 60h call fp_25344 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov word_2BC7E, 20h ; ' ' mov byte_2BC88, 4Ch ; 'L' mov byte_2D083, 0 @@ -14848,8 +14761,7 @@ loc_1CC1F: mov al, byte_2D084 mov byte ptr word_26006, al call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1CC3E: mov al, byte_2D076 @@ -14930,8 +14842,7 @@ sub_1CCD3 proc near mov byte_26001, 0Ah mov byte ptr word_26006+1, 38h ; '8' mov word ptr dword_26002, 205h - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_2D085, 60h mov byte_2D084, 40h pop bp @@ -15007,8 +14918,7 @@ loc_1CD26: mov al, byte_2D084 add al, 0FAh mov byte_2D084, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1CDF8: cmp word_26346, 100h @@ -15046,8 +14956,7 @@ sub_1CE0D proc near mov byte ptr word_26006, 0 mov byte ptr word_25FFA+1, 44h ; 'D' call fp_25344 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_2D085, 80h pop bp retn @@ -15084,8 +14993,7 @@ loc_1CE63: mov al, byte_2D085 add al, 8 mov byte_2D085, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1CEC4: cmp word_26346, 0C0h @@ -15125,8 +15033,7 @@ var_1 = byte ptr -1 mov byte_26000, 0 mov byte ptr word_26006+1, 60h call fp_25344 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov word_26316, 18h mov word_26314, 64h ; 'd' mov byte_26313, 6 @@ -15176,8 +15083,7 @@ loc_1CFA4: mov al, byte_2D084 mov byte ptr word_26006, al call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1CFC3: mov al, byte_2D077 @@ -15284,8 +15190,7 @@ sub_1D085 proc near call sub_E758 mov byte ptr dword_26002+1, al mov byte ptr word_26006+1, 80h - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov word_2BC7E, 20h ; ' ' mov byte_2BC88, 40h push 200h @@ -15354,8 +15259,7 @@ loc_1D17C: cmp byte ptr word_26006+1, 60h jbe short loc_1D1B9 mov byte ptr word_26006+1, 8 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 inc byte_2D083 cmp byte_2D083, 5 ja loc_1D110 @@ -15401,8 +15305,7 @@ sub_1D1C6 proc near mov byte_26001, 2 mov byte ptr word_26006+1, 26h ; '&' call fp_25344 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_2D085, 0 mov byte_2C976, 2 mov byte_2D084, 0 @@ -15435,8 +15338,7 @@ loc_1D257: call sub_15A9C inc byte_2D084 inc byte_2D085 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1D269: pop bp @@ -15503,8 +15405,7 @@ loc_1D2EF: call sub_126B3 or ax, ax jz short loc_1D320 - push 0Ah - call sub_14CEE + call snd_se_play pascal, 10 loc_1D320: cmp word_26346, 40h @@ -15521,8 +15422,7 @@ loc_1D32D: mov byte_26344, 0B4h inc byte_26345 mov word_26346, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_D29E jmp loc_1D513 ; --------------------------------------------------------------------------- @@ -15937,8 +15837,7 @@ loc_1D6A2: loc_1D6A4: mov byte_2D085, al call fp_25344 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1D6B2: mov ax, word_26346 @@ -16017,8 +15916,7 @@ loc_1D719: add al, 8 mov byte ptr word_26006, al call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1D766: cmp word_26346, 60h @@ -16059,8 +15957,7 @@ sub_1D776 proc near mov byte ptr word_26006+1, 3Ch ; '<' mov byte ptr dword_26002, 10h call fp_25344 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- @@ -16093,8 +15990,7 @@ sub_1D7DC proc near mov byte_26000, 0Dh mov byte ptr dword_26002, 3 call fp_25344 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1D805: mov ax, word_26346 @@ -16148,8 +16044,7 @@ loc_1D877: or dx, dx jnz short loc_1D88E call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1D88E: mov ax, word_26346 @@ -16189,8 +16084,7 @@ sub_1D89A proc near mov byte_26312, 30h ; '0' push 5 call sub_175A4 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte_26344, 0B5h mov byte_2D085, 0 mov byte_2D084, 64h ; 'd' @@ -16278,8 +16172,7 @@ loc_1D9BC: loc_1D9C1: cmp si, 6 jl short loc_1D9BC - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 mov word_2CE06, 8 jmp short loc_1DA13 ; --------------------------------------------------------------------------- @@ -16358,8 +16251,7 @@ sub_1DA1C proc near mov byte_2BC88, al mov word_2BC82, 0C8h call sub_1D53A - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1DA6A: mov ax, word_26346 @@ -16450,8 +16342,7 @@ loc_1DB10: shl al, 6 mov byte ptr word_2BC71, al call sub_17687 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1DB78: pop si @@ -16479,8 +16370,7 @@ loc_1DB8C: jge short loc_1DBB8 cmp word_26346, 80h jnz short loc_1DBA3 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 loc_1DBA3: test byte ptr word_26346, 1 @@ -16529,8 +16419,7 @@ loc_1DC06: cmp si, 10h jl short loc_1DBCA mov byte_26344, 0C0h - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 mov word_2CE06, 8 loc_1DC1D: @@ -16627,8 +16516,7 @@ loc_1DCE1: mov byte ptr word_26006, al add word ptr dword_25FFC, 1000h call sub_15A70 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1DCFD: pop si @@ -16830,8 +16718,7 @@ loc_1DEEA: call sub_1D53A loc_1DF41: - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1DF48: cmp word_22852, 0 @@ -16970,8 +16857,7 @@ loc_1E047: mov al, byte ptr word_2BC71 add al, 88h mov byte ptr word_2BC71, al - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1E0A6: cmp word_26346, 100h @@ -17134,8 +17020,7 @@ loc_1E220: jl loc_1E527 mov word_26346, 0 inc byte_26345 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov fp_23F5A, offset sub_DA86 jmp loc_1E527 ; --------------------------------------------------------------------------- @@ -17404,8 +17289,7 @@ loc_1E4CB: mov word_2D088, 180h mov Palettes, 60h mov Palettes+2, 0 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 jmp short loc_1E527 ; --------------------------------------------------------------------------- @@ -17483,8 +17367,7 @@ loc_1E570: jge short loc_1E5C6 or si, si jnz short loc_1E580 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 loc_1E580: mov ax, 2 @@ -17539,8 +17422,7 @@ loc_1E5C6: jge short loc_1E5EA cmp si, 1Eh jnz short loc_1E5D7 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1E5D7: mov eax, dword_26320 @@ -17696,8 +17578,7 @@ sub_1E6A6 proc near mov byte ptr word_26006, 0 mov byte_2C977, 38h ; '8' call sub_15A70 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1E6FE: cmp word_26332, 80h @@ -17771,8 +17652,7 @@ loc_1E776: mov byte_2C979, 14h loc_1E7A4: - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 inc byte_2D082 loc_1E7AF: @@ -17828,8 +17708,7 @@ loc_1E82B: push word ptr dword_26320+2 push 800030h call sub_1597C - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 jmp short loc_1E864 ; --------------------------------------------------------------------------- @@ -17948,8 +17827,7 @@ sub_1E8DA proc near cmp word_26346, 30h ; '0' jnz short loc_1E900 mov byte_26344, 0B5h - push 8 - call sub_14CEE + call snd_se_play pascal, 8 loc_1E900: cmp word_26346, 40h @@ -17998,8 +17876,7 @@ sub_1E922 proc near idiv bx or dx, dx jnz short loc_1E967 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1E967: cmp word_26346, 80h @@ -18073,8 +17950,7 @@ loc_1E9E4: call sub_15A70 loc_1E9F2: - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1E9F9: mov ax, word_26346 @@ -18213,8 +18089,7 @@ loc_1EB2C: loc_1EB2E: push ax call sub_1E87C - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 loc_1EB39: cmp word_26346, 100h @@ -18266,8 +18141,7 @@ sub_1EB52 proc near idiv bx or dx, dx jnz short loc_1EBF0 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 mov byte ptr word_25FFA, 12h push 600h call sub_157FA @@ -18341,8 +18215,7 @@ loc_1EC3E: mov word ptr dword_26002, 816h mov byte ptr word_25FFA+1, 34h ; '4' call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1EC5B: cmp word_26346, 80h @@ -18399,8 +18272,7 @@ loc_1ECB9: add al, 2 mov byte ptr word_26006, al call sub_15A70 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1ECD0: mov al, 0 @@ -18546,8 +18418,7 @@ sub_1EDC1 proc near mov word ptr dword_25FFC, ax mov byte ptr word_26006, 0 call sub_15A70 - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1EE14: mov ax, word_26346 @@ -18696,8 +18567,7 @@ loc_1EF5F: call sub_15A24 mov byte ptr word_2BC71, al call sub_17687 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1EF6F: cmp word_26346, 100h @@ -18751,8 +18621,7 @@ loc_1EFBF: call sub_15A24 mov byte ptr word_2BC71, al call sub_17687 - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1EFCF: mov ax, word_26346 @@ -18800,8 +18669,7 @@ sub_1EFED proc near mov byte_2D085, 0 mov byte_2D084, 0 mov byte_2D083, 0 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 loc_1F045: cmp word_26346, 80h @@ -18875,8 +18743,7 @@ loc_1F0D0: sub al, byte ptr word_26006 mov byte ptr word_26006, al call sub_15A8E - push 3 - call sub_14CEE + call snd_se_play pascal, 3 mov al, byte_2D085 sub byte ptr word_26006, al mov ax, word_26346 @@ -18929,8 +18796,7 @@ sub_1F13B proc near cmp word_26346, 40h jnz short loc_1F182 mov byte_26344, 0B5h - push 8 - call sub_14CEE + call snd_se_play pascal, 8 mov byte ptr word_25FFA+1, 74h ; 't' mov byte_26000, 2 call sub_157D6 @@ -18965,8 +18831,7 @@ loc_1F182: mov al, byte ptr word_26006 add al, 87h mov byte ptr word_26006, al - push 9 - call sub_14CEE + call snd_se_play pascal, 9 loc_1F1D4: push 0C00h @@ -19127,8 +18992,7 @@ loc_1F333: jl loc_1F666 mov word_26346, 0 inc byte_26345 - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 mov Palettes, 0 mov Palettes+1, 0 mov Palettes+2, 0 @@ -19542,8 +19406,7 @@ sub_1F6F1 proc near call sub_16A6B cmp word_26332, 10h jnz short loc_1F719 - push 8 - call sub_14CEE + call snd_se_play pascal, 8 loc_1F719: cmp word_26332, 14h @@ -19610,8 +19473,7 @@ sub_1F776 proc near mov byte_26000, 2 mov word ptr dword_26002, 70Dh call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1F7AA: cmp word_26332, 60h @@ -19660,8 +19522,7 @@ sub_1F7BA proc near call sub_157D6 mov byte ptr word_26006, al call sub_15A5C - push 3 - call sub_14CEE + call snd_se_play pascal, 3 loc_1F813: cmp word_26332, 60h @@ -19699,8 +19560,7 @@ sub_1F823 proc near mov byte ptr dword_26002+3, 4 mov byte ptr dword_26002, 20h ; ' ' call sub_15A5C - push 0Fh - call sub_14CEE + call snd_se_play pascal, 15 loc_1F86B: cmp word_26332, 40h @@ -19818,8 +19678,7 @@ loc_1F968: push word ptr dword_26320+2 push 800030h call sub_1597C - push 0Ch - call sub_14CEE + call snd_se_play pascal, 12 jmp short loc_1F9A1 ; --------------------------------------------------------------------------- @@ -20002,8 +19861,7 @@ arg_4 = word ptr 8 mov si, ax or si, si jz short loc_1FA8E - push [bp+arg_0] - call sub_14CEE + call snd_se_play pascal, [bp+arg_0] loc_1FA8E: mov byte_2297E, 0 @@ -20041,8 +19899,7 @@ arg_4 = word ptr 8 mov si, ax or si, si jz short loc_1FAD1 - push [bp+arg_0] - call sub_14CEE + call snd_se_play pascal, [bp+arg_0] loc_1FAD1: mov byte_2297E, 0 @@ -20216,8 +20073,7 @@ arg_0 = word ptr 4 mov byte_26348, 0 push 0 call sub_162CC - push 0Dh - call sub_14CEE + call snd_se_play pascal, 13 loc_1FBE1: cmp word_26346, 10h diff --git a/th05_maine.asm b/th05_maine.asm index 57db233a..45a03c41 100644 --- a/th05_maine.asm +++ b/th05_maine.asm @@ -1604,10 +1604,9 @@ loc_AF18: lea ax, [bp+var_2] push ax call sub_A738 - call sub_EAD4 - push [bp+var_2] - call sub_EAE0 - call sub_EB1A + call snd_se_reset + call snd_se_play pascal, [bp+var_2] + call snd_se_update jmp short loc_AF8F ; default ; --------------------------------------------------------------------------- @@ -3447,7 +3446,7 @@ sub_BCED endp sub_BD1E proc near push bp mov bp, sp - call sub_EB1A + call snd_se_update call sub_BE76 push 1 call frame_delay @@ -4002,8 +4001,7 @@ var_1 = byte ptr -1 push si push di mov [bp+var_1], 0 - push 0Bh - call sub_EAE0 + call snd_se_play pascal, 11 mov si, 4F7Ah xor di, di jmp short loc_C1AF @@ -4318,8 +4316,7 @@ loc_C429: push di push TX_GREEN + TX_REVERSE call sub_BCED - push 1 - call sub_EAE0 + call snd_se_play pascal, 1 loc_C438: test byte ptr word_12AFA, 20h @@ -4372,22 +4369,19 @@ loc_C4A1: mov byte ptr [bx+4F7Ah], 5 loc_C4BB: - push 4 - call sub_EAE0 + call snd_se_play pascal, 4 jmp short loc_C516 ; --------------------------------------------------------------------------- loc_C4C4: - push 0Bh - call sub_EAE0 + call snd_se_play pascal, 11 cmp word_11622, 7 jge short loc_C516 jmp short loc_C512 ; --------------------------------------------------------------------------- loc_C4D4: - push 0Bh - call sub_EAE0 + call snd_se_play pascal, 11 push si push di mov al, byte_15176 @@ -4448,8 +4442,7 @@ loc_C555: mov byte ptr [bx+4F7Ah], 5 loc_C56F: - push 4 - call sub_EAE0 + call snd_se_play pascal, 4 loc_C576: test byte ptr word_12AFA+1, 10h @@ -8795,88 +8788,7 @@ sub_EA6E endp ; sp-analysis failed ; --------------------------------------------------------------------------- nop -; =============== S U B R O U T I N E ======================================= - - -sub_EAD4 proc far - mov byte_107C1, 0 - mov byte_107C0, 0FFh - retf -sub_EAD4 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_EAE0 proc far - mov bx, sp - mov dx, ss:[bx+4] - cmp snd_se_mode, SND_SE_OFF - jz short locret_EB16 - cmp byte_107C0, 0FFh - jnz short loc_EAFB - mov byte_107C0, dl - retf 2 -; --------------------------------------------------------------------------- - -loc_EAFB: - mov bl, byte_107C0 - xor bh, bh - mov al, [bx+65Eh] - mov bx, dx - cmp al, [bx+65Eh] - ja short locret_EB16 - mov byte_107C0, dl - mov byte_107C1, 0 - -locret_EB16: - retf 2 -sub_EAE0 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_EB1A proc far - cmp snd_se_mode, SND_SE_OFF - jz short locret_EB65 - cmp byte_107C0, 0FFh - jz short locret_EB65 - cmp byte_107C1, 0 - jnz short loc_EB47 - mov al, byte_107C0 - cmp snd_se_mode, SND_SE_BEEP - jz short loc_EB3F - mov ah, PMD_SE_PLAY - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - jmp short loc_EB47 -; --------------------------------------------------------------------------- - -loc_EB3F: - xor ah, ah - push ax - call bgm_sound - -loc_EB47: - inc byte_107C1 - mov bl, byte_107C0 - xor bh, bh - mov al, [bx+66Fh] - cmp al, byte_107C1 - jnb short locret_EB65 - mov byte_107C1, 0 - mov byte_107C0, 0FFh - -locret_EB65: - retf -sub_EB1A endp - +include th04/hardware/snd_se.asm ; =============== S U B R O U T I N E ======================================= @@ -9991,39 +9903,7 @@ include libs/master.lib/super_entry_bfnt[data].asm include libs/master.lib/superpa[data].asm include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm - dw 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 12h - db 20h - db 20h - db 20h - db 20h - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 30h ; 0 - db 50h ; P - db 11h - db 4 - db 0Bh - db 50h ; P - db 50h ; P - db 50h ; P - db 20h - db 0 +include th04/hardware/snd_se_priority[data].asm word_10780 dw 71h dw 6Bh dw 78h @@ -10076,8 +9956,7 @@ word_1078C dw 19h db 55h ; U word_107BC dw 2 word_107BE dw 10h -byte_107C0 db 0FFh -byte_107C1 db 0 +include th03/hardware/snd_se_state[data].asm word_107C2 dw 0 word_107C4 dw 0 word_107C6 dw 0 diff --git a/th05_op.asm b/th05_op.asm index e6d7cca9..b460313a 100644 --- a/th05_op.asm +++ b/th05_op.asm @@ -996,10 +996,9 @@ loc_A9B6: push ax push 0Eh call fp_11DD2 - call sub_D5F6 - push 1 - call sub_D602 - call sub_D63C + call snd_se_reset + call snd_se_play pascal, 1 + call snd_se_update pop bp retn 4 sub_A968 endp @@ -1077,10 +1076,9 @@ loc_AA5C: jz loc_ABA8 loc_AA6C: - call sub_D5F6 - push 0Bh - call sub_D602 - call sub_D63C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update mov al, byte_F071 cbw mov bx, ax @@ -1293,10 +1291,9 @@ loc_AC71: ; --------------------------------------------------------------------------- loc_ACD8: - call sub_D5F6 - push 0Bh - call sub_D602 - call sub_D63C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update mov byte_F0DD, 0 mov byte_F071, 4 mov byte_11DD0, 0 @@ -2559,8 +2556,7 @@ loc_B6FA: jnb short loc_B754 cmp byte ptr [si+1], 10h jnz short loc_B70D - push 0Fh - call sub_D602 + call snd_se_play pascal, 15 loc_B70D: mov ax, [si+8] @@ -2953,7 +2949,7 @@ loc_BA26: call far ptr palette_show loc_BA41: - call sub_D63C + call snd_se_update inc di loc_BA47: @@ -5714,10 +5710,9 @@ loc_D1B5: jz short loc_D223 loc_D1D0: - call sub_D5F6 - push 1 - call sub_D602 - call sub_D63C + call snd_se_reset + call snd_se_play pascal, 1 + call snd_se_update mov dx, 0A6h ; '¦' mov al, 1 out dx, al @@ -5748,10 +5743,9 @@ loc_D223: jz short loc_D284 loc_D231: - call sub_D5F6 - push 1 - call sub_D602 - call sub_D63C + call snd_se_reset + call snd_se_play pascal, 1 + call snd_se_update mov dx, 0A6h ; '¦' mov al, 1 out dx, al @@ -5787,10 +5781,9 @@ loc_D292: mov bx, ax cmp byte ptr [bx+5143h], 0 jz short loc_D2CC - call sub_D5F6 - push 0Bh - call sub_D602 - call sub_D63C + call snd_se_reset + call snd_se_play pascal, 11 + call snd_se_update les bx, dword_11DCC mov al, byte ptr word_14118 mov es:[bx+14h], al @@ -6187,91 +6180,7 @@ loc_D5EE: retf 6 sub_D590 endp ; sp-analysis failed -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_D5F6 proc far - mov byte_F9C3, 0 - mov byte_F9C2, 0FFh - retf -sub_D5F6 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_D602 proc far - mov bx, sp - mov dx, ss:[bx+4] - cmp snd_se_mode, SND_SE_OFF - jz short locret_D638 - cmp byte_F9C2, 0FFh - jnz short loc_D61D - mov byte_F9C2, dl - retf 2 -; --------------------------------------------------------------------------- - -loc_D61D: - mov bl, byte_F9C2 - xor bh, bh - mov al, [bx+980h] - mov bx, dx - cmp al, [bx+980h] - ja short locret_D638 - mov byte_F9C2, dl - mov byte_F9C3, 0 - -locret_D638: - retf 2 -sub_D602 endp - -; --------------------------------------------------------------------------- - nop - -; =============== S U B R O U T I N E ======================================= - - -sub_D63C proc far - cmp snd_se_mode, SND_SE_OFF - jz short locret_D687 - cmp byte_F9C2, 0FFh - jz short locret_D687 - cmp byte_F9C3, 0 - jnz short loc_D669 - mov al, byte_F9C2 - cmp snd_se_mode, SND_SE_BEEP - jz short loc_D661 - mov ah, PMD_SE_PLAY - int 60h ; - Banyan VINES, 3com - GET STATION ADDRESS - ; Return: AL = status, 00h successful, ES:SI -> 6-byte station address - ; 02h semaphore service is unavailable - jmp short loc_D669 -; --------------------------------------------------------------------------- - -loc_D661: - xor ah, ah - push ax - call bgm_sound - -loc_D669: - inc byte_F9C3 - mov bl, byte_F9C2 - xor bh, bh - mov al, [bx+991h] - cmp al, byte_F9C3 - jnb short locret_D687 - mov byte_F9C3, 0 - mov byte_F9C2, 0FFh - -locret_D687: - retf -sub_D63C endp - +include th04/hardware/snd_se.asm ; =============== S U B R O U T I N E ======================================= @@ -8022,40 +7931,7 @@ include libs/master.lib/respal_exist[data].asm include libs/master.lib/draw_trapezoid[data].asm include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm - db 0 - db 0 - db 20h - db 10h - db 2 - db 12h - db 12h - db 40h - db 10h - db 11h - db 2 - db 12h - db 20h - db 20h - db 20h - db 20h - db 0 - db 0 - db 0 - db 24h ; $ - db 10h - db 4 - db 10h - db 8 - db 30h ; 0 - db 50h ; P - db 11h - db 4 - db 0Bh - db 50h ; P - db 50h ; P - db 50h ; P - db 20h - db 0 +include th04/hardware/snd_se_priority[data].asm db 71h ; q db 0 db 6Bh ; k @@ -8118,8 +7994,7 @@ include libs/master.lib/bgm[data].asm db 55h ; U word_F9BE dw 2 word_F9C0 dw 10h -byte_F9C2 db 0FFh -byte_F9C3 db 0 +include th03/hardware/snd_se_state[data].asm word_F9C4 dw 0 word_F9C6 dw 0 word_F9C8 dw 0