Remove some more netplay junk.
This commit is contained in:
@@ -40,15 +40,12 @@ EXTSYM vesa2_clbit,vesa2_clbitng,vesa2_clbitng2,vesa2_clbitng3,vesa2red10,res640
|
||||
EXTSYM res480,cbitmode,cvidmode,vesa2_bits,vesa2_x,vesa2_y,genfulladdtab,GUICPC
|
||||
EXTSYM drawscreenwin,ConvertToAFormat,UnusedBit,HalfTrans,UnusedBitXor,UnusedBit
|
||||
EXTSYM ngrposng,nggposng,ngbposng,HalfTransB,HalfTransC
|
||||
EXTSYM WinUpdateDevices,UpdateVFrame,GetMouseX,GetMouseY,InitTCP,GetMouseMoveX
|
||||
EXTSYM WinUpdateDevices,UpdateVFrame,GetMouseX,GetMouseY,GetMouseMoveX
|
||||
EXTSYM GetMouseMoveY,GetMouseButton,SetMouseMinX,SetMouseMaxX,SetMouseMinY
|
||||
EXTSYM SetMouseMaxY,SetMouseX,SetMouseY,T36HZEnabled,MouseButton,Start36HZ
|
||||
EXTSYM Stop36HZ,BufferSizeW,BufferSizeB,ProcessSoundBuffer,CheckTimers
|
||||
EXTSYM vesa2_rfull,vesa2_rtrcl,vesa2_rtrcla,vesa2_gfull,vesa2_gtrcl,vesa2_gtrcla
|
||||
EXTSYM vesa2_bfull,vesa2_btrcl,vesa2_btrcla,Init_2xSaIMMXW,StartServerCycle
|
||||
EXTSYM ServerCheckNewClient,acceptzuser,ConnectServer,WaitForServer,SendDataNop
|
||||
EXTSYM SendDataUDPNop,GetDataNop,DeInitTCP,StopServer,Disconnect,UDPDisableMode
|
||||
EXTSYM UDPEnableMode,UDPClearVars,UDPWait1Sec,WinErrorA2,WinErrorB2,WinErrorC2
|
||||
EXTSYM vesa2_bfull,vesa2_btrcl,vesa2_btrcla,Init_2xSaIMMXW
|
||||
EXTSYM ZsnesPage,V8Mode,GrayscaleMode,PrevWinMode,PrevFSMode,FrameSemaphore
|
||||
EXTSYM _imp__GetLocalTime@4
|
||||
|
||||
@@ -1555,301 +1552,6 @@ NEWSYM SetInputDevice
|
||||
mov dword[eax+44],46
|
||||
ret
|
||||
|
||||
|
||||
SECTION .data
|
||||
ALIGN32
|
||||
; ****************************
|
||||
; TCP/IP Stuff
|
||||
; ****************************
|
||||
|
||||
; TCPIPPortNum
|
||||
NEWSYM TCPIPStatus, db 0
|
||||
NEWSYM PacketSendSize, dd 0
|
||||
NEWSYM PacketRecvSize, dd 0
|
||||
NEWSYM PacketRecvPtr, dd 0
|
||||
NEWSYM PacketSendArray, times 2048+256 db 0
|
||||
NEWSYM PacketRecvArray, times 2048+256 db 0
|
||||
NEWSYM IPAddrStr, times 20 db 0
|
||||
NEWSYM RemoteDisconnect, db 0
|
||||
SECTION .text
|
||||
|
||||
NEWSYM TCPIPStartServer
|
||||
mov byte[RemoteDisconnect],0
|
||||
pushad
|
||||
mov dword[PacketSendSize],0
|
||||
mov dword[PacketRecvSize],0
|
||||
call InitTCP
|
||||
or eax,eax
|
||||
jnz .failed
|
||||
mov byte[TCPIPStatus],1
|
||||
; StartServer(unsigned short port)
|
||||
xor eax,eax
|
||||
; mov ax,[TCPIPPortNum]
|
||||
push eax
|
||||
call StartServerCycle
|
||||
add esp,4
|
||||
or eax,eax
|
||||
jnz .failed
|
||||
mov byte[TCPIPStatus],2
|
||||
popad
|
||||
xor eax,eax
|
||||
ret
|
||||
.failed
|
||||
popad
|
||||
mov eax,-1
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPWaitForConnection
|
||||
mov byte[RemoteDisconnect],0
|
||||
pushad
|
||||
call ServerCheckNewClient
|
||||
mov [.temp],eax
|
||||
cmp eax,1
|
||||
jne .notwaiting
|
||||
call acceptzuser
|
||||
or eax,eax
|
||||
jnz .failed
|
||||
.notwaiting
|
||||
popad
|
||||
mov eax,[.temp]
|
||||
ret
|
||||
.failed
|
||||
popad
|
||||
mov eax,-1
|
||||
ret
|
||||
SECTION .data
|
||||
.temp dd 0
|
||||
SECTION .text
|
||||
|
||||
NEWSYM TCPIPInitConnectToServer
|
||||
pushad
|
||||
mov dword[PacketSendSize],0
|
||||
mov dword[PacketRecvSize],0
|
||||
call InitTCP
|
||||
or eax,eax
|
||||
jnz .failed
|
||||
mov byte[TCPIPStatus],1
|
||||
; Convert TCPIPAddress to IPAddrStr
|
||||
; mov ebx,TCPIPAddress
|
||||
mov edx,IPAddrStr
|
||||
.notend
|
||||
mov al,[ebx]
|
||||
cmp al,' '
|
||||
je .dontinclude
|
||||
mov [edx],al
|
||||
inc edx
|
||||
.dontinclude
|
||||
inc ebx
|
||||
cmp al,0
|
||||
jne .notend
|
||||
popad
|
||||
xor eax,eax
|
||||
ret
|
||||
.failed
|
||||
popad
|
||||
mov eax,1
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPConnectToServer
|
||||
; int ConnectServer(char *servername, unsigned short port)
|
||||
pushad
|
||||
xor eax,eax
|
||||
; mov ax,[TCPIPPortNum]
|
||||
push eax
|
||||
mov eax,IPAddrStr
|
||||
push eax
|
||||
xor eax,eax
|
||||
call ConnectServer
|
||||
add esp,8
|
||||
or eax,eax
|
||||
jnz .noclient
|
||||
mov byte[TCPIPStatus],3
|
||||
popad
|
||||
xor eax,eax
|
||||
ret
|
||||
.noclient
|
||||
mov [.temp],eax
|
||||
popad
|
||||
mov eax,[.temp]
|
||||
ret
|
||||
SECTION .data
|
||||
.temp dd 1
|
||||
SECTION .text
|
||||
|
||||
NEWSYM TCPIPConnectToServerW
|
||||
; int ConnectServer(char *servername, unsigned short port)
|
||||
pushad
|
||||
xor eax,eax
|
||||
call WaitForServer
|
||||
or eax,eax
|
||||
jnz .foundclient
|
||||
mov byte[TCPIPStatus],3
|
||||
popad
|
||||
xor eax,eax
|
||||
ret
|
||||
.foundclient
|
||||
mov [.temp],eax
|
||||
popad
|
||||
mov eax,[.temp]
|
||||
ret
|
||||
SECTION .data
|
||||
.temp dd 0
|
||||
SECTION .text
|
||||
|
||||
NEWSYM TCPIPStoreByte
|
||||
; Store al into the array
|
||||
; cmp dword[PacketSendSize],2048
|
||||
; je .packeterror
|
||||
push ebx
|
||||
mov ebx,[PacketSendSize]
|
||||
mov [PacketSendArray+ebx],al
|
||||
pop ebx
|
||||
inc dword[PacketSendSize]
|
||||
ret
|
||||
.packeterror
|
||||
mov byte[RemoteDisconnect],1
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPGetByte
|
||||
; dh = 0 : No bytes in buffer
|
||||
; dl = resulting character
|
||||
cmp dword[PacketRecvSize],0
|
||||
jne .bytereceived
|
||||
mov dword[PacketRecvPtr],0
|
||||
call TCPIPRecvPacket
|
||||
cmp dword[PacketRecvSize],0
|
||||
jne .bytereceived
|
||||
xor dh,dh
|
||||
ret
|
||||
.bytereceived
|
||||
push eax
|
||||
mov eax,[PacketRecvPtr]
|
||||
mov dl,[PacketRecvArray+eax]
|
||||
mov dh,1
|
||||
inc dword[PacketRecvPtr]
|
||||
mov eax,[PacketRecvPtr]
|
||||
cmp [PacketRecvSize],eax
|
||||
jne .notequal
|
||||
mov dword[PacketRecvSize],0
|
||||
.notequal
|
||||
pop eax
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPSendPacket
|
||||
cmp dword[PacketSendSize],0
|
||||
je .nopacket
|
||||
pushad
|
||||
; Send PacketSendArray with size of PacketSendSize
|
||||
; SendData(int [PacketSendSize],char *PacketSendArray)
|
||||
push eax ; required pushes to get correct stack
|
||||
push eax
|
||||
call SendDataNop
|
||||
or eax,eax
|
||||
jnz .failed
|
||||
add esp,8
|
||||
popad
|
||||
.nopacket
|
||||
ret
|
||||
.failed
|
||||
add esp,8
|
||||
popad
|
||||
call TCPIPDisconnect
|
||||
mov byte[RemoteDisconnect],1
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPSendPacketUDP
|
||||
cmp dword[PacketSendSize],0
|
||||
je .nopacket
|
||||
pushad
|
||||
; Send PacketSendArray with size of PacketSendSize
|
||||
; SendData(int [PacketSendSize],char *PacketSendArray)
|
||||
push eax ; required pushes to get correct stack
|
||||
push eax
|
||||
call SendDataUDPNop
|
||||
or eax,eax
|
||||
jnz .failed
|
||||
add esp,8
|
||||
popad
|
||||
.nopacket
|
||||
ret
|
||||
.failed
|
||||
add esp,8
|
||||
popad
|
||||
call TCPIPDisconnect
|
||||
mov byte[RemoteDisconnect],1
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPRecvPacket
|
||||
pushad
|
||||
; Store packet to PacketRecvArray, size at PacketRecvSize
|
||||
; int GetData(int 2048,char *PacketRecvArray)
|
||||
push eax ; required pushes to get correct stack
|
||||
push eax
|
||||
call GetDataNop
|
||||
cmp eax,-1
|
||||
je .failed
|
||||
mov [PacketRecvSize],eax
|
||||
add esp,8
|
||||
popad
|
||||
ret
|
||||
.failed
|
||||
add esp,8
|
||||
popad
|
||||
call TCPIPDisconnect
|
||||
mov byte[RemoteDisconnect],1
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPDisconnect
|
||||
call DeInitTCP
|
||||
cmp byte[TCPIPStatus],2
|
||||
jne .notserver
|
||||
call StopServer
|
||||
.notserver
|
||||
cmp byte[TCPIPStatus],3
|
||||
jne .notclient
|
||||
call Disconnect
|
||||
.notclient
|
||||
mov byte[TCPIPStatus],0
|
||||
ret
|
||||
|
||||
NEWSYM TCPIPPreparePacket
|
||||
mov dword[PacketSendSize],0
|
||||
ret
|
||||
|
||||
NEWSYM ClearUDPStuff
|
||||
pushad
|
||||
call UDPClearVars
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM Wait1SecWin
|
||||
pushad
|
||||
call UDPWait1Sec
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM EnableSUDPPacket
|
||||
pushad
|
||||
call UDPEnableMode
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM DisableSUDPPacket
|
||||
pushad
|
||||
call UDPDisableMode
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM WinErrorA
|
||||
call WinErrorA2
|
||||
ret
|
||||
NEWSYM WinErrorB
|
||||
call WinErrorB2
|
||||
ret
|
||||
NEWSYM WinErrorC
|
||||
call WinErrorC2
|
||||
ret
|
||||
|
||||
NEWSYM GotoHomepage
|
||||
pushad
|
||||
call ZsnesPage
|
||||
|
||||
@@ -2125,10 +2125,6 @@ DWORD ScreenPtr;
|
||||
DWORD ScreenPtr2;
|
||||
extern void GUI36hzcall(void);
|
||||
extern void Game60hzcall(void);
|
||||
extern int packettimeleft[256];
|
||||
extern int PacketCounter;
|
||||
extern int CounterA;
|
||||
extern int CounterB;
|
||||
|
||||
void CheckTimers(void)
|
||||
{
|
||||
@@ -2140,14 +2136,6 @@ void CheckTimers(void)
|
||||
|
||||
while ((end2 - start2) >= update_ticks_pc2)
|
||||
{
|
||||
if (CounterA>0) CounterA--;
|
||||
if (CounterB>0) CounterB--;
|
||||
if (PacketCounter){
|
||||
for (int i=0;i<256;i++){
|
||||
if (packettimeleft[i]>0)
|
||||
packettimeleft[i]--;
|
||||
}
|
||||
}
|
||||
start2 += update_ticks_pc2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user