Netplay code (mostly) removed, still need some help on EXTSYMs and port-dependant stuff.

This commit is contained in:
grinvader
2005-04-09 08:40:31 +00:00
parent f488c07ed4
commit 991588a89a
21 changed files with 38 additions and 5480 deletions

View File

@@ -68,7 +68,7 @@
%include "macros.mac"
EXTSYM curblank,vidpastecopyscr,frameskip,newengen,vsyncon
EXTSYM cvidmode,antienab, smallscreenon, smallscreence,NetQuit
EXTSYM cvidmode,antienab, smallscreenon, smallscreence
EXTSYM soundon,StereoSound,SoundQuality,MusicRelVol
EXTSYM endprog,continueprog,spcBuffera,spcRamcmp,cbitmode,makepal
EXTSYM t1cc,LoadDir,LoadDrive,SRAMDir,SRAMChdir,SRAMDirCurDir,initsnes
@@ -104,7 +104,7 @@ EXTSYM GUIFName,GUICName
EXTSYM printnum
EXTSYM MMXCheck
EXTSYM SaveCombFile
EXTSYM NetSent,valuea
EXTSYM valuea
EXTSYM showinfogui
EXTSYM BackupCVFrame, tempedx, tempesi, tempedi, tempebp
EXTSYM Wait1SecWin,ClearUDPStuff
@@ -113,7 +113,7 @@ EXTSYM BackStateSize
EXTSYM ResetExecStuff
EXTSYM RestoreCVFrame
EXTSYM clearSPCRAM
EXTSYM CurRecv,BackState,CBackupPos,PBackupPos,PPValue,DPValue,NetQuitter
EXTSYM CurRecv,BackState,CBackupPos,PBackupPos,PPValue,DPValue
EXTSYM LatencyV
EXTSYM LatencyRecvPtr,LatencySendPtr
EXTSYM NumofBanks
@@ -199,15 +199,6 @@ EXTSYM PreparePacketIPX,SendPacketIPX,ipxgetchar,ipxsendchar
SECTION .data
; ProcessRemoteCommand
; NetLoadStuff ; Send 14 to initiate, Send 15 to cancel (either way)
; call PreparePacket
; mov al,253
; call RemoteSendChar
; call SendPacket
; NetAddChar
NEWSYM WaterOn, db 1
; Things to do :
@@ -667,20 +658,10 @@ NEWSYM ForceHiLoROM, resb 1
NEWSYM CombinDataGlob, resb 3300 ; 20-name, 42-combo, 2-key#, 1-P#, 1-ff
NEWSYM CombinDataLocl, resb 3300
section .data
NEWSYM CmdLineNetPlay, db 0
NEWSYM CmdLineTCPIPAddress, times 29 db 0
section .bss
GUIwinorder resb 18
GUIwinpos resb 18
GUIwinactiv resb 18
DialNumber resb 40
ViewBuffer resb 50*32
NEWSYM ModemInitStat, resb 1
ModemProcess resb 1 ; Shows current dial/answer process
ModemPTimer resd 1 ; Timer for modem process
ModemOKStat resb 1 ; OK is detected on modem status
SECTION .data ; Window sizes and positions
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO CHIP PATH SAVE
@@ -747,12 +728,6 @@ NEWSYM CheatBDoor, resb 1
NEWSYM ShowTimer, resb 1
NEWSYM MousePRClick, resb 1
NEWSYM MouseDis, resb 1
NEWSYM NetPlayNoMore, resb 1
NEWSYM NetChatFirst, resb 1
NEWSYM NetServer, resb 1
NEWSYM NetQuitAfter, resb 1
NEWSYM NetNewNick, resb 16
NEWSYM NetFilename, resb 512
NEWSYM CheatOn, resd 1
NEWSYM NumCheats, resd 1
@@ -769,28 +744,7 @@ NEWSYM numdrives, dd 26
SubPalTable times 256 db 1 ; Corresponding Gray Scale Color
SECTION .bss
WhichRemote resd 1 ; Modem = 1, IPX = 2, TCP/IP = 4
Connected resd 1
IDCheckPos resd 1
NEWSYM pl1neten, resb 1
NEWSYM pl2neten, resb 1
NEWSYM pl3neten, resb 1
NEWSYM pl4neten, resb 1
NEWSYM pl5neten, resb 1
NEWSYM cnetplaybuf, resb 512
NEWSYM cnetptrhead, resd 1
NEWSYM cnetptrtail, resd 1
NEWSYM prevp1net, resd 1
NEWSYM prevp2net, resd 1
NEWSYM prevp3net, resd 1
NEWSYM prevp4net, resd 1
NEWSYM prevp5net, resd 1
NEWSYM netdelayed, resb 1
NEWSYM ChatProgress,resd 1
NEWSYM RecvProgress,resd 1
NEWSYM IPXInfoStr, resw 1
NEWSYM IPXInfoStrR, resw 1
NEWSYM GUICMessage, resd 1
NEWSYM GUICTimer, resd 1
NEWSYM GUIOn, resb 1
@@ -801,9 +755,6 @@ NEWSYM MotionBlur, resb 1
NEWSYM StartLL, resd 1
NEWSYM StartLR, resd 1
NEWSYM LatencyVal, resb 32
NEWSYM NetLoadState, resb 1
NEWSYM TRVal, resw 1
NEWSYM TGVal, resw 1
@@ -996,20 +947,6 @@ NEWSYM GUIRestoreVars
mov [smallscreenon],al
mov al,[GUIScreenScale]
mov [ScreenScale],al
cmp byte[CmdLineNetPlay],0
je .nocmdlinenetplay
mov ecx,28/4
mov esi,CmdLineTCPIPAddress
mov edi,TCPIPAddress
.netplayloop
mov eax,[esi]
add esi,byte 4
mov [edi],eax
add edi,byte 4
dec ecx
jnz .netplayloop
xor eax,eax
.nocmdlinenetplay
call CalcChecksum
cmp byte[TimeChecker],bl
jne .nottimer
@@ -1145,10 +1082,6 @@ NEWSYM GUIinit36_4hz
NEWSYM GUI36hzcall
inc dword[GUIt1cc]
inc dword[SnowMover]
cmp dword[ModemPTimer],0
je .nodec5
dec dword[ModemPTimer]
.nodec5
cmp dword[GUIEditStringLTxt],0
je .nodec
dec dword[GUIEditStringLTxt]
@@ -1177,8 +1110,6 @@ NEWSYM GUI36hzcall
and byte[GUICCFlash],0Fh
inc byte[GUILDFlash]
and byte[GUILDFlash],0Fh
inc byte[GUINetTextm2+2]
and byte[GUINetTextm2+2],0Fh
ret
%ifdef __MSDOS__
@@ -1309,21 +1240,8 @@ LoadDetermine:
mov byte[GUICheatMenuData+14],1
mov byte[GUICheatMenuData+14*2],1
mov byte[GUIMiscMenuData+14*2],1
cmp byte[CheatBDoor],1
je .nomodem
cmp byte[CNetType],21
je .modem
cmp byte[CNetType],22
je .modem
cmp byte[CNetType],20
jne .nomodem
.modem
mov byte[GUICheatMenuData],2
mov byte[GUICheatMenuData+14],2
mov byte[GUICheatMenuData+14*2],2
.nomodem
cmp byte[romloadskip],0
je .noromloaded2
je .noromloaded
mov byte[GUIGameMenuData+14],2
mov byte[GUIGameMenuData+14*2],2
mov byte[GUIGameMenuData+14*4],2
@@ -1333,7 +1251,6 @@ LoadDetermine:
mov byte[GUICheatMenuData+14],2
mov byte[GUICheatMenuData+14*2],2
mov byte[GUIMiscMenuData+14*2],2
.noromloaded2
.noromloaded
ret
@@ -1601,28 +1518,6 @@ section .text
div ebx
%endmacro
NEWSYM TestSent
mov eax,[NetSent]
xor edx,edx
mov ebx,16
div ebx
ProcessOneDigit 3
ProcessOneDigit 2
ProcessOneDigit 1
ProcessOneDigit 0
mov eax,[valuea]
xor edx,edx
mov ebx,16
div ebx
ProcessOneDigit 8
ProcessOneDigit 7
ProcessOneDigit 6
ProcessOneDigit 5
mov dword[GUICMessage],.message
mov dword[GUICTimer],100000
ret
SECTION .data
.message db 0,0,0,0,' ',0,0,0,0,0,0,0
SECTION .text
@@ -1858,84 +1753,6 @@ NEWSYM StartGUI
mov ebx,LoadDir
call Change_Dir
cmp byte[NetFilename],0
je near .nofilenamenet
cmp byte[NetChatFirst],0
je near .filenamenetb
mov ebx,NetFilename
xor ecx,ecx
.fnetloop
cmp byte[ebx],'\'
jne .fnetloopb
mov ecx,ebx
.fnetloopb
inc ebx
cmp byte[ebx],0
jne .fnetloop
or ecx,ecx
jz near .nofilenamenet
mov byte[ecx],0
push ecx
mov dl,[LoadDrive]
cmp byte[NetFilename+1],':'
jne .nodrivenetb
mov dl,[NetFilename]
sub dl,'A'
.nodrivenetb
mov ebx,NetFilename
call Change_Dir
pop ecx
mov ebx,NetFilename
inc ecx
.nextnetl
mov al,[ecx]
mov [ebx],al
inc ecx
inc ebx
or al,al
jnz .nextnetl
jmp .nofilenamenet
.filenamenetb
mov dl,[LoadDrive]
cmp byte[NetFilename+1],':'
jne .nodrivenet
mov dl,[NetFilename]
sub dl,'A'
.nodrivenet
mov ebx,NetFilename
call Change_Dir
mov byte[NetFilename],0
.nofilenamenet
cmp byte[NetServer],0
je .noserverclient
mov byte[CNetType],15
mov byte[ModemProcess],40
cmp byte[NetServer],2
jne .noclient
mov byte[ModemProcess],41
.noclient
mov byte[NetServer],0
mov byte[WhichRemote],4
mov byte[GUIcmenupos],0
mov byte[GUIcrowpos],0
call loadnetopen
.noserverclient
cmp byte[NetNewNick],0
je .nonewnick
mov ebx,NetNewNick
mov ecx,ChatNick
.nickloop
mov al,[ebx]
mov [ecx],al
inc ebx
inc ecx
or al,al
jnz .nickloop
mov byte[NetNewNick],0
.nonewnick
cmp byte[CNetType],20
je near .noautostate
cmp byte[AutoState],0
je .noautostate
cmp byte[romloadskip],0
@@ -1945,106 +1762,6 @@ NEWSYM StartGUI
GUIInitIRQs
cmp byte[CNetType],20
jne near .nostat20
test byte[NetQuit],80h
jnz near .nostat20
mov byte[GUIcmenupos],0
mov byte[GUIcrowpos],0
call loadnetopen
%ifdef __MSDOS__
cmp byte[WhichRemote],1
jne .yesdcd
call ModemCheckDCD
cmp al,1
jne near .nostat20
.yesdcd
%endif
mov byte[RestoreValues],1
mov [tempedx],edx
mov [tempesi],esi
mov [tempedi],edi
mov [tempebp],ebp
pushad
mov dword[CBackupPos],0
call BackupCVFrame
popad
call DisableSUDPPacket
call Wait1SecWin
; sync
call PreparePacket
mov al,254
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,254
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,254
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,254
call RemoteSendChar
call SendPacket
mov dword[ModemPTimer],4*32
.nochar
pushad
call JoyRead
popad
call RemoteGetChar
cmp dword[ModemPTimer],0
je near .nostat20
cmp dh,0
je .nochar
cmp dl,254
jne .nochar
call PreparePacket
mov al,253
call RemoteSendChar
call SendPacket
.nocharc
pushad
call JoyRead
popad
call RemoteGetChar
cmp dword[ModemPTimer],0
je near .nostat20
cmp dh,0
je .nocharc
cmp dl,253
jne .nocharc
call PreparePacket
mov al,1
call RemoteSendChar
call SendPacket
call ClearUDPStuff
mov byte[RemoteCommand],1
mov byte[HoldCommand],1
cmp byte[NetLoadState],1
jne .notreceive
mov byte[CNetType],22
.noreceivestate
pushad
call JoyRead
popad
call RemoteGetChar
cmp dh,0
je .noreceivestate
cmp dl,14
jne .noreceivestate
call loadstaterecvinit
.notreceive
cmp byte[NetLoadState],2
jne .notsend
call NetLoadStuff
.notsend
.nostat20
cmp byte[GUIwinptr],0
jne .nomenuopen
cmp byte[lastcursres],1
@@ -2100,13 +1817,6 @@ NEWSYM StartGUI
mov byte[GUIQuit],0
.nokey
cmp byte[CNetType],21
je .noquit
cmp byte[CNetType],22
jne .yesquit
.noquit
mov byte[GUIQuit],0
.yesquit
cmp byte[GUIQuit],2
je near .exit
cmp byte[GUIQuit],1
@@ -2121,12 +1831,6 @@ NEWSYM StartGUI
.notrouble
.mousedis2
call GUIUnBuffer
cmp byte[CNetType],20
je .nowater
cmp byte[CNetType],21
je .nowater
cmp byte[CNetType],22
je .nowater
cmp byte[GUIEffect],1
jne .nosnow
call DrawSnow
@@ -2144,99 +1848,6 @@ NEWSYM StartGUI
; call DrawSmoke
call DrawBurn
.nosmoke
; call TestSent
cmp byte[CNetType],20
jne .noreceive
cmp byte[NetChatFirst],0
je .noloadbeforechat
mov eax,NetFilename
call GUIloadfilename.nocnettype
mov byte[sramsavedis],1
call transfersram
mov byte[NetChatFirst],0
.noloadbeforechat
cmp byte[GUIcmenupos],0
jne .nomenuout2
cmp byte[GUIwinptr],0
jne .nomenuout2
cmp byte[netlastloaded],1
je .openmenu
mov byte[GUIcmenupos],2
mov byte[GUIcrowpos],0
jmp .nomenuout2
.openmenu
mov byte[netlastloaded],0
call loadnetopen
.nomenuout2
call RemoteGetChar
cmp dh,0
jne .received
mov dl,1
.received
call ProcessRemoteCommand
jmp .noreceive2
.noreceive
mov byte[HoldCommand],0
.noreceive2
cmp byte[CNetType],21
jne .noloadstatesend
call loadstatesend
.noloadstatesend
cmp byte[CNetType],22
jne .noloadstaterecv
call loadstaterecv
.noloadstaterecv
cmp byte[CNetType],15
je .modem
cmp byte[CNetType],12
je .modem
cmp byte[CNetType],11
je .modem
cmp byte[CNetType],10
jne near .nomodem
.modem
call ProcessModem
%ifdef __MSDOS__
cmp byte[Connected],1
je near .nomodem
call ModemGetChar
cmp dh,0
je .nomodem
cmp byte[ModemOKStat],0
jne .foundokay
mov byte[ModemOKStat],1
jmp .skipstat
.foundokay
cmp byte[ModemOKStat],1
jne .nostat0
cmp dl,13
jne .nostat0
inc byte[ModemOKStat]
jmp .skipstat
.nostat0
cmp byte[ModemOKStat],2
jne .nostat1
cmp dl,'O'
jne .nostat1
inc byte[ModemOKStat]
jmp .skipstat
.nostat1
cmp byte[ModemOKStat],3
jne .nostat2
cmp dl,'K'
jne .nostat2
inc byte[ModemOKStat]
jmp .skipstat
.nostat2
.skipstat
mov dh,0
call NetAddChar
%endif
.nomodem
cmp dword[GUIEditStringcWin],0
je .noblink
@@ -2281,24 +1892,7 @@ NEWSYM StartGUI
call vidpastecopyscr
call GUIgetcurrentinput
jmp .nokey
.exitgui
cmp byte[CNetType],20
jne near .nostat20b2
call PreparePacket
mov al,255
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,255
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,255
call RemoteSendChar
call SendPacket
.nostat20b2
GUIDeInitIRQs
mov ax,[PrevResoln]
@@ -2321,178 +1915,6 @@ NEWSYM StartGUI
.nomakepal
mov word[t1cc],1
mov byte[chaton],0
mov dword[chatstrL],0
mov dword[chatLpos],0
mov dword[chatstrR],0
mov dword[chatRTL],0
cmp byte[CNetType],20
jne near .nostat20b
mov al,10
sub al,[Latency]
cmp byte[Latency],4
jb .nolatency
mov al,7
.nolatency
mov [BackStateSize],al
call ResetExecStuff
mov byte[MultiTap],1
cmp byte[pl3neten],0
jne .mtap
cmp byte[pl4neten],0
jne .mtap
cmp byte[pl5neten],0
jne .mtap
.nomtap
mov byte[MultiTap],0
.mtap
cmp byte[RestoreValues],1
jne .norestoreval
pushad
mov dword[PBackupPos],0
call RestoreCVFrame
popad
mov esi,[tempesi]
mov edi,[tempedi]
mov ebp,[tempebp]
.norestoreval
mov dword[nmiprevaddrl],0
mov dword[nmiprevaddrh],0
mov dword[nmirept],0
mov dword[nmiprevline],224
mov dword[nmistatus],0
mov dword[spcnumread],0
mov dword[spchalted],-1
mov byte[NextLineCache],0
mov byte[DSPMem+08h],0
mov byte[DSPMem+18h],0
mov byte[DSPMem+28h],0
mov byte[DSPMem+38h],0
mov byte[DSPMem+48h],0
mov byte[DSPMem+58h],0
mov byte[DSPMem+68h],0
mov byte[DSPMem+78h],0
mov byte[netdelayed],0
mov dword[cnetptrhead],0
mov dword[cnetptrtail],0
mov dword[prevp1net],0
mov dword[prevp2net],0
mov dword[prevp3net],0
mov dword[prevp4net],0
mov dword[prevp5net],0
mov byte[BackState],1
mov dword[CBackupPos],0
mov dword[PBackupPos],0
mov dword[PPValue],0
mov dword[DPValue],0
mov byte[CurRecv],0
mov dword[NetQuitter],0
mov dword[LatencyV],0
mov dword[LatencyV+4],0
mov dword[LatencyV+8],0
mov dword[LatencyV+12],0
mov dword[LatencyRecvPtr],0
mov dword[LatencySendPtr],0
mov eax,cnetplaybuf
mov ecx,512
.loop20
mov byte[eax],0
inc eax
dec ecx
jnz .loop20
mov al,[Latency]
mov [LatencyLeft],al
mov byte[NetSwap],0
mov dword[CBackupPos],0
mov dword[PBackupPos],0
mov ebx,[romdata]
mov ecx,[NumofBanks]
shl ecx,15
xor eax,eax
or ecx,ecx
jz .nocsumloop
.csumloop
add al,[ebx]
adc ah,0
inc ebx
dec ecx
jnz .csumloop
.nocsumloop
mov [CheckSumVal],eax
mov ebx,eax
; sync with modem
call PreparePacket
mov al,30
call RemoteSendChar
mov al,230
call RemoteSendChar
mov al,[CheckSumVal]
call RemoteSendChar
mov al,[CheckSumVal+1]
call RemoteSendChar
call SendPacket
.nocharb
pushad
call JoyRead
popad
; cmp byte[pressed+1],1
; je near .faileda
call RemoteGetChar
cmp dh,0
je .nocharb
cmp dl,230
jne .nocharb
.nocharb2
call RemoteGetChar
cmp dh,0
je .nocharb2
cmp dl,[CheckSumVal]
jne .wrongcs
.nocharb3
call RemoteGetChar
cmp dh,0
je .nocharb3
cmp dl,[CheckSumVal+1]
je .okaychat
.wrongcs
mov esi,WrongCheckSum
call WritetochatBuffer
jmp StartGUI
.okaychat
call PreparePacket
mov al,229
call RemoteSendChar
call SendPacket
.nocharb5
pushad
call JoyRead
popad
; cmp byte[pressed+1],1
; je near .failedb
call RemoteGetChar
cmp dh,0
je .nocharb5
cmp dl,229
jne .nocharb5
.nostat20b
call EnableSUDPPacket
mov byte[ChatProgress],0
mov dword[RecvProgress],0
; get LoadDrive/LoadDir
mov ebx,LoadDir
mov edx,LoadDrive
@@ -2583,7 +2005,6 @@ NEWSYM StartGUI
mov byte[GUIReset],0
mov dword[StartLL],0
mov dword[StartLR],0
mov byte[NetLoadState],0
jmp continueprog
.faileda
@@ -3207,19 +2628,11 @@ GUITryMenuItem:
.dontquit
ret
.norun
cmp byte[CNetType],21
je near .noreset
cmp byte[CNetType],22
je near .noreset
GUICheckMenuItem 12, 2 ; Reset
cmp byte[GUIcrowpos],2
jne .noreset
mov byte[GUICResetPos],1
.noreset
cmp byte[CNetType],21
je near .noromloaded
cmp byte[CNetType],22
je near .noromloaded
cmp byte[GUIcrowpos],4
jne .nosavestate
mov byte[GUIStatesText5],0
@@ -3293,15 +2706,6 @@ GUITryMenuItem:
.noconfig
cmp byte[romloadskip],0
jne near .nocheat
cmp byte[CheatBDoor],1
je .yescheat
cmp byte[CNetType],20
je near .nocheat
cmp byte[CNetType],21
je near .nocheat
cmp byte[CNetType],22
je near .nocheat
.yescheat
cmp byte[GUIcmenupos],4
jne near .nocheat
GUICheckMenuItem 7, 0
@@ -3319,30 +2723,13 @@ GUITryMenuItem:
cmp byte[GUIcmenupos],5
jne near .nonet
%ifdef __MSDOS__
cmp byte[CNetType],10
jae .nomod
mov byte[CNetType],0
.nomod
GUICheckMenuItem 8, 0
GUICheckMenuItem 8, 1
cmp byte[CNetType],10
jae near .nonet
cmp byte[GUIcrowpos],1
jne .noipx
mov byte[CNetType],7
.noipx
cmp byte[GUIcrowpos],0
jne near .nonet
mov byte[CNetType],1
jmp .nonet
%endif
;.win32
GUICheckMenuItem 8, 0
cmp byte[CNetType],10
jae near .nonet
cmp byte[GUIcrowpos],0
jne near .nonet
mov byte[CNetType],4
call GetHostName
.nonet
cmp byte[GUIcmenupos],6
@@ -3546,11 +2933,6 @@ GUIProcStates:
popad
jmp .changedir
.loadstate
cmp byte[CNetType],20
jne .notnet
call NetLoadStuff
jmp .changedir
.notnet
pushad
call loadstate2
popad
@@ -3602,13 +2984,6 @@ GUIProcReset:
call GUIDoReset
.movieendif
popad
cmp byte[CNetType],20
jne .noreset
call PreparePacket
mov al,40
call RemoteSendChar
call SendPacket
mov byte[GUIQuit],0
.noreset
mov byte[GUICBHold],0
xor eax,eax

View File

@@ -138,10 +138,6 @@ UseExtKey resb 1
SECTION .text
GUIgetcurrentinput:
cmp byte[HoldCommand],2
jne .nohold
ret
.nohold
mov byte[UseExtKey],0
xor ch,ch
xor cl,cl
@@ -321,56 +317,6 @@ GUIgetcurrentinput:
dec eax
xor ebx,ebx
mov bl,[GUIwinorder+eax]
cmp ebx,8
jne near .nonetwin
cmp byte[CNetType],12
jne .noprocess7
cmp byte[ModemProcess],7
jne .noprocess7
cmp dh,13
je .ret
cmp dh,32
jb .noprocess7
.ret
%ifdef __MSDOS__
mov al,dh
call ModemSendChar
%endif
ret
.noprocess7
cmp dl,27
jne .nonetwin
cmp byte[CNetType],2
je .yesnetwin
cmp byte[CNetType],3
je .yesnetwin
cmp byte[CNetType],10
je .yesnetwin
cmp byte[CNetType],11
je .yesnetwin
cmp byte[CNetType],12
je .yesnetwin
cmp byte[CNetType],15
je .yesnet15
jmp .nonetwin
.yesnet15
mov byte[CNetType],0
%ifdef __MSDOS__
call deinitipx
.nodeinitipx
%endif
jmp .closewin
.yesnetwin
%ifdef __MSDOS__
cmp byte[ModemInitStat],0
je .nodeinitmodem
call DeInitModemC
mov byte[ModemInitStat],0
.nodeinitmodem
%endif
mov byte[CNetType],1
ret
.nonetwin
cmp ebx,13
jne .notcskeys
cmp byte[CheatWinMode],1
@@ -408,16 +354,6 @@ GUIgetcurrentinput:
je near GUIPathKeys
cmp ebx,20
je near GUISaveKeys
cmp ebx,8
jne .notstartmenu
cmp byte[CNetType],4
jne .notcpip
jmp GUITCPIPKeys
.notcpip
cmp byte[CNetType],1
jne .notstartmenu
jmp GUINetMenuKeys1
.notstartmenu
cmp ebx,8
je near GUIGetInputLine
ret
@@ -650,163 +586,8 @@ GUIgetcurrentinput:
ret
GUITCPIPKeys:
cmp byte[GUINetTextm2],1
je near .section2
mov edi,TCPIPAddress
mov esi,26
cmp byte[GUINetTextm2],2
jne .notsecondstring
mov edi,ChatNick
mov esi,9
.notsecondstring
mov ebx,edi
.next
cmp byte[ebx],0
je .done2
inc ebx
jmp .next
.done2
sub ebx,edi
mov [GUINetTextm2+1],bl
xor eax,eax
mov al,[GUINetTextm2+1]
shl al,2
add al,2
cmp dh,32
jbe .notnum2
cmp byte[GUINetTextm2],0
je .notsecondstringb
cmp dh,'_'
je .notsecondstringb
cmp dh,'-'
je .notsecondstringb
cmp dh,'^'
je .notsecondstringb
cmp dh,'='
je .notsecondstringb
cmp dh,'+'
je .notsecondstringb
cmp dh,'['
je .notsecondstringb
cmp dh,']'
je .notsecondstringb
cmp dh,'0'
jb .notnum2
cmp dh,'9'
jbe .notsecondstringb
cmp dh,'A'
jb .notnum2
cmp dh,'Z'
jbe .notsecondstringb
cmp dh,'a'
jb .notnum2
cmp dh,'z'
jbe .notsecondstringb
.notsecondstringb
cmp ebx,esi
jae near .donesection1
add ebx,edi
mov byte[ebx],dh
jmp .donesection1
.notnum2
cmp dh,8
jne .notbacksp
or ebx,ebx
jz near .donesection1
add ebx,edi
mov byte[ebx-1],0
jmp .donesection1
.notbacksp
cmp dh,'c'
je .yesc
cmp dh,'C'
jne .noc
.yesc
; mov byte[CNetType],15
; mov byte[ModemProcess],41
; mov byte[WhichRemote],4
.noc
cmp dh,'s'
je .yess
cmp dh,'S'
jne .nos
.yess
; mov byte[CNetType],15
; mov byte[ModemProcess],40
; mov byte[WhichRemote],4
.nos
.donesection1
ret
.section2
mov ebx,GUINetTextl2
.loopz
cmp byte[ebx],0
je .donez
inc ebx
jmp .loopz
.donez
cmp byte[GUINetTextl2],'0'
jne .notzerob
cmp byte[GUINetTextl2+1],0
jne .notzerob
dec ebx
.notzerob
cmp dh,'0'
jb .notnum
cmp dh,'9'
ja .notnum
mov byte[ebx],dh
mov byte[ebx+1],0
push ebx
call .convert
pop ebx
cmp ecx,65536
jb .donenumb
mov byte[ebx],0
.donenumb
jmp .donenum
.notnum
cmp dh,8
jne .donenum
cmp byte[GUINetTextl2],0
je .donenum
mov byte[ebx-1],0
.donenum
call .convert
cmp ecx,0
jne .notzero
mov byte[GUINetTextl2],'0'
mov byte[GUINetTextl2+1],0
.notzero
mov [TCPIPPortNum],ecx
ret
.convert
mov ebx,GUINetTextl2
xor ecx,ecx
.loop
cmp byte[ebx],0
je .done
mov eax,ecx
push ebx
mov ebx,10
mul ebx
pop ebx
mov ecx,eax
xor eax,eax
mov al,[ebx]
sub eax,48
add ecx,eax
inc ebx
jmp .loop
.done
ret
SECTION .data
NEWSYM TCPIPPortNum, dd 7845
SECTION .text
GUIOptionKeys:
cmp dh,'a'
jb .nocap
@@ -1569,116 +1350,9 @@ SECTION .data
SECTION .text
GUINetMenuKeys1:
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,'C'
jne .notconfig
mov byte[CNetType],2
.notconfig
cmp dh,'D'
jne .notdial
mov byte[CNetType],3
.notdial
cmp dh,'M'
jne .notmanual
mov byte[CNetType],12
mov byte[ModemProcess],0
%ifdef __MSDOS__
cmp byte[ModemInitStat],1
je .noinit
call InitModem
mov byte[ModemInitStat],1
.noinit
%endif
ret
.notmanual
cmp dh,'W'
jne .notwait
mov byte[CNetType],10
mov byte[ModemProcess],0
%ifdef __MSDOS__
cmp byte[ModemInitStat],1
je .noinit2
call InitModem
mov byte[ModemInitStat],1
.noinit2
%endif
ret
.notwait
ret
GUIGetInputLine:
cmp ebx,8
jne .nodial
cmp byte[CNetType],20
jne .nochat
cmp dh,13
jne .nochat
mov byte[RemoteCommand],2
ret
.nochat
cmp byte[CNetType],3
jne .nodial
cmp dh,13
jne .nodial
mov byte[CNetType],11
mov byte[ModemProcess],0
%ifdef __MSDOS__
cmp byte[ModemInitStat],1
je .noinit
call InitModem
mov byte[ModemInitStat],1
%endif
.noedit
ret
.noinit
.nodial
; search string for 0, record length of string
cmp dword[GUIEditString],0
je .noedit
mov eax,[GUIEditString]
xor ecx,ecx
dec ecx
.next
mov bl,[eax]
inc eax
inc ecx
cmp bl,0
jne .next
cmp byte[GUIEditStringcWin],0
je near .blinkstuff
cmp ecx,0
je .nodel
cmp dh,8
jne .nodel
mov byte[eax-2],0
dec eax
jmp .blinkstuff
.nodel
cmp ecx,[GUIEditStringmLen]
jne .notend
jmp .blinkstuff
.notend
cmp dh,'a'
jb .nocap
cmp dh,'z'
ja .nocap
sub dh,'z'-'Z'
.nocap
cmp dh,32
jb .noinsert
mov [eax-1],dh
mov byte[eax],0
inc eax
.noinsert
jmp .blinkstuff
.blinkstuff
dec eax
mov [GUIEditStringcLen],eax
ret
SECTION .bss

