📄 procvid.asm
字号:
.menuon8 mov ebx,7.loop2 mov ecx,12 mov byte[esi-1],0C0h.loop mov dword[esi],0C0C0C0C0h add esi,4.nobox8 dec ecx jnz .loop add esi,288-48 dec ebx jnz .loop2 jmp .do8b.do16b3 mov esi,215*288*2+32*2+192*2 add esi,[vidbuffer] cmp byte[ForceNonTransp],1 je .menuon16 cmp byte[ClockBox],1 jne .do8b.menuon16 mov ebx,7.loop2b mov ecx,24 mov word[esi-2],0 mov word[esi-2+75036*4],0.loopb mov dword[esi],0 mov dword[esi+75036*4],0 add esi,4.nobox16 dec ecx jnz .loopb add esi,288*2-48*2 dec ebx jnz .loop2b.do8b call GetTimeInSeconds xor edx,edx mov ebx,60 div ebx push eax ; edx = seconds mov eax,edx xor edx,edx mov ebx,10 div ebx mov esi,216*288+32+228 call .output pop eax mov ebx,60 xor edx,edx div ebx push eax ; edx = minutes mov eax,edx xor edx,edx mov ebx,10 div ebx mov esi,216*288+32+210 call .output pop eax ; eax = hours cmp byte[TwelveHourClock],1 jne .no12hour ; check to see if it's 12 PM cmp eax,12 jbe .not12pm sub eax,12.not12pm cmp eax,0 jne .no12hour add eax,12.no12hour xor edx,edx mov ebx,10 div ebx mov esi,216*288+32+192 call .output cmp byte[cbitmode],1 je .do16b2.no16b4 mov esi,216*288+32+222 add esi,[vidbuffer] xor eax,eax add al,':' mov al,[ASCII2Font+eax] pushad call outputchar5x5 popad mov esi,216*288+32+204 add esi,[vidbuffer] xor eax,eax add al,':' mov al,[ASCII2Font+eax] pushad call outputchar5x5 popad ret.do16b2 mov esi,216*288*2+32*2+222*2 add esi,[vidbuffer] xor eax,eax add al,':' mov al,[ASCII2Font+eax] pushad call outputchar16b5x5 popad mov esi,216*288*2+32*2+204*2 add esi,[vidbuffer] xor eax,eax add al,':' mov al,[ASCII2Font+eax] pushad call outputchar16b5x5 popad ret.output ; output char value at al and dl cmp byte[cbitmode],1 je .do16b.no16b5 add esi,[vidbuffer] and eax,0FFh add al,48 mov al,[ASCII2Font+eax] pushad call outputchar5x5 popad xor eax,eax mov al,dl add al,48 mov al,[ASCII2Font+eax] add esi,6 pushad call outputchar5x5 popad ret.do16b add esi,esi add esi,[vidbuffer] and eax,0FFh add al,48 mov al,[ASCII2Font+eax] pushad call outputchar16b5x5 popad xor eax,eax mov al,dl add al,48 mov al,[ASCII2Font+eax] add esi,12 pushad call outputchar16b5x5 popad retSECTION .bssNEWSYM SoundTest, resb 1blahrnr resw 1SECTION .textNEWSYM hextestoutput mov dx,[bg3scroly]; and dx,0F8h shr edx,3 shl edx,6 xor eax,eax mov ax,[bg3ptr] add ax,dx xor edx,edx mov dx,[bg3scrolx] and dx,0F8h shr edx,3 shl edx,1 add ax,dx mov dx,[bg3scrolx] test dx,8000h jz .nooma and dx,0F000h shr dx,5 add ax,dx.nooma add eax,40h mov edx,eax mov [Testval],edx%ifdef __MSDOS__ call displayfpspal%endif mov esi,[vram] mov ax,0 mov ecx,400h.loop; mov word[esi],ax add esi,2 dec ecx jnz .loop inc word[blahrnr] mov esi,216*288+32 add esi,[vidbuffer] xor eax,eax ; 4F00h mov ebx,[C4Ram] mov ebx,[vram] mov al,[DecompAPtr+1h] call outputhex mov esi,216*288+32+16 add esi,[vidbuffer] xor eax,eax mov ebx,[C4Ram] mov ebx,[vram] mov al,[DecompAPtr] call outputhex mov esi,216*288+70 add esi,[vidbuffer] xor eax,eax mov ebx,[C4Ram] mov al,[bg1objptr+1] call outputhex mov esi,216*288+70+16 add esi,[vidbuffer] xor eax,eax mov ebx,[C4Ram] mov al,[bg1objptr] call outputhex mov esi,216*288+108 add esi,[vidbuffer] xor eax,eax mov ebx,[C4Ram] mov al,[ebx+4] call outputhex mov esi,216*288+108+16 add esi,[vidbuffer] xor eax,eax mov ebx,[C4Ram] mov al,[ebx+9] call outputhex mov esi,216*288+146 add esi,[vidbuffer] xor eax,eax mov ebx,[C4Ram] mov al,[ebx+10] call outputhex xor eax,eax mov esi,216*288+146+16 add esi,[vidbuffer] or al,[bg1scroly] mov ebx,[C4Ram] mov al,[ebx+11] call outputhex retSECTION .bssNEWSYM SoundPlayed0, resb 1NEWSYM SoundPlayed1, resb 1NEWSYM SoundPlayed2, resb 1NEWSYM SoundPlayed3, resb 1NEWSYM SoundPlayed4, resb 1NEWSYM SoundPlayed5, resb 1NEWSYM SoundPlayed6, resb 1NEWSYM SoundPlayed7, resb 1SECTION .textNEWSYM ShowSound add esi,[vidbuffer].next mov [esi],ebx mov [esi+4],ebx mov [esi+8],bx sub esi,288 dec al jnz .next retNEWSYM sounddisplay%ifdef __MSDOS__ call displayfpspal%endif push esi push ebx push eax mov ebx,80808080h cmp byte[SoundPlayed0],0 je .nosnd0 mov al,[SoundPlayed0] mov esi,223*288+16 call ShowSound sub byte[SoundPlayed0],2.nosnd0 cmp byte[SoundPlayed1],0 je .nosnd1 mov al,[SoundPlayed1] mov esi,223*288+28 call ShowSound sub byte[SoundPlayed1],2.nosnd1 cmp byte[SoundPlayed2],0 je .nosnd2 mov al,[SoundPlayed2] mov esi,223*288+40 call ShowSound sub byte[SoundPlayed2],2.nosnd2 cmp byte[SoundPlayed3],0 je .nosnd3 mov al,[SoundPlayed3] mov esi,223*288+52 call ShowSound sub byte[SoundPlayed3],2.nosnd3 cmp byte[SoundPlayed4],0 je .nosnd4 mov al,[SoundPlayed4] mov esi,223*288+64 call ShowSound sub byte[SoundPlayed4],2.nosnd4 cmp byte[SoundPlayed5],0 je .nosnd5 mov al,[SoundPlayed5] mov esi,223*288+76 call ShowSound sub byte[SoundPlayed5],2.nosnd5 cmp byte[SoundPlayed6],0 je .nosnd6 mov al,[SoundPlayed6] mov esi,223*288+88 call ShowSound sub byte[SoundPlayed6],2.nosnd6 cmp byte[SoundPlayed7],0 je .nosnd7 mov al,[SoundPlayed7] mov esi,223*288+100 call ShowSound sub byte[SoundPlayed7],2.nosnd7 pop eax pop esi pop ebx retNEWSYM waitvsync mov dx,3DAh ;VGA status port;.loop; in al,dx; test al,8 ;check VR bit; jnz .loop ;in middle of VR, better wait for next one.loop2 in al,dx test al,8 jz .loop2 ;updating the screen retSECTION .dataNEWSYM prevengval, db 10SECTION .textNEWSYM copyvid mov dword[.sdrawptr],0 ; Test if add table needs updating cmp byte[cbitmode],0 je .notatud cmp byte[vesa2red10],0 je .notatud mov al,[newengen] cmp [prevengval],al je .notatud mov [prevengval],al call genfulladdtab jmp .notatud.redadd call genfulladdtabng.notatud cmp dword[MessageOn],0 je near .nomsg cmp byte[cbitmode],1 je near .do16b.no16b mov edi,[Msgptr] mov esi,192*288+32 add esi,[vidbuffer] cmp edi,CSStatus je .fivex5b cmp byte[SmallMsgText],1 je .smallmsgtext call OutputGraphicString.no16bit jmp .nfivex5b.fivex5b call OutputGraphicString5x5 mov edi,CSStatus2 mov esi,200*288+32 add esi,[vidbuffer] call OutputGraphicString5x5 mov edi,CSStatus3 mov esi,208*288+32 add esi,[vidbuffer] call OutputGraphicString5x5 mov edi,CSStatus4 mov esi,216*288+32 add esi,[vidbuffer] call OutputGraphicString5x5 jmp .nfivex5b.smallmsgtext call OutputGraphicString5x5.nfivex5b dec dword[MessageOn] jnz near .nomsg%ifdef __MSDOS__ cmp byte[cbitmode],1 je near .nomsg call dosmakepal%endif jmp .nomsg.do16b mov edi,[Msgptr] mov esi,192*288*2+32*2 add esi,[vidbuffer] cmp edi,CSStatus je .fivex5 cmp byte[SmallMsgText],1 je .smallmsgtext2 call OutputGraphicString16b jmp .nfivex5.fivex5 call OutputGraphicString16b5x5 mov edi,CSStatus2 mov esi,200*288*2+32*2 add esi,[vidbuffer] call OutputGraphicString16b5x5 mov edi,CSStatus3 mov esi,208*288*2+32*2 add esi,[vidbuffer] call OutputGraphicString16b5x5 mov edi,CSStatus4 mov esi,216*288*2+32*2 add esi,[vidbuffer] call OutputGraphicString16b5x5 jmp .nfivex5.smallmsgtext2 call OutputGraphicString16b5x5.nfivex5 dec dword[MessageOn].nomsg cmp byte[MovieProcessing],0 jz .nomovie4 cmp byte[MovieDisplayFrame],0 jz .nomovie4 pushad call GetMovieFrameStr popad mov edi,MovieFrameStr cmp byte[cbitmode],1 jne .not16bframe mov esi,216*288*2+32*2 add esi,[vidbuffer] call OutputGraphicString16b5x5 jmp .nomovie4.not16bframe mov esi,216*288+32 add esi,[vidbuffer] call OutputGraphicString5x5.nomovie4 jmp vidpasteSECTION .bss.sdrawptr resd 1SECTION .textNEWSYM vidpaste%ifdef __MSDOS__ cmp byte[vsyncon],0 je .novsync cmp byte[Triplebufen],0 jne .novsync cmp byte[curblank],0h jne .novsync call waitvsync.novsync cmp byte[cbitmode],1 je .nopal cmp byte[curblank],0 jne .nopal call doschangepal.nopal%endif cmp byte[FPSOn],0 je .nofps cmp byte[curblank],0 jne .nofps call showfps.nofps cmp byte[TimerEnable],0 je .noclock cmp byte[ShowTimer],0 je .noclock call ClockOutput.noclock cmp byte[device2],2 je near .drawss.returnfromdraw mov ax,[resolutn] cmp [prevresolutn],ax je .noclear mov [prevresolutn],ax%ifdef __MSDOS__ call DOSClearScreen%endif.noclear jmp DrawScreen.drawss%ifdef __MSDOS__ cmp byte[cbitmode],1 je .noss8b call superscopepal.noss8b%endif xor eax,eax mov al,[mouseyloc] mov ebx,288 mul ebx mov esi,[vidbuffer] mov edi,SScopeCursor xor ebx,ebx mov bl,[mousexloc] add ebx,6 cmp byte[cbitmode],1 je near .ss16b mov cl,20.ssloop mov ch,20.ssloop2 cmp byte[edi],0 je .nodraw mov edx,eax add edx,ebx sub edx,288*10 jb .nodraw mov byte[esi+edx],128+16.nodraw inc ebx inc edi dec ch jnz .ssloop2 sub ebx,20 add eax,288 dec cl jnz .ssloop jmp .returnfromdraw.ss16b push ebx mov cl,[vesa2_rpos] mov bx,31 shl bx,cl mov [.SSRedCo],bx pop ebx shl eax,1 shl ebx,1 mov cl,20.ssloopb mov ch,20.ssloopb2 cmp byte[edi],0 je .nodrawb mov edx,eax add edx,ebx sub edx,288*10*2 jb .nodrawb push eax mov ax,[.SSRedCo] mov [esi+edx],ax pop eax.nodrawb add ebx,2 inc edi dec ch jnz .ssloopb2 sub ebx,40 add eax,288*2 dec cl jnz .ssloopb jmp .returnfromdrawSECTION .bss.SSRedCo resw 1SECTION .dataNEWSYM MsgCount, dd 120 ; How long message will stay (PAL = 100)SECTION .bssNEWSYM lastfps, resb 1 ; stores the last fps encounteredNEWSYM lastfps2, resb 1 ; stores the last fps encounteredNEWSYM curfps2, resb 1 ; current video refresh fpsNEWSYM Msgptr, resd 1 ; Pointer to messageNEWSYM MessageOn, resd 1 ; Message On CountdownNEWSYM FPSOn, resb 1SECTION .dataprevresolutn dd 224NEWSYM SScopeCursordb 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0db 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0db 0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,0,0db 0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0db 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0db 0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0db 0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0db 0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0db 0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0db 0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0db 0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0db 0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0db 0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0db 0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0db 0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0db 0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,0,0db 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0db 0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -