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

📄 guikeys.inc

📁 linux下的任天堂模拟器代码。供大家参考。
💻 INC
📖 第 1 页 / 共 4 页
字号:
  GUIKeyButtonHole LowPassFilterType,0,'O'  GUIKeyButtonHole LowPassFilterType,1,'I'  GUIKeyButtonHole LowPassFilterType,2,'Y'  cmp byte[MMXSupport],0  je .nohiqualityfilter  GUIKeyButtonHole LowPassFilterType,3,'H'.nohiqualityfilter  retSECTION .data.sampratenext db 1,4,5,6,2,3,0,0SECTION .textGUINetMenuKeys1:  retGUIGetInputLine:  retSECTION .bssGUIEditString resd 1              ; Pointer to stringGUIEditStringcLen resd 1          ; Pointer to end of string (done in function)GUIEditStringmLen resd 1          ; Max length of stringGUIEditStringLTxt resd 1          ; blink value, should be set to 0 when box selectedGUIEditStringLstb resd 1          ; if cursor is placed (set in main function)GUIEditStringcWin resd 1          ; 0 = no text window selectedSECTION .textGUIPathKeys:  cmp dh,0  je near .nokeypressed  cmp dword[GUIInputBox],0  je near .nokeypressed  cmp dword[GUIInputBox],1  jne .notBox1  mov eax,SRAMPath  jmp .boxselected.notBox1  cmp dword[GUIInputBox],2  jne .notBox2  mov eax,SnapPath  jmp .boxselected.notBox2  cmp dword[GUIInputBox],3  jne .notBox3  mov eax,SPCPath  jmp .boxselected.notBox3  cmp dword[GUIInputBox],4  jne .notBox4  mov eax,BSXPath  jmp .boxselected.notBox4  cmp dword[GUIInputBox],5  jne .notBox5  mov eax,SGPath  jmp .boxselected.notBox5  cmp dword[GUIInputBox],6  jne .notBox6  mov eax,STPath  jmp .boxselected.notBox6  cmp dword[GUIInputBox],7  jne .notBox7  mov eax,GNextPath  jmp .boxselected.notBox7  cmp dword[GUIInputBox],8  jne .notBox8  mov eax,FEOEZPath  jmp .boxselected.notBox8  cmp dword[GUIInputBox],9  jne .notBox9  mov eax,SJNSPath  jmp .boxselected.notBox9  cmp dword[GUIInputBox],10  jne .notBox10  mov eax,MDHPath  jmp .boxselected.notBox10  cmp dword[GUIInputBox],11  jne .notBox11  mov eax,SPL4Path  jmp .boxselected.notBox11%ifndef __MSDOS__  cmp dword[GUIInputBox],12  jne .notBox12  mov eax,GUICustomX  jmp .boxselected.notBox12  cmp dword[GUIInputBox],13  jne .notBox13  mov eax,GUICustomY  jmp .boxselected.notBox13%endif  cmp dword[GUIInputBox],14  jne .notBox14  mov eax,GUIMovieForcedText  jmp .boxselected.notBox14.boxselected  mov ecx,eax%ifdef __WIN32__  ;Look for paste request  cmp byte[ctrlptr],0  je .nopaste  cmp dh,56h ;V  jne .nopaste  mov [CBBuffer],ecx  mov eax,[GUIInputLimit]  mov [CBLength],eax  pushad  call PasteClipBoard  popad  xor dx,dx  ret.nopaste%endif  ;Find end of string.findend  cmp byte[eax],0  je .foundend  inc eax  jmp .findend.foundend  cmp dh,8    ;Backspace  jne .notbackspace  cmp eax,ecx  je .cantback  mov byte[eax-1],0.cantback  xor dx,dx  ret.notbackspace  cmp dh,13    ;Enter  jne .notenter  mov dword[GUIInputBox],0  pushad  call init_save_paths  call SetMovieForcedLength%ifndef __MSDOS__  call SetCustomXY%endif  popad  xor dx,dx  ret.notenter  ;check if we're at the end  add ecx,dword[GUIInputLimit]  cmp eax,ecx  jne .stillroom  xor dx,dx  ret.stillroom  mov [eax],dh  xor dx,dx.nokeypressed  retSECTION .bssGUIInputBox resd 1GUIInputLimit resd 1SECTION .textGUIMovieKeys:  ToUpperASM  call GUIPathKeys  cmp dh,9  jne near .notab  cmp byte[MovieProcessing],1  jae .notab  KeyTabInc GUIMovieTabs,GUIDumpingTab.notab  GUIKeyButtonHole CMovieExt,'v','0'         ; Select Radio Buttons  GUIKeyButtonHole CMovieExt,'1','1'  GUIKeyButtonHole CMovieExt,'2','2'  GUIKeyButtonHole CMovieExt,'3','3'  GUIKeyButtonHole CMovieExt,'4','4'  GUIKeyButtonHole CMovieExt,'5','5'  GUIKeyButtonHole CMovieExt,'6','6'  GUIKeyButtonHole CMovieExt,'7','7'  GUIKeyButtonHole CMovieExt,'8','8'  GUIKeyButtonHole CMovieExt,'9','9'  cmp dword[GUIMovieTabs],1  jne near .nocontrols  GUIKeyButtonHole MovieStartMethod,0,'N'   ; Start From Radio Buttons  GUIKeyButtonHole MovieStartMethod,1,'P'  GUIKeyButtonHole MovieStartMethod,2,'R'  GUIKeyButtonHole MovieStartMethod,3,'S'  GUIKeyButtonHole MZTForceRTR,0,'M'   ; Start From Radio Buttons  GUIKeyButtonHole MZTForceRTR,1,'C'  GUIKeyButtonHole MZTForceRTR,2,'B'  GUIKeyCheckbox MovieDisplayFrame,'D'      ; Checkbox.nocontrols  cmp dword[GUIDumpingTab],1  jne near .nodumping  GUIKeyButtonHole MovieVideoMode,0,'O'  GUIKeyButtonHole MovieVideoMode,1,'W'  GUIKeyButtonHole MovieVideoMode,2,'F'  GUIKeyButtonHole MovieVideoMode,3,'L'  GUIKeyButtonHole MovieVideoMode,4,'X'  GUIKeyButtonHole MovieVideoMode,5,'C'  GUIKeyCheckbox MovieAudio,'A'  GUIKeyCheckbox MovieVideoAudio,'V'  GUIKeyCheckbox MovieAudioCompress,'M'  GUIKeyButtonHole MovieForcedLengthEnabled,0,'Z'  GUIKeyButtonHole MovieForcedLengthEnabled,1,'R'  GUIKeyButtonHole MovieForcedLengthEnabled,2,'U'.nodumping  retGUIComboKeys:  ; Calculate Position  xor eax,eax.nozero  cmp byte[GUIComboTextH+eax],0  je .zero  inc eax  jmp .nozero.zero  mov [GUIComboPos],al  cmp dh,8  jne .nobacksp  cmp byte[GUIComboPos],0  je .nochar  mov byte[GUICCFlash],0  xor eax,eax  mov al,[GUIComboPos]  dec eax  mov byte[GUIComboTextH+eax],0  ret.nobacksp  cmp dh,0  je .nochar  cmp dh,13  je .nochar  cmp byte[GUIComboPos],19  je .nochar  xor eax,eax  mov byte[GUICCFlash],0  mov al,[GUIComboPos]  mov [GUIComboTextH+eax],dh.nochar  retGUICheatKeys:  cmp dword[GUIcurrentcheatwin],1  je near .textboxa  cmp dword[GUIcurrentcheatwin],2  je near .textboxb  ToUpperASM  cmp dh,'R'               ; Hotkeys  jne .noremocheat  jmp CheatCodeRemove.noremocheat  cmp dh,'T'  jne .notoggcheat  jmp CheatCodeToggle.notoggcheat  cmp dh,'S'  jne .nosavecheat  jmp CheatCodeSave.nosavecheat  cmp dh,'L'  jne .noloadcheat  jmp CheatCodeLoad.noloadcheat  cmp dh,'F'  jne .nofixcheat  jmp CheatCodeFix.nofixcheat  cmp dh,'A'  jne .noauto  xor byte[AutoLoadCht],1.noauto;Main Cheat Box  cmp dword[NumCheats],0  jne .nozero  ret.nozero%ifdef __UNIXSDL__  cmp al,89  je .homepressed  cmp dword[numlockptr],1  je .nohome  cmp al,71  jne .nohome.homepressed%else  cmp al,71  jne .nohome%endif  mov dword[GUIcurrentcheatcursloc],0  mov dword[GUIcurrentcheatviewloc],0  ret.nohome%ifdef __UNIXSDL__  cmp al,89  je .endppressed  cmp dword[numlockptr],1  je .noendp  cmp al,79  jne .noendp.endppressed%else  cmp al,79  jne .noendp%endif  mov eax,[NumCheats]  dec eax  mov [GUIcurrentcheatcursloc],eax  sub eax,11  mov [GUIcurrentcheatviewloc],eax  test dword[GUIcurrentcheatviewloc],8000000h  jz .posve  mov dword[GUIcurrentcheatviewloc],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[GUIcurrentcheatcursloc],0  je .noup  mov ebx,[GUIcurrentcheatcursloc]  cmp [GUIcurrentcheatviewloc],ebx  jne .noviewdec  dec dword[GUIcurrentcheatviewloc].noviewdec  dec dword[GUIcurrentcheatcursloc].noup%ifdef __UNIXSDL__  cmp al, 96  je .downpressed  cmp dword[numlockptr],1  je .nodown  cmp al,80  jne .nodown.downpressed%else  cmp al,80  jne .nodown%endif  mov ebx,[GUIcurrentcheatcursloc]  inc ebx  cmp ebx,[NumCheats]  jae .noviewinc  inc dword[GUIcurrentcheatcursloc]  sub ebx,12  cmp ebx,[GUIcurrentcheatviewloc]  jne .noviewinc  inc dword[GUIcurrentcheatviewloc].noviewinc.nodown%ifdef __UNIXSDL__  cmp al,91  je .pageuppressed  cmp dword[numlockptr],1  je .nopageup  cmp al,73  jne .nopageup.pageuppressed%else  cmp al,73  jne .nopageup%endif  sub dword[GUIcurrentcheatviewloc],12  sub dword[GUIcurrentcheatcursloc],12  test dword[GUIcurrentcheatviewloc],8000000h  jz .posv  mov dword[GUIcurrentcheatviewloc],0.posv  test dword[GUIcurrentcheatcursloc],8000000h  jz .posc  mov dword[GUIcurrentcheatcursloc],0.posc.nopageup%ifdef __UNIXSDL__  cmp al, 97  je .pagednpressed  cmp dword[numlockptr],1  je .nopagedown  cmp al,81  jne .nopagedown.pagednpressed%else  cmp al,81  jne .nopagedown%endif  add dword[GUIcurrentcheatviewloc],12  add dword[GUIcurrentcheatcursloc],12  mov ebx,[NumCheats]  dec ebx  cmp dword[GUIcurrentcheatcursloc],ebx  jb .poscd  mov [GUIcurrentcheatcursloc],ebx.poscd  sub ebx,11  cmp dword[GUIcurrentcheatviewloc],ebx  jl .posvd  test ebx,8000000h  jz .noneg  mov ebx,0.noneg  mov [GUIcurrentcheatviewloc],ebx.posvd.nopagedown  ret;Enter Code Input Box.textboxa  cmp byte[GUICheatPosA],0  je near .nobacksp  cmp dh,9  je .yesret  cmp dh,13  jne near .noret.yesret  cmp byte[GUICheatPosA],2  jne near .nocodemod  mov byte[GUICheatPosA],0  mov esi,[GUIcurrentcheatcursloc]  shl esi,5  sub esi,[GUIcurrentcheatcursloc]  sub esi,[GUIcurrentcheatcursloc]  sub esi,[GUIcurrentcheatcursloc]  sub esi,[GUIcurrentcheatcursloc]  add esi,cheatdata  mov al,[GUICheatTextZ1]  cmp al,'a'  jae .lowletter  cmp al,'A'  jae .letter  sub al,'0'  jmp .num.lowletter  sub al,'a'-10  jmp .num.letter  sub al,'A'-10.num  mov ah,[GUICheatTextZ1+1]  cmp ah,'a'  jae .lowletter2  cmp ah,'A'  jae .letter2  sub ah,'0'  jmp .num2.lowletter2  sub ah,'a'-10  jmp .num2.letter2  sub ah,'A'-10.num2  shl al,4  and ah,0Fh  or al,ah  mov [esi+1],al  mov word[GUICheatTextZ1],0  pushad  call EnableCheatCodeNoPrevMod  popad  jmp .noret.nocodemod  inc dword[GUIcurrentcheatwin]  mov byte[GUICCFlash],0.noret  cmp dh,8  jne .nobacksp  mov byte[GUICCFlash],0  dec byte[GUICheatPosA]  xor eax,eax  mov al,[GUICheatPosA]  mov byte[GUICheatTextZ1+eax],'_'  mov byte[GUICheatTextZ1+eax+1],0  ret.nobacksp  cmp dh,0  je .nochar  cmp dh,13  je .nochar  cmp dh,8  je .nochar  cmp dh,9  je .nochar  cmp byte[GUICheatPosA],14  je .nochar  mov byte[GUICCFlash],0  xor eax,eax  mov al,[GUICheatPosA]  mov [GUICheatTextZ1+eax],dh  mov byte[GUICheatTextZ1+eax+1],'_'  mov byte[GUICheatTextZ1+eax+2],0  inc byte[GUICheatPosA].nochar  ret;Description Input Box.textboxb  cmp dh,13  jne .noretb  mov byte[GUICCFlash],0  jmp ProcessCheatCode.noretb  cmp byte[GUICheatPosB],0  je .nobackspb  cmp dh,8  jne .nobackspb  mov byte[GUICCFlash],0  dec byte[GUICheatPosB]  xor eax,eax  mov al,[GUICheatPosB]  mov byte[GUICheatTextZ2+eax],'_'  mov byte[GUICheatTextZ2+eax+1],0  ret.nobackspb  cmp dh,0  je .nocharb  cmp dh,13  je .nocharb  cmp dh,8  je .nocharb  cmp byte[GUICheatPosB],18  je .nocharb  xor eax,eax  mov byte[GUICCFlash],0  mov al,[GUICheatPosB]  mov [GUICheatTextZ2+eax],dh  mov byte[GUICheatTextZ2+eax+1],'_'  mov byte[GUICheatTextZ2+eax+2],0  inc byte[GUICheatPosB].nocharb  ret%macro CompareKeyMacro 3  cmp dh,%1  jne %%skip  mov byte[%2],%3%%skip%endmacroInsertSearchCharacter:  push edx  push eax  ; Send character into CSInputDisplay  ; Find location  mov ecx,CSInputDisplay.next  cmp byte[ecx],0  je .found  cmp byte[ecx],'_'  je .found  inc ecx  jmp .next.found  ; Delete if necessary  cmp dh,8  jne .notdelete  cmp ecx,CSInputDisplay  je near .done  dec ecx  jmp .placecursor.notdelete  cmp ecx,CSInputDisplay+10  je near .done  ; Add character if necessary  cmp dh,'0'  jb near .done  cmp dh,'9'  jbe .okay  cmp byte[CheatSrcByteBase],0  je near .done  cmp dh,'F'  ja near .done  cmp dh,'A'  jb near .done.okay  mov [ecx],dh  inc ecx  ; Process cursor if over the window.placecursor  mov byte[ecx],'_'  mov byte[ecx+1],0  mov byte[CSOverValue],0  ; Find overall value and delete if over  mov ecx,CSInputDisplay  mov ebx,10  cmp byte[CheatSrcByteBase],0  je .dec  mov ebx,16.dec  xor eax,eax.next2  cmp byte[ecx],0  je .found2  cmp byte[ecx],'_'  je .found2  mul ebx  or edx,edx  jz .notoverflow  mov byte[CSOverValue],1.notoverflow  xor edx,edx  mov dl,[ecx]  cmp dl,'A'  jb .below  sub dl,'A'-10-'0'.below  sub dl,'0'  add eax,edx  jnc .notoverflowb  mov byte[CSOverValue],1.notoverflowb  inc ecx  jmp .next2.found2  xor ebx,ebx  mov bl,[CheatSrcByteSize]  mov ebx,[SrcMask+ebx*4]  mov [CSCurValue],eax  cmp eax,ebx  jbe .done  mov byte[CSOverValue],1.done  pop eax  pop edx  retSECTION .bssCSOverValue resb 1CSCurValue  resd 1SECTION .textInsertSearchDescription:  mov eax,CSDescDisplay  xor dl,dl.next  cmp byte[eax],0  je .fin  inc eax  inc dl  jmp .next.fin  or dl,dl  jz .nobackspb  cmp dh,8  jne .nobackspb  mov byte[eax-1],0  ret.nobackspb  cmp dh,0  je .nocharb  cmp dh,13  je .nocharb  cmp dh,8  je .nocharb  cmp dl,18  je .nocharb  mov [eax],dh  mov byte[eax+1],0.nocharb  retGUICheatSearchKeys:  ToUpperASM  cmp byte[CheatWinMode],3  je near .add  cmp byte[CheatWinMode],2  je near .view  cmp byte[CheatWinMode],1  je near .search  CompareKeyMacro '1',CheatSrcByteSize,0    ; Main Menu  CompareKeyMacro '2',CheatSrcByteSize,1  CompareKeyMacro '3',CheatSrcByteSize,2  CompareKeyMacro '4',CheatSrcByteSize,3  CompareKeyMacro 'D',CheatSrcByteBase,0  CompareKeyMacro 'H',CheatSrcByteBase,1  CompareKeyMacro 'E',CheatSrcSearchType,0  CompareKeyMacro 'C',CheatSrcSearchType,1  cmp dh,13                ; Start Button  je .start  cmp dh,'S'  jne .notstart.start  call CheatCodeSearchInit  ret.notstart  ret.search                           ; Shortcuts for Select Comparison  cmp byte[CheatSrcSearchType],1  je .compare  call InsertSearchCharacter  jmp .nomovedown.compare  cmp dh,','  je .lessthan  cmp dh,'N'  jne .notlessthan.lessthan  mov byte[CheatCompareValue],0.notlessthan  cmp dh,'.'  je .greaterthan

⌨️ 快捷键说明

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