View File

@@ -174,46 +174,6 @@ netlastloaded resb 1
SECTION .text
GUIloadfilename:
cmp byte[CNetType],15
je .noload
cmp byte[CNetType],12
je .noload
cmp byte[CNetType],11
je .noload
cmp byte[CNetType],10
je .noload
cmp byte[CNetType],21
je .noload
cmp byte[CNetType],22
jne .yesload
.noload
ret
.yesload
cmp byte[CNetType],20
jne near .nocnettype
mov byte[netlastloaded],1
cmp byte[GUIcmenupos],1
jne .nomenuout
mov byte[GUIcmenupos],0
.nomenuout
mov esi,FileNameMod
.nextfnc
mov cl,[eax]
mov [esi],cl
inc eax
inc esi
cmp cl,0
jne .nextfnc
mov byte[RemoteCommand],10
pushad
call GUIQuickLoadUpdate
popad
ret
.nocnettype
cmp byte[CNetType],20
je .okay20
; ret
.okay20
mov esi,eax
; find length of string & copy filename
xor cl,cl
@@ -318,8 +278,6 @@ GUIloadfilename:
call GUIQuickLoadUpdate
cmp byte[AutoLoadCht],0
je .nocheatload
cmp byte[CNetType],20
je .nocheatload
; change dir to LoadDrive/LoadDir
mov dl,[LoadDrive]
mov ebx,LoadDir

