⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guikeys.inc

📁 linux下的任天堂模拟器代码。供大家参考。
💻 INC
📖 第 1 页 / 共 4 页
字号:
  cmp dh,'E'  jne .notgreaterthan.greaterthan  mov byte[CheatCompareValue],1.notgreaterthan  cmp dh,'W'  je .equalthan  cmp dh,'+'  jne .notequalthan.equalthan  mov byte[CheatCompareValue],2.notequalthan  cmp dh,'A'  jne .notnotequalthan  mov byte[CheatCompareValue],3.notnotequalthan%ifdef __UNIXSDL__          ; Select with Arrow Keys  cmp al,90  je .yesmoveup  cmp dword[numlockptr],1  je .nomoveup  cmp al,72  jne .nomoveup.yesmoveup%else  cmp al,72  jne .nomoveup%endif  cmp byte[CheatCompareValue],0  je .nomoveup  dec byte[CheatCompareValue].nomoveup%ifdef __UNIXSDL__  cmp al,96  je .yesmovedown  cmp dword[numlockptr],1  je .nomovedown  cmp al,80  jne .nomovedown.yesmovedown%else  cmp al,80  jne .nomovedown%endif  cmp byte[CheatCompareValue],3  je .nomovedown  inc byte[CheatCompareValue].nomovedown                ; Restart/View/Search Buttons  cmp dh,'R'  jne .notrestart  mov byte[CheatWinMode],0  mov byte[CheatSearchStatus],0.notrestart  cmp dh,'V'  jne .notview  mov byte[CheatWinMode],2.notview  cmp dh,13  je .searchprocess  cmp dh,'S'  jne .nosearchprocess.searchprocess  cmp byte[CheatSearchStatus],1  je .nosearchprocess  call CheatCodeSearchProcess.nosearchprocess  ret.view                            ; View  cmp dword[NumCheatSrc],0     ; Return Hotkey  jne .nozero  cmp dh,27  je .yesret  cmp dh,'R'  jne .notreturnb.yesret  mov byte[CheatWinMode],1.notreturnb  ret.nozero                   ; Select Codes with arrow keys%ifdef __UNIXSDL__  cmp al,89  je .yeshome  cmp dword[numlockptr],1  je .nohome  cmp al,71  jne .nohome.yeshome%else  cmp al,71  jne .nohome%endif  mov dword[GUIcurrentchtsrccursloc],0  mov dword[GUIcurrentchtsrcviewloc],0  ret.nohome%ifdef __UNIXSDL__  cmp al,95  je .yesendp  cmp dword[numlockptr],1  je .noendp  cmp al,79  jne .noendp.yesendp%else  cmp al,79  jne .noendp%endif  mov eax,[NumCheatSrc]  dec eax  mov [GUIcurrentchtsrccursloc],eax  sub eax,11  mov [GUIcurrentchtsrcviewloc],eax  test dword[GUIcurrentchtsrcviewloc],8000000h  jz .posve  mov dword[GUIcurrentchtsrcviewloc],0.posve  ret.noendp%ifdef __UNIXSDL__  cmp al,90  je .up  cmp dword[numlockptr],1  je .noup  cmp al,72  jne .noup%else  cmp al,72  jne .noup%endif.up  cmp dword[GUIcurrentchtsrccursloc],0  je .noup  mov ebx,[GUIcurrentchtsrccursloc]  cmp [GUIcurrentchtsrcviewloc],ebx  jne .noviewdec  dec dword[GUIcurrentchtsrcviewloc].noviewdec  dec dword[GUIcurrentchtsrccursloc].noup%ifdef __UNIXSDL__  cmp al,96  je .yesdown  cmp dword[numlockptr],1  je .nodown  cmp al,80  jne .nodown.yesdown%else  cmp al,80  jne .nodown%endif  mov ebx,[GUIcurrentchtsrccursloc]  inc ebx  cmp ebx,[NumCheatSrc]  jae .noviewinc  inc dword[GUIcurrentchtsrccursloc]  sub ebx,12  cmp ebx,[GUIcurrentchtsrcviewloc]  jne .noviewinc  inc dword[GUIcurrentchtsrcviewloc].noviewinc.nodown%ifdef __UNIXSDL__            ; Pageup/Down to select Cheats  cmp al,91  je .yespgup  cmp dword[numlockptr],1  je .nopageup  cmp al,73  jne .nopageup.yespgup%else  cmp al,73  jne .nopageup%endif  sub dword[GUIcurrentchtsrcviewloc],12  sub dword[GUIcurrentchtsrccursloc],12  test dword[GUIcurrentchtsrcviewloc],8000000h  jz .posv  mov dword[GUIcurrentchtsrcviewloc],0.posv  test dword[GUIcurrentchtsrccursloc],8000000h  jz .posc  mov dword[GUIcurrentchtsrccursloc],0.posc.nopageup%ifdef __UNIXSDL__  cmp al,97  je .yespgdn  cmp dword[numlockptr],1  je .nopagedown  cmp al,81  jne .nopagedown.yespgdn%else  cmp al,81  jne .nopagedown%endif  add dword[GUIcurrentchtsrcviewloc],12  add dword[GUIcurrentchtsrccursloc],12  mov ebx,[NumCheatSrc]  dec ebx  cmp dword[GUIcurrentchtsrccursloc],ebx  jb .poscd  mov [GUIcurrentchtsrccursloc],ebx.poscd  sub ebx,11  cmp dword[GUIcurrentchtsrcviewloc],ebx  jl .posvd  test ebx,8000000h  jz .noneg  mov ebx,0.noneg  mov [GUIcurrentchtsrcviewloc],ebx.posvd.nopagedown  cmp dh,27          ; Return/Add Buttons  je .yesretb  cmp dh,'R'  jne .notreturn.yesretb  mov byte[CheatWinMode],1.notreturn  cmp dh,13  je .yesadd  cmp dh,'A'  jne .notadd.yesadd  mov byte[CheatWinMode],3  mov byte[CurCStextpos],0  mov byte[CSInputDisplay],'_'  mov byte[CSInputDisplay+1],0  mov byte[CSDescDisplay],0.notadd  ret.add                                 ; Add Cheat Window  cmp dh,27                        ; Button Hotkey  je .yesretc  cmp byte[CurCStextpos],1  je .notreturnc  cmp dh,'R'  jne .notreturnc.nofastforward.yesretc  mov byte[CheatWinMode],2.notreturnc  cmp byte[CurCStextpos],0  jne near .nofirstbox  cmp dh,9  je .yestab  cmp byte[CSOverValue],1  je .noret  cmp dh,13  jne .noret.yestab  mov byte[CurCStextpos],1.noret  call InsertSearchCharacter  ret.nofirstbox  cmp byte[CurCStextpos],1  jne near .nosecondbox  cmp dh,9  jne .notab  mov byte[CurCStextpos],0.notab  cmp dh,13  jne .noenter  jmp AddCSCheatCode.noenter  call InsertSearchDescription  ret.nosecondbox  ret; Allows you to use the arrow keys to select a state number, and Enter to pickGUIStateSelKeys:  cmp al,13  jne .noenter  xor eax,eax  mov al,[GUIwinptr]  dec eax  mov byte[GUIwinactiv+2],0  mov byte[GUIwinorder+eax],0  dec byte[GUIwinptr]  mov al,[GUIpmenupos]  mov [GUIcmenupos],al  ret.noenter  mov bl,al  mov eax,[current_zst]  mov dl,10  div dl  movzx ecx,ah%ifdef __UNIXSDL__  cmp bl,92               ; linux keypad left  je .yesleft  cmp dword[numlockptr],1 ; if numlock on, disregard numpad  je .noleft%endif  cmp bl,75               ; linux numpad left, non-linux num/keypad left  jne .noleft.yesleft  cmp cl,0  jne .no0th  mov cl,4  jmp .done.no0th  cmp cl,5  jne .no5th  mov cl,9  jmp .done.no5th  dec cl  jmp .done.noleft%ifdef __UNIXSDL__  cmp bl,94               ; linux keypad right  je .yesright  cmp dword[numlockptr],1 ; if numlock on, disregard numpad  je .noright%endif  cmp bl,77               ; linux numpad right, non-linux num/keypad right  jne .noright.yesright  cmp cl,4  jne .no4th  mov cl,0  jmp .done.no4th  cmp cl,9  jne .no9th  mov cl,5  jmp .done.no9th  inc cl  jmp .done.noright%ifdef __UNIXSDL__  cmp bl,90               ; linux keypad up  je .yesvert  cmp dword[numlockptr],1 ; if numlock on, disregard numpad  je .noup%endif  cmp bl,72               ; linux numpad up, non-linux num/keypad up  je .yesvert.noup%ifdef __UNIXSDL__  cmp bl,96               ; linux keypad down  je .yesvert  cmp dword[numlockptr],1 ; if numlock on, disregard numpad  je .novert%endif  cmp bl,80               ; linux numpad down, non-linux num/keypad down  jne .novert.yesvert  cmp cl,5  jge .subme  add cl,5  jmp .done.subme  sub cl,5  jmp .done.novert%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try1  cmp bl,04Fh  je .yes1.try1%endif  test byte[pressed+2],1  jz .no1.yes1  mov cl,1  jmp .done.no1%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try2  cmp bl,050h  je .yes2.try2%endif  test byte[pressed+3],1  jz .no2.yes2  mov cl,2  jmp .done.no2%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try3  cmp bl,051h  je .yes3.try3%endif  test byte[pressed+4],1  jz .no3.yes3  mov cl,3  jmp .done.no3%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try4  cmp bl,04Bh  je .yes4.try4%endif  test byte[pressed+5],1  jz .no4.yes4  mov cl,4  jmp .done.no4%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try5  test byte[pressed+04Ch],1  jnz .yes5.try5%endif  test byte[pressed+6],1  jz .no5.yes5  mov cl,5  jmp .done.no5%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try6  cmp bl,04Dh  je .yes6.try6%endif  test byte[pressed+7],1  jz .no6.yes6  mov cl,6  jmp .done.no6%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try7  cmp bl,047h  je .yes7.try7%endif  test byte[pressed+8],1  jz .no7.yes7  mov cl,7  jmp .done.no7%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try8  cmp bl,048h  je .yes8.try8%endif  test byte[pressed+9],1  jz .no8.yes8  mov cl,8  jmp .done.no8%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try9  cmp bl,049h  je .yes9.try9%endif  test byte[pressed+10],1  jz .no9.yes9  mov cl,9  jmp .done.no9%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .try0  test byte[pressed+052h],1  jnz .yes0.try0%endif  test byte[pressed+11],1  jz .no0.yes0  mov cl,0  jmp .done.no0  jmp .nochange.done  mul dl  add al,cl  mov [current_zst],eax  ret.nochange%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .trypgup  cmp bl,91  je .yespgup.trypgup%endif  cmp bl,73  jne .nopgup.yespgup  cmp dword[current_zst],90  jge .nochange2  add dword[current_zst],10  ret.nopgup%ifdef __UNIXSDL__  cmp dword[numlockptr],0 ; if numlock on, let's try this first  je .trypgdn  cmp bl,97  je .yespgdn.trypgdn%endif  cmp bl,81  jne .nopgdn.yespgdn  cmp dword[current_zst],10  jl .nochange2  sub dword[current_zst],10  ret.nopgdn.nochange2  ret; Allows you to select boxes with the arrow keys, Enter to chooseGUIResetKeys:%ifdef __UNIXSDL__  cmp al,92  je .yesleft  cmp dword[numlockptr],1  je .noleft  cmp al,75  jne .noleft.yesleft%else  cmp al,75  jne .noleft%endif  mov byte[GUICResetPos],0.noleft%ifdef __UNIXSDL__  cmp al,94  je .yesright  cmp dword[numlockptr],1  je .noright  cmp al,77  jne .noright.yesright%else  cmp al,77  jne .noright%endif  mov byte[GUICResetPos],1.noright  cmp al,13  jne .noconf  cmp byte[GUICResetPos],0  je .yesreset  jmp .noreset.noconf  ToUpperASM  cmp dh,'Y'  jne .notyesreset.yesreset  mov byte[GUICBHold],2  jmp GUIProcReset.notyesreset  cmp dh,'N'  jne .notnoreset.noreset  xor eax,eax  mov al,[GUIwinptr]  dec eax  mov byte[GUIwinactiv+12],0  mov byte[GUIwinorder+eax],0  dec byte[GUIwinptr]  mov al,[GUIpmenupos]  mov [GUIcmenupos],al.notnoreset  ret; Allows you to select boxes with the arrow keys, Enter to chooseGUIStateKeys:%ifdef __UNIXSDL__  cmp al,92  je .yesleft  cmp dword[numlockptr],1  je .noleft  cmp al,75  jne .noleft.yesleft%else  cmp al,75  jne .noleft%endif  mov byte[GUICStatePos],0.noleft%ifdef __UNIXSDL__  cmp al,94  je .yesright  cmp dword[numlockptr],1  je .noright  cmp al,77  jne .noright.yesright%else  cmp al,77  jne .noright%endif  mov byte[GUICStatePos],1.noright  cmp al,13  jne .noconf  cmp byte[GUICStatePos],0  je .yesreset  jmp .noreset.noconf  ToUpperASM  cmp dh,'Y'  jne .notyesreset.yesreset  mov byte[GUICBHold],10  jmp GUIProcStates.notyesreset  cmp dh,'N'  jne .notnoreset.noreset  xor eax,eax  mov al,[GUIwinptr]  dec eax  mov byte[GUIwinactiv+14],0  mov byte[GUIwinorder+eax],0  dec byte[GUIwinptr]  mov al,[GUIpmenupos]  mov [GUIcmenupos],al.notnoreset  retGUILoadKeys:  cmp dx,0  jne near .keypressed.nokeypressed  ret.keypressed  mov [gui_key],dh  mov [gui_key_extended],dl  pushad  call GUILoadKeysNavigate  cmp eax,1  popad  je .nokeypressed  cmp byte[GUILoadPos],0  je near .nobacksp  cmp dh,8  jne .nobacksp  mov byte[GUILDFlash],0  dec byte[GUILoadPos]  xor eax,eax  mov al,[GUILoadPos]  ret.nobacksp  cmp dh,8  je near .nokeypressed  cmp byte[GUILoadPos],36  je near .nokeypressed  mov byte[GUILDFlash],0  xor eax,eax  mov al,[GUILoadPos]  mov [GUILoadTextA+eax],dh  inc byte[GUILoadPos]  pushad  call GUILoadKeysJumpTo  popad  retWaitForKey:.again3  mov edx,10.again4  mov cx,1000  push edx  call delay  call JoyRead  pop edx  xor ebx,ebx  mov ecx,256+128+64.b2  cmp byte[pressed+ebx],0  jne near .again3  inc ebx  dec ecx  jnz .b2  dec edx  jnz near .again4.again  call JoyRead  xor ebx,ebx  mov ecx,256+128+64.b  cmp byte[pressed+ebx],0  jne .pressedokay  inc ebx  dec ecx  jnz .b  jmp .again.pressedokay.again2  call Check_Key  or al,al  jz .nokey  call Get_Key  jmp .again2.nokey  cmp byte[MouseDis],1  je .mousedis2  push ebx;    mov eax,0Bh;    int 33h  pop ebx.mousedis2  mov byte[GUIpclicked],1  ret

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -