From 7bb29aee6241fa7b164b44807f4977bd445292da Mon Sep 17 00:00:00 2001 From: nmlgc Date: Thu, 28 Aug 2014 08:38:11 +0200 Subject: [PATCH] [Reduction] #254: super_roll_put_1plane Misreferences in switch tables! Haven't had any of those in a while. --- libs/master.lib/super_roll_put_1plane.asm | 310 ++++++++++++++++++++ th02_main.asm | 312 +------------------- th04_main.asm | 301 +------------------ th05_main.asm | 334 ++-------------------- 4 files changed, 351 insertions(+), 906 deletions(-) create mode 100644 libs/master.lib/super_roll_put_1plane.asm diff --git a/libs/master.lib/super_roll_put_1plane.asm b/libs/master.lib/super_roll_put_1plane.asm new file mode 100644 index 00000000..9a9766c7 --- /dev/null +++ b/libs/master.lib/super_roll_put_1plane.asm @@ -0,0 +1,310 @@ +; superimpose & master library module +; +; Description: +; パターンの表示(画面上下接続, 特定プレーン) +; +; Functions/Procedures: +; void super_roll_put_1plane( int x, int y, int num, int pat_plane, unsigned put_plnae ) ; +; +; Parameters: +; +; +; Returns: +; none +; +; Binding Target: +; Microsoft-C / Turbo-C / Turbo Pascal +; +; Running Target: +; PC-9801V +; +; Requiring Resources: +; CPU: V30 +; +; Notes: +; +; +; Compiler/Assembler: +; TASM 3.0 +; OPTASM 1.6 +; +; Author: +; Kazumi(奥田 仁) +; 恋塚(恋塚昭彦) +; +; Revision History: +; +;$Id: superl1p.asm 0.02 92/05/29 20:29:24 Kazumi Rel $ +; +; 93/ 3/20 Initial: master.lib <- super.lib 0.22b +; 93/ 9/20 [M0.21] WORD_MASK廃止 +; + +func SUPER_ROLL_PUT_1PLANE ; super_roll_put_1plane() { + push BP + mov BP,SP + push DS + push SI + push DI + + @@x = (RETSIZE+5)*2 + @@y = (RETSIZE+4)*2 + @@num = (RETSIZE+3)*2 + @@pat_plane = (RETSIZE+2)*2 + @@put_plane = (RETSIZE+1)*2 + + mov CX,[BP+@@x] + mov DI,[BP+@@y] + mov AX,[BP+@@put_plane] + out 7ch,AL ;RMW mode + mov AL,AH + out 7eh,AL + out 7eh,AL + out 7eh,AL + out 7eh,AL + + mov AX,DI ;-+ + shl DI,2 ; | + add DI,AX ; |DI=y*80 + shl DI,4 ;-+ + mov BX,CX + and CX,7h ;CL=x%8(shift dot counter) + shr BX,3 ;BX=x/8 + add DI,BX ;GVRAM offset address + mov BX,[BP+@@num] + shl BX,1 ;integer size & near pointer + mov DX,super_patsize[BX] ;pattern size (1-8) + push BX + mov BX,CX + mov CX,[BP+@@pat_plane] + mov BP,AX + mov AL,DH + mul DL + xor SI,SI + jcxz short @@plane_end +@@plane_search: + add SI,AX + loop short @@plane_search +@@plane_end: + mov AL,BYTE_MASK[BX] + mov CH,DH ;DL -> DH + shr CH,1 + mov CL,BL + pop BX + mov DS,super_patdata[BX] + mov BX,0a800h + mov ES,BX + mov BX,DX + xor BH,BH + add BP,BX + sub BP,400 + jg short @@noroll + xor BP,BP +@@noroll: + sub BX,BP + + test DI,1 + jz short @@even_address + jmp @@odd_address +@@even_address: + xor DL,DL + test DH,1 ;DX -> DH + jnz short @@odd_size1 + mov BYTE PTR CS:[superl1p_word_mask1],AL + mov BYTE PTR CS:[superl1p_count1],CH + mov AL,80 + sub AL,DH ;DL -> DH + mov BYTE PTR CS:[superl1p_add_di1],AL + EVEN +@@put_loop1: + lodsw + ror AX,CL + mov DH,AL + and AL,11h ;dummy +superl1p_word_mask1 equ $-1 + xor DH,AL + or AL,DL + stosw ;mov ES:[DI],AX ;;;or + mov DL,DH + dec CH + jnz short @@put_loop1 + mov ES:[DI],DL + mov DL,CH ;DL=0 + add DI,80 ;dummy +superl1p_add_di1 equ $-1 + mov CH,11h ;dummy +superl1p_count1 equ $-1 + dec BX + jnz short @@put_loop1 + or BP,BP + jnz short @@roll1 + jmp @@return + EVEN +@@roll1: + sub DI,7d00h + mov BX,BP + xor BP,BP + jmp short @@put_loop1 + EVEN +@@odd_size1: + mov BYTE PTR CS:[superl1p_word_mask2],AL + mov BYTE PTR CS:[superl1p_count2],CH + mov AL,80 + sub AL,DH + mov BYTE PTR CS:[superl1p_add_di2],AL + EVEN +@@single_check2: + or CH,CH + jz short @@skip2 + EVEN +@@put_loop2: + lodsw + ror AX,CL + mov DH,AL + and AL,11h ;dummy +superl1p_word_mask2 equ $-1 + xor DH,AL + or AL,DL + stosw ;mov ES:[DI],AX ;;;or + mov DL,DH + dec CH + jnz short @@put_loop2 +@@skip2: + lodsb + xor AH,AH + ror AX,CL + or AL,DL + stosw + dec DI + mov DL,CH ;DL=0 + add DI,80 ;dummy +superl1p_add_di2 equ $-1 + mov CH,11h ;dummy +superl1p_count2 equ $-1 + dec BX + jnz short @@single_check2 + or BP,BP + jnz short @@roll2 + jmp @@return + EVEN +@@roll2: + sub DI,7d00h + mov BX,BP + xor BP,BP + jmp @@single_check2 + EVEN +@@odd_address: + dec DI + test DH,1 + jnz short @@odd_size2 +@@even_size2: + mov BYTE PTR CS:[superl1p_word_mask3],AL + dec CH ;!!!!!!!!!!!!!!!!!!!!! + mov BYTE PTR CS:[superl1p_count3],CH + mov AL,78 ;word + sub AL,DH + mov BYTE PTR CS:[superl1p_add_di3],AL + EVEN +@@put_loop3_1: + lodsb + xor AH,AH + ror AX,CL + mov DL,AH + xchg AH,AL + xor AL,AL + stosw + or CH,CH + jz short @@no_word1 + EVEN +@@put_loop3_2: + lodsw + ror AX,CL + mov DH,AL + and AL,11h ;dummy +superl1p_word_mask3 equ $-1 + xor DH,AL + or AL,DL + stosw ;mov ES:[DI],AX ;;;or + mov DL,DH + dec CH + jnz short @@put_loop3_2 + EVEN +@@no_word1: + lodsb + xor AH,AH + ror AX,CL + or AL,DL + stosw + mov DL,CH ;DL=0 + add DI,80 ;dummy +superl1p_add_di3 equ $-1 + mov CH,11h ;dummy +superl1p_count3 equ $-1 + dec BX + jnz short @@put_loop3_1 + or BP,BP + jz short @@return +@@roll3: + sub DI,7d00h + mov BX,BP + xor BP,BP + jmp short @@put_loop3_1 + EVEN +@@odd_size2: + mov BYTE PTR CS:[superl1p_word_mask4],AL + mov BYTE PTR CS:[superl1p_count4],CH + mov AL,79 ;word + sub AL,DH + mov BYTE PTR CS:[superl1p_add_di4],AL + EVEN +@@put_loop4_1: + lodsb + xor AH,AH + ror AX,CL + mov DL,AH + xchg AH,AL + xor AL,AL + stosw + or CH,CH + jz short @@no_word2 + EVEN +@@put_loop4_2: + lodsw + ror AX,CL + mov DH,AL + and AL,11h ;dummy +superl1p_word_mask4 equ $-1 + xor DH,AL + or AL,DL + stosw ;mov ES:[DI],AX ;;;or + mov DL,DH + dec CH + jnz short @@put_loop4_2 + EVEN +@@no_word2: + mov ES:[DI],DL + mov DL,CH ;DL=0 + add DI,80 ;dummy +superl1p_add_di4 equ $-1 + mov CH,11h ;dummy +superl1p_count4 equ $-1 + dec BX + jnz short @@put_loop4_1 + or BP,BP + jz short @@return +@@roll4: + sub DI,7d00h + mov BX,BP + xor BP,BP + jmp short @@put_loop4_1 + EVEN +@@return: + xor AL,AL + out 7ch,AL ;grcg stop + + pop DI + pop SI + pop DS + pop BP + ret 10 +endfunc ; } diff --git a/th02_main.asm b/th02_main.asm index 55579c54..3c01b322 100644 --- a/th02_main.asm +++ b/th02_main.asm @@ -2768,297 +2768,7 @@ include libs/master.lib/super_entry_at.asm include libs/master.lib/super_entry_bfnt.asm include libs/master.lib/super_cancel_pat.asm include libs/master.lib/super_clean.asm - -; --------------------------------------------------------------------------- - -loc_2F80: - ; sub_116EC+4EP ... - push bp - mov bp, sp - push ds - push si - push di - mov cx, [bp+0Eh] - mov di, [bp+0Ch] - mov ax, [bp+6] - out 7Ch, al - mov al, ah - out 7Eh, al - out 7Eh, al - out 7Eh, al - out 7Eh, al - mov ax, di - shl di, 2 - add di, ax - shl di, 4 - mov bx, cx - and cx, 7 - shr bx, 3 - add di, bx - mov bx, [bp+0Ah] - shl bx, 1 - mov dx, [bx+1EDAh] - push bx - mov bx, cx - mov cx, [bp+8] - mov bp, ax - mov al, dh - mul dl - xor si, si - jcxz short loc_2FCC - -loc_2FC8: - add si, ax - loop loc_2FC8 - -loc_2FCC: - mov al, [bx+85Ah] - mov ch, dh - shr ch, 1 - mov cl, bl - pop bx - mov ds, word ptr [bx+1ADAh] - mov bx, 0A800h - mov es, bx - assume es:nothing - mov bx, dx - xor bh, bh - add bp, bx - sub bp, 190h - jg short loc_2FEE - xor bp, bp - -loc_2FEE: - sub bx, bp - test di, 1 - jz short loc_2FF9 - jmp loc_308E -; --------------------------------------------------------------------------- - -loc_2FF9: - xor dl, dl - test dh, 1 - jnz short loc_3042 - mov byte ptr cs:loc_3017+1, al - mov byte ptr cs:loc_302C+1, ch - mov al, 50h ; 'P' - sub al, dh - mov byte ptr cs:loc_3029+2, al - nop - -loc_3012: - lodsw - ror ax, cl - mov dh, al - -loc_3017: - and al, 11h - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_3012 - mov es:[di], dl - mov dl, ch - -loc_3029: - add di, 50h ; 'P' - -loc_302C: - mov ch, 11h - dec bx - jnz short loc_3012 - or bp, bp - jnz short loc_3038 - jmp loc_313A -; --------------------------------------------------------------------------- - -loc_3038: - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_3012 -; --------------------------------------------------------------------------- - -loc_3042: - mov byte ptr cs:loc_305D+1, al - mov byte ptr cs:loc_3078+1, ch - mov al, 50h ; 'P' - sub al, dh - mov byte ptr cs:loc_3075+2, al - nop - -loc_3054: - or ch, ch - jz short loc_306A - -loc_3058: - lodsw - ror ax, cl - mov dh, al - -loc_305D: - and al, 11h - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_3058 - -loc_306A: - lodsb - xor ah, ah - ror ax, cl - or al, dl - stosw - dec di - mov dl, ch - -loc_3075: - add di, 50h ; 'P' - -loc_3078: - mov ch, 11h - dec bx - jnz short loc_3054 - or bp, bp - jnz short loc_3084 - jmp loc_313A -; --------------------------------------------------------------------------- - -loc_3084: - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_3054 -; --------------------------------------------------------------------------- - -loc_308E: - dec di - test dh, 1 - jnz short loc_30EA - mov byte ptr cs:loc_30BD+1, al - dec ch - mov byte ptr cs:loc_30D7+1, ch - mov al, 4Eh ; 'N' - sub al, dh - mov byte ptr cs:loc_30D4+2, al - nop - -loc_30A8: - lodsb - xor ah, ah - ror ax, cl - mov dl, ah - xchg ah, al - xor al, al - stosw - or ch, ch - jz short loc_30CA - -loc_30B8: - lodsw - ror ax, cl - mov dh, al - -loc_30BD: - and al, 11h - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_30B8 - -loc_30CA: - lodsb - xor ah, ah - ror ax, cl - or al, dl - stosw - mov dl, ch - -loc_30D4: - add di, 50h ; 'P' - -loc_30D7: - mov ch, 11h - dec bx - jnz short loc_30A8 - or bp, bp - jz short loc_313A - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_30A8 -; --------------------------------------------------------------------------- - -loc_30EA: - mov cs:byte_3112, al - mov cs:byte_3127, ch - mov al, 4Fh ; 'O' - sub al, dh - mov cs:byte_3125, al - nop - -loc_30FC: - lodsb - xor ah, ah - ror ax, cl - mov dl, ah - xchg ah, al - xor al, al - stosw - or ch, ch - jz short loc_311E - -loc_310C: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_3112 db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_310C - -loc_311E: - mov es:[di], dl - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_3125 db 50h - db 0B5h -byte_3127 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_30FC - or bp, bp - jz short loc_313A - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_30FC -; --------------------------------------------------------------------------- - nop - -loc_313A: - xor al, al - out 7Ch, al - pop di - pop si - pop ds - pop bp - retf 0Ah -; --------------------------------------------------------------------------- - nop +include libs/master.lib/super_roll_put_1plane.asm ; =============== S U B R O U T I N E ======================================= @@ -29593,7 +29303,7 @@ loc_111AF: push si push word_22D4C push large 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane pop di pop si pop bp @@ -30247,7 +29957,7 @@ loc_11712: add bx, bx push word ptr [bx+52DCh] push large 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane mov byte ptr [si+2BF5h], 0 jmp short loc_1175C ; --------------------------------------------------------------------------- @@ -34913,7 +34623,7 @@ loc_13A4B: push si push large 940000h push 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane jmp short loc_13AB8 ; --------------------------------------------------------------------------- @@ -35437,7 +35147,7 @@ var_2 = word ptr -2 push word_24E7E push word_2064E push large 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane jmp short loc_13F2B ; --------------------------------------------------------------------------- @@ -35928,7 +35638,7 @@ loc_142E1: push si push large 880000h push 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane inc word_2065A jmp loc_143E1 ; --------------------------------------------------------------------------- @@ -35988,7 +35698,7 @@ loc_1438D: push si push large 880000h push 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane jmp short loc_143E1 ; --------------------------------------------------------------------------- @@ -36309,7 +36019,7 @@ loc_14628: push si push word_2064E push large 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane cmp word_2065A, 960h jl short loc_14699 mov byte_2066A, 1 @@ -37602,7 +37312,7 @@ loc_150D1: push [bp+var_4] push large 930000h push 0FFC1h - call far ptr loc_2F80 + call super_roll_put_1plane loc_150EA: ; sub_14F16+19Dj @@ -42366,7 +42076,7 @@ loc_178C8: add ax, [bx+12h] push ax push large 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane jmp short loc_17964 ; --------------------------------------------------------------------------- @@ -46637,7 +46347,7 @@ loc_19F72: push si push word_2064E push large 0FFC0h - call far ptr loc_2F80 + call super_roll_put_1plane mov byte_2066B, 0 jmp short loc_19FAC ; --------------------------------------------------------------------------- diff --git a/th04_main.asm b/th04_main.asm index 52e63b84..58241577 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -2608,290 +2608,7 @@ include libs/master.lib/super_entry_at.asm include libs/master.lib/super_entry_bfnt.asm include libs/master.lib/super_cancel_pat.asm include libs/master.lib/super_clean.asm - -; --------------------------------------------------------------------------- - -loc_2B78: - push bp - mov bp, sp - push ds - push si - push di - mov cx, [bp+0Eh] - mov di, [bp+0Ch] - mov ax, [bp+6] - out 7Ch, al - mov al, ah - out 7Eh, al - out 7Eh, al - out 7Eh, al - out 7Eh, al - mov ax, di - shl di, 2 - add di, ax - shl di, 4 - mov bx, cx - and cx, 7 - shr bx, 3 - add di, bx - mov bx, [bp+0Ah] - shl bx, 1 - mov dx, [bx+2EC4h] - push bx - mov bx, cx - mov cx, [bp+8] - mov bp, ax - mov al, dh - mul dl - xor si, si - jcxz short loc_2BC4 - -loc_2BC0: - add si, ax - loop loc_2BC0 - -loc_2BC4: - mov al, [bx+776h] - mov ch, dh - shr ch, 1 - mov cl, bl - pop bx - mov ds, word ptr [bx+2AC4h] - mov bx, 0A800h - mov es, bx - assume es:nothing - mov bx, dx - xor bh, bh - add bp, bx - sub bp, 190h - jg short loc_2BE6 - xor bp, bp - -loc_2BE6: - sub bx, bp - test di, 1 - jz short loc_2BF1 - jmp loc_2C86 -; --------------------------------------------------------------------------- - -loc_2BF1: - xor dl, dl - test dh, 1 - jnz short loc_2C3A - mov cs:byte_2C10, al - mov cs:byte_2C25, ch - mov al, 50h ; 'P' - sub al, dh - mov cs:byte_2C23, al - nop - -loc_2C0A: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2C10 db 11h - db 32h, 0F0h, 0Ah, 0C2h, 0ABh, 8Ah, 0D6h, 0FEh, 0CDh, 75h - db 0EEh, 26h, 88h, 15h, 8Ah, 0D5h, 83h, 0C7h -byte_2C23 db 50h - db 0B5h -byte_2C25 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2C0A - or bp, bp - jnz short loc_2C30 - jmp loc_2D32 -; --------------------------------------------------------------------------- - -loc_2C30: - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2C0A -; --------------------------------------------------------------------------- - -loc_2C3A: - mov cs:byte_2C56, al - mov cs:byte_2C71, ch - mov al, 50h ; 'P' - sub al, dh - mov cs:byte_2C6F, al - nop - -loc_2C4C: - or ch, ch - jz short loc_2C62 - -loc_2C50: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2C56 db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_2C50 - -loc_2C62: - lodsb - xor ah, ah - ror ax, cl - or al, dl - stosw - dec di - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_2C6F db 50h - db 0B5h -byte_2C71 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2C4C - or bp, bp - jnz short loc_2C7C - jmp loc_2D32 -; --------------------------------------------------------------------------- - -loc_2C7C: - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2C4C -; --------------------------------------------------------------------------- - -loc_2C86: - dec di - test dh, 1 - jnz short loc_2CE2 - mov cs:byte_2CB6, al - dec ch - mov cs:byte_2CD0, ch - mov al, 4Eh ; 'N' - sub al, dh - mov cs:byte_2CCE, al - nop - -loc_2CA0: - lodsb - xor ah, ah - ror ax, cl - mov dl, ah - xchg ah, al - xor al, al - stosw - or ch, ch - jz short loc_2CC2 - -loc_2CB0: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2CB6 db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_2CB0 - -loc_2CC2: - lodsb - xor ah, ah - ror ax, cl - or al, dl - stosw - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_2CCE db 50h - db 0B5h -byte_2CD0 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2CA0 - or bp, bp - jz short loc_2D32 - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2CA0 -; --------------------------------------------------------------------------- - -loc_2CE2: - mov cs:byte_2D0A, al - mov cs:byte_2D1F, ch - mov al, 4Fh ; 'O' - sub al, dh - mov cs:byte_2D1D, al - nop - -loc_2CF4: - lodsb - xor ah, ah - ror ax, cl - mov dl, ah - xchg ah, al - xor al, al - stosw - or ch, ch - jz short loc_2D16 - -loc_2D04: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2D0A db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_2D04 - -loc_2D16: - mov es:[di], dl - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_2D1D db 50h - db 0B5h -byte_2D1F db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2CF4 - or bp, bp - jz short loc_2D32 - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2CF4 -; --------------------------------------------------------------------------- - nop - -loc_2D32: - xor al, al - out 7Ch, al - pop di - pop si - pop ds - pop bp - retf 0Ah -; --------------------------------------------------------------------------- - nop +include libs/master.lib/super_roll_put_1plane.asm ; =============== S U B R O U T I N E ======================================= @@ -19530,7 +19247,7 @@ loc_C836: add dx, 93h ; '' push dx push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov ax, word ptr dword_266F4+2 add ax, 100h push ax @@ -19540,7 +19257,7 @@ loc_C836: push ax push large 920000h push 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov byte_26708, 0 jmp short loc_C881 ; --------------------------------------------------------------------------- @@ -19643,7 +19360,7 @@ loc_C931: push [bp+var_2] push si push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov byte_26708, 0 loc_C946: @@ -20198,7 +19915,7 @@ loc_CCBD: push [bp+var_2] push si push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov byte_26708, 0 loc_CCD2: @@ -20387,7 +20104,7 @@ loc_CE6E: push word ptr [bp-2] push si push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov byte_26708, 0 jmp short loc_CE8F ; --------------------------------------------------------------------------- @@ -24468,7 +24185,7 @@ loc_ED4B: push [bp+var_4] push word ptr [si+6] push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov word ptr [si+16h], 0 loc_ED64: @@ -27958,7 +27675,7 @@ loc_107B7: mov ah, 0 push ax push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane mov byte ptr [si+24h], 0 loc_107D0: @@ -28535,7 +28252,7 @@ loc_10C45: push [bp+var_2] push si push large 0FFC0h - call far ptr loc_2B78 + call super_roll_put_1plane jmp short loc_10C6F ; --------------------------------------------------------------------------- diff --git a/th05_main.asm b/th05_main.asm index a1b603f4..12da3029 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -2805,301 +2805,7 @@ include libs/master.lib/super_entry_at.asm include libs/master.lib/super_entry_bfnt.asm include libs/master.lib/super_cancel_pat.asm include libs/master.lib/super_clean.asm - -; --------------------------------------------------------------------------- - -loc_2E1A: - ; sub_C567+159P ... - push bp - mov bp, sp - push ds - push si - push di - mov cx, [bp+0Eh] - mov di, [bp+0Ch] - mov ax, [bp+6] - out 7Ch, al - mov al, ah - out 7Eh, al - out 7Eh, al - out 7Eh, al - out 7Eh, al - mov ax, di - shl di, 2 - add di, ax - shl di, 4 - mov bx, cx - and cx, 7 - shr bx, 3 - add di, bx - mov bx, [bp+0Ah] - shl bx, 1 - mov dx, [bx+2A9Eh] - push bx - mov bx, cx - mov cx, [bp+8] - mov bp, ax - mov al, dh - mul dl - xor si, si - jcxz short loc_2E66 - -loc_2E62: - add si, ax - loop loc_2E62 - -loc_2E66: - mov al, [bx+6BEh] - mov ch, dh - shr ch, 1 - mov cl, bl - pop bx - mov ds, word ptr [bx+269Eh] - mov bx, 0A800h - mov es, bx - assume es:nothing - mov bx, dx - xor bh, bh - add bp, bx - sub bp, 190h - jg short loc_2E88 - xor bp, bp - -loc_2E88: - sub bx, bp - test di, 1 - jz short loc_2E93 - jmp loc_2F28 -; --------------------------------------------------------------------------- - -loc_2E93: - xor dl, dl - test dh, 1 - jnz short loc_2EDC - mov cs:byte_2EB2, al - mov cs:byte_2EC7, ch - mov al, 50h ; 'P' - sub al, dh - mov cs:byte_2EC5, al - nop - -loc_2EAC: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2EB2 db 11h - db 32h, 0F0h, 0Ah, 0C2h, 0ABh, 8Ah, 0D6h, 0FEh, 0CDh, 75h - db 0EEh, 26h, 88h, 15h, 8Ah, 0D5h, 83h, 0C7h -byte_2EC5 db 50h - db 0B5h -byte_2EC7 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2EAC - or bp, bp - jnz short loc_2ED2 - jmp loc_2FD4 -; --------------------------------------------------------------------------- - -loc_2ED2: - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2EAC -; --------------------------------------------------------------------------- - -loc_2EDC: - mov cs:byte_2EF8, al - mov cs:byte_2F13, ch - mov al, 50h ; 'P' - sub al, dh - mov cs:byte_2F11, al - nop - -loc_2EEE: - or ch, ch - jz short loc_2F04 - -loc_2EF2: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2EF8 db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_2EF2 - -loc_2F04: - lodsb - xor ah, ah - ror ax, cl - or al, dl - stosw - dec di - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_2F11 db 50h - db 0B5h -byte_2F13 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2EEE - or bp, bp - jnz short loc_2F1E - jmp loc_2FD4 -; --------------------------------------------------------------------------- - -loc_2F1E: - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2EEE -; --------------------------------------------------------------------------- - -loc_2F28: - dec di - test dh, 1 - jnz short loc_2F84 - mov cs:byte_2F58, al - dec ch - mov cs:byte_2F72, ch - mov al, 4Eh ; 'N' - -loc_2F3B: - sub al, dh - mov cs:byte_2F70, al - nop - -loc_2F42: - lodsb - xor ah, ah - ror ax, cl - mov dl, ah - xchg ah, al - -loc_2F4B: - xor al, al - stosw - or ch, ch - jz short loc_2F64 - -loc_2F52: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2F58 db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - -loc_2F60: - dec ch - jnz short loc_2F52 - -loc_2F64: - lodsb - xor ah, ah - -loc_2F67: - ror ax, cl - or al, dl - stosw - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_2F70 db 50h - db 0B5h -byte_2F72 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2F42 - or bp, bp - jz short loc_2FD4 - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2F42 -; --------------------------------------------------------------------------- - -loc_2F84: - mov cs:byte_2FAC, al - mov cs:byte_2FC1, ch - mov al, 4Fh ; 'O' - sub al, dh - mov cs:byte_2FBF, al - nop - -loc_2F96: - lodsb - -loc_2F97: - xor ah, ah - ror ax, cl - mov dl, ah - xchg ah, al - xor al, al - stosw - or ch, ch - jz short loc_2FB8 - -loc_2FA6: - lodsw - ror ax, cl - mov dh, al -; --------------------------------------------------------------------------- - db 24h -byte_2FAC db 11h -; --------------------------------------------------------------------------- - xor dh, al - or al, dl - stosw - mov dl, dh - dec ch - jnz short loc_2FA6 - -loc_2FB8: - mov es:[di], dl - mov dl, ch -; --------------------------------------------------------------------------- - db 83h, 0C7h -byte_2FBF db 50h - db 0B5h -byte_2FC1 db 11h -; --------------------------------------------------------------------------- - dec bx - jnz short loc_2F96 - or bp, bp - jz short loc_2FD4 - sub di, 7D00h - mov bx, bp - xor bp, bp - jmp short loc_2F96 -; --------------------------------------------------------------------------- - nop - -loc_2FD4: - xor al, al - out 7Ch, al - pop di - pop si - pop ds - pop bp - retf 0Ah -; --------------------------------------------------------------------------- - nop +include libs/master.lib/super_roll_put_1plane.asm ; =============== S U B R O U T I N E ======================================= @@ -18892,7 +18598,7 @@ loc_C683: push ax push large 0B30000h push 0C9h ; '' - call far ptr loc_2E1A + call super_roll_put_1plane sub di, 14h mov ax, [di] mov bx, 10h @@ -18905,7 +18611,7 @@ loc_C683: push ax push large 0B30000h push 0C9h ; '' - call far ptr loc_2E1A + call super_roll_put_1plane sub di, 14h mov ax, [di] mov bx, 10h @@ -18918,7 +18624,7 @@ loc_C683: push ax push large 0B30000h push 0C9h ; '' - call far ptr loc_2E1A + call super_roll_put_1plane mov ax, [si] mov bx, 10h cwd @@ -18930,7 +18636,7 @@ loc_C683: push ax push large 0B30000h push 0C8h ; '' - call far ptr loc_2E1A + call super_roll_put_1plane add di, 82h ; '' add si, 8Ch ; '' cmp byte_2429B, 70h ; 'p' @@ -19605,7 +19311,7 @@ loc_CCB3: push word_242A4 push large 0B30000h push 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane loc_CCFE: inc si @@ -24182,7 +23888,7 @@ loc_EC5B: mov ah, 0 push ax push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte ptr [si+21h], 0 loc_EC74: @@ -27927,7 +27633,7 @@ loc_108C2: push word ptr [bp-2] push si push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte_26334, 0 jmp short loc_10900 ; --------------------------------------------------------------------------- @@ -28081,7 +27787,7 @@ loc_10A05: push word ptr [bp-2] push si push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte_26334, 0 jmp short loc_10A26 ; --------------------------------------------------------------------------- @@ -28203,7 +27909,7 @@ loc_10AF8: push word ptr [bp-2] push si push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte_26334, 0 jmp short loc_10B19 ; --------------------------------------------------------------------------- @@ -28669,7 +28375,7 @@ loc_10E8D: push di push word ptr [bp-2] push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte_26334, 0 jmp short loc_10EAE ; --------------------------------------------------------------------------- @@ -29618,7 +29324,7 @@ loc_1166D: mov ah, 0 push ax push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte_26334, 0 jmp short loc_11691 ; --------------------------------------------------------------------------- @@ -29893,7 +29599,7 @@ loc_118A9: mov ah, 0 push ax push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane mov byte_26334, 0 jmp short loc_118CD ; --------------------------------------------------------------------------- @@ -31059,7 +30765,7 @@ loc_122AB: push [bp+var_2] push si push large 0FFC0h - call far ptr loc_2E1A + call super_roll_put_1plane jmp short loc_122D5 ; --------------------------------------------------------------------------- @@ -32737,7 +32443,9 @@ loc_12F25: cmp bx, 3 ja short loc_12F75 add bx, bx - jmp word ptr cs:(loc_2F97 - (loc_AE0E+2))[bx] + jmp word ptr cs:table_12F97[bx] + +loc_12F3B: sub word ptr [si+2], 180h mov byte ptr [si+0Fh], 2 mov word ptr [si+0Ah], 0FFEAh @@ -32788,10 +32496,10 @@ loc_12F94: leave retn ; --------------------------------------------------------------------------- - dw offset loc_2F3B - (offset loc_AE0E+2) - dw offset loc_2F4B - (offset loc_AE0E+2) - dw offset loc_2F60 - (offset loc_AE0E+2) - dw offset loc_2F67 - (offset loc_AE0E+2) +table_12F97 dw loc_12F3B + dw loc_12F4B + dw loc_12F60 + dw loc_12F67 dw offset loc_B0D8 db 2 dup(0), 56h, 0C6h, 46h, 0FFh, 3, 0E8h, 69h, 0F9h db 0A8h, 9, 0Fh, 84h, 0DDh, 0, 0A8h, 8, 0Fh, 84h, 0CCh