View File

@@ -698,73 +698,6 @@ ProcessMouseButtons:
call AddCSCheatCode
; call InsertSearchDescription
.noinsertscc
cmp byte[GUICBHold],21
jne .nomodem1
mov byte[CNetType],3
.nomodem1
cmp byte[GUICBHold],22
jne .nomodem2
mov byte[CNetType],10
mov byte[ModemProcess],0
.nomodem2
cmp byte[GUICBHold],23
jne .nomodem3
mov byte[CNetType],2
.nomodem3
cmp byte[GUICBHold],24
jne .nomodem4
mov byte[CNetType],12
mov byte[ModemProcess],0
.nomodem4
cmp byte[GUICBHold],25
jne .nomodem4b
mov byte[CNetType],15
mov byte[ModemProcess],40
mov byte[WhichRemote],4
.nomodem4b
cmp byte[GUICBHold],26
jne .nomodem4c
mov byte[CNetType],15
mov byte[ModemProcess],41
mov byte[WhichRemote],4
.nomodem4c
cmp byte[GUICBHold],27
jne .noinit
cmp byte[CNetType],20
jne near .nostat20b2
call PreparePacket
mov al,255
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,255
call RemoteSendChar
call SendPacket
call PreparePacket
mov al,255
call RemoteSendChar
call SendPacket
cmp byte[NetQuitAfter],0
je .nostat20b2
mov byte[GUIQuit],1
.nostat20b2
call RemoteDeInit
.noinit
cmp byte[GUICBHold],28
jne .nomodem5
mov byte[CNetType],11
mov byte[ModemProcess],0
.nomodem5
cmp byte[GUICBHold],34
jne .noipx1
mov byte[WhichRemote],2
mov byte[ModemProcess],30
mov byte[CNetType],15
.noipx1
cmp byte[GUICBHold],64
jne .nostatecancel
mov byte[NetStateQuit],1
.nostatecancel
cmp byte[GUICBHold],65
jne .nohomepage
call GotoHomepage
@@ -2634,96 +2567,6 @@ DisplayGUICheatClick:
ret
DisplayNetOptnsClick:
cmp byte[CNetType],1
jne near .nomodem
GUIPHoldbutton 5,15,89,26,21
GUIPHoldbutton 5,30,89,41,22
GUIPHoldbutton 5,45,89,56,23
GUIPHoldbutton 5,60,89,71,24
.nomodem
cmp byte[CNetType],2
jne near .nomodemc
GUIPButtonHole2 9,25,byte[ComNum],1,byte[ComIRQ],4
GUIPButtonHole2 9,35,byte[ComNum],2,byte[ComIRQ],3
GUIPButtonHole2 9,45,byte[ComNum],3,byte[ComIRQ],4
GUIPButtonHole2 9,55,byte[ComNum],4,byte[ComIRQ],3
GUIPButtonHole 94,25,byte[BaudRate],0
GUIPButtonHole 94,35,byte[BaudRate],1
GUIPButtonHole 94,45,byte[BaudRate],2
GUIPButtonHole 94,55,byte[BaudRate],3
GUIPButtonHole 94,65,byte[BaudRate],4
GUIPButtonHole 94,75,byte[BaudRate],5
GUIPButtonHole 94,85,byte[BaudRate],6
GUIPButtonHole 9,85,byte[GUIDialSt+3],'T'
GUIPButtonHole 9,95,byte[GUIDialSt+3],'P'
GUIPHoldbutton2 55,69,63,79,25,byte[ComIRQ],1,15
GUIPHoldbutton2 66,69,74,79,26,byte[ComIRQ],-1,2
GUITextBoxInput 21,125,175,133,GUIInitSt1,24
GUITextBoxInput 21,136,175,144,GUIInitSt2,24
GUIClickCButton 12,147,byte[FossilUse]
.nomodemc
cmp byte[CNetType],3
jne near .nomodemd
GUIPHoldbutton 141,38,175,49,28
.nomodemd
cmp byte[CNetType],4
jne near .notcpip
cmp byte[NetPlayNoMore],1
je near .notcpip
GUIPHoldbutton 5,35,129,46,25
GUIPHoldbutton 5,70,129,81,26
GUITextBoxInputB 55,13,95,21,1
GUITextBoxInputB 26,58,191,66,0
GUITextBoxInputB 55,24,119,32,2
GUIClickCButton 5,93,byte[UDPConfig]
.notcpip
cmp byte[CNetType],10
je .init
cmp byte[CNetType],11
je .init
cmp byte[CNetType],15
je .init
cmp byte[CNetType],12
jne near .noinit
.init
GUIPHoldbutton 120,135,181,146,27
.noinit
cmp byte[CNetType],7
jne near .noipx
GUIPHoldbutton 53,48,87,59,34
.noipx
cmp byte[CNetType],20
jne near .nochat
GUIPHoldbutton 111,169,181,180,27
GUIClickCButtonN 7,135,byte[RemoteCommand],3
GUIClickCButtonN 32,135,byte[RemoteCommand],4
GUIClickCButtonN 57,135,byte[RemoteCommand],5
GUIClickCButtonN 7,145,byte[RemoteCommand],6
GUIClickCButtonN 32,145,byte[RemoteCommand],7
GUIClickCButtonN 7,175,byte[RemoteCommand],8
GUIClickCButtonN 111,135,byte[RemoteCommand],50
GUIClickCButtonN 111,145,byte[RemoteCommand],41
GUIClickCButtonN 111,155,byte[RemoteCommand],42
GUIPHoldbutton2 79,156,87,166,29,byte[Latencytochange],1,19
GUIPHoldbutton2 90,156,98,166,30,byte[Latencytochange],-1,1
; DrawSlideBarWin 8,181,15,[GUIcurrentvideoviewloc],[TViewLoc],12,97,GUINCStA
; GUISlidebarImpl 181,15,188,112,GUINCStA,12,GUIcurrentcheatviewloc,TViewCLoc,TViewLoc,12
mov al,[Latency]
cmp byte[Latencytochange],al
je .nochat
mov byte[RemoteCommand],20
.nochat
cmp byte[CNetType],22
je .yesstate
cmp byte[CNetType],21
jne near .nostate
.yesstate
GUIPHoldbutton 73,48,127,59,64
.nostate
ret
guipresstest:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff