
Kam Source??? Probably not
26 posts
• Page 2 of 2
•
1
2
Strings?
Info about the "Imports" from all .dlls (note diffrent from the dependencies)
Info about the "Imports" from all .dlls (note diffrent from the dependencies)
- Code:
; Imports from fmod.dll ;    extrn _FSOUND_SetVolumeAbsolute@8    extrn _FSOUND_IsPlaying@4    extrn _FSOUND_Sample_Load@16    extrn _FSOUND_PlaySound@8    extrn _FSOUND_Sample_SetDefaults@20    extrn _FSOUND_SetVolume@8    extrn _FSOUND_Sample_Unlock@20    extrn _FSOUND_Sample_Lock@28    extrn _FSOUND_Sample_Alloc@28    extrn _FSOUND_StopSound@4    extrn _FSOUND_SetDriver@4    extrn _FSOUND_SetMixer@4    extrn _FSOUND_Init@12    extrn _FSOUND_SetOutput@4    extrn _FSOUND_Sample_Free@4    extrn _FSOUND_Stream_Close@4    extrn _FSOUND_Stream_OpenFile@12    extrn _FSOUND_Stream_SetEndCallback@12    extrn _FSOUND_Stream_Play@8    extrn _FSOUND_SetPan@8 ; ; Imports from binkw32.dll ;    extrn _BinkClose@4    extrn _BinkNextFrame@4    extrn _BinkCopyToBuffer@28    extrn _BinkDoFrame@4    extrn _BinkOpen@8 ; ; Imports from fsgs.dll ;    extrn Fsgs_Cleanup    extrn Fsgs_QueryInterfaceVersion    extrn Fsgs_QueryInterface    extrn Fsgs_QueryInterfaceName    extrn Fsgs_Startup ; ; Imports from AVIFIL32.dll ;    extrn AVIStreamReadFormat    extrn AVIStreamRead    extrn AVIStreamInfoA    extrn AVIFileGetStream    extrn AVIFileOpenA    extrn AVIFileInit    extrn AVIFileRelease    extrn AVIFileExit    extrn AVIStreamRelease    extrn AVIStreamBeginStreaming ; ; Imports from MSVFW32.dll ;    extrn ICSendMessage    extrn ICLocate ; ; Imports from DPLAYX.dll ;    extrn DPLAYX.1    extrn DPLAYX.2    extrn DPLAYX.4 ; ; Imports from DDRAW.dll ;    extrn DirectDrawCreate ; ; Imports from DINPUT8.dll ;    extrn DirectInput8Create ; ; Imports from KERNEL32.dll ;    extrn VirtualAlloc    extrn HeapReAlloc    extrn IsBadWritePtr    extrn FatalAppExitA    extrn SetUnhandledExceptionFilter    extrn IsBadReadPtr    extrn IsBadCodePtr    extrn UnhandledExceptionFilter    extrn InterlockedDecrement    extrn GetCurrentProcess    extrn InterlockedIncrement    extrn TerminateProcess    extrn SetFilePointer    extrn GetTimeZoneInformation    extrn GetCPInfo    extrn GetACP    extrn GetOEMCP    extrn LoadLibraryA    extrn SetConsoleCtrlHandler    extrn MultiByteToWideChar    extrn GetTickCount    extrn SetCurrentDirectoryA    extrn GetCurrentDirectoryA    extrn Sleep    extrn GetStringTypeA    extrn EnterCriticalSection    extrn InitializeCriticalSection    extrn CreateThread    extrn DeleteCriticalSection    extrn CloseHandle    extrn GetExitCodeThread    extrn lstrlenA    extrn GetVolumeInformationA    extrn FindClose    extrn FindFirstFileA    extrn GetDriveTypeA    extrn CreateFileA    extrn DeleteFileA    extrn GetFileSize    extrn WriteFile    extrn ReadFile    extrn GetProcAddress    extrn GetModuleFileNameA    extrn GetCurrentThread    extrn TlsGetValue    extrn SetLastError    extrn TlsFree    extrn TlsAlloc    extrn TlsSetValue    extrn GetCurrentThreadId    extrn HeapAlloc    extrn HeapFree    extrn ExitProcess    extrn GetVersion    extrn GetCommandLineA    extrn GetStartupInfoA    extrn GetModuleHandleA    extrn FileTimeToLocalFileTime    extrn FileTimeToSystemTime    extrn FindNextFileA    extrn GetLastError    extrn RtlUnwind    extrn FreeEnvironmentStringsA    extrn FreeEnvironmentStringsW    extrn WideCharToMultiByte    extrn GetEnvironmentStrings    extrn GetEnvironmentStringsW    extrn GetStringTypeW    extrn LCMapStringA    extrn LCMapStringW    extrn RaiseException    extrn SetStdHandle    extrn IsValidLocale    extrn IsValidCodePage    extrn GetLocaleInfoA    extrn EnumSystemLocalesA    extrn GetUserDefaultLCID    extrn FlushFileBuffers    extrn CompareStringA    extrn CompareStringW    extrn SetEnvironmentVariableA    extrn LeaveCriticalSection    extrn GetLocaleInfoW    extrn VirtualFree    extrn HeapCreate    extrn HeapDestroy    extrn GetVersionExA    extrn GetEnvironmentVariableA    extrn GetFileType    extrn GetStdHandle    extrn SetHandleCount ; ; Imports from USER32.dll ;    extrn GetClientRect    extrn GetSysColor    extrn FillRect    extrn LoadIconA    extrn LoadCursorA    extrn RegisterClassA    extrn CreateWindowExA    extrn UpdateWindow    extrn PeekMessageA    extrn GetMessageA    extrn BeginPaint    extrn DispatchMessageA    extrn DestroyWindow    extrn PostQuitMessage    extrn DefWindowProcA    extrn ReleaseDC    extrn GetWindowDC    extrn GetDC    extrn LoadImageA    extrn GetAsyncKeyState    extrn SetCursor    extrn PtInRect    extrn MessageBoxA    extrn TranslateMessage    extrn wsprintfA ; ; Imports from GDI32.dll ;    extrn SelectObject    extrn GetPixel    extrn GetObjectA    extrn DeleteObject    extrn CreateSolidBrush    extrn DeleteDC    extrn CreateDIBSection    extrn CreateCompatibleDC    extrn SelectPalette    extrn CreatePalette    extrn GetSystemPaletteEntries    extrn BitBlt    extrn StretchBlt    extrn SetDIBColorTable    extrn RealizePalette ; ; Imports from ole32.dll ;    extrn CoInitialize    extrn CoCreateInstance ; ; Imports from WINMM.dll ;    extrn mixerGetNumDevs    extrn mixerOpen    extrn mixerGetLineInfoA    extrn mixerGetLineControlsA    extrn mixerGetControlDetailsA    extrn mixerSetControlDetails    extrn mciSendStringA    extrn mciSendCommandA    extrn mixerClose  [/quote]

Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
Getting net games going again
Hi Everyone,
I've had an idea. Surely somewhere in the EXE would be the host name of the netplay server. If we could somehow change this to another server (that we control) then we could start up the whole net play thing again!
Of course, we would need to work out how the protocol works. (how the server and clients communicate)
By using a program called Current Ports (very useful) I discovered that it tries to connect to 212.78.110.19:6112 when I click net games. The reverse look up of 212.78.110.19 is netserver.earthnet.de and by searching through the EXE I found netserver.earthnet.de was there! I then changed this to lewin.namsys.com.au and saved it. This time when I ran kam it tried to connect to 203.26.16.137:6112! (that's the IP address of my web server) It still failed as my web server is not listening on that port, but it did say "connected to server" first. (it normal just fails)
You cannot enter an IP address for the server name, it doesn't open the connection properly, as I think it first does a reverse look up on it and that doesn't work for an IP address.
I was about to give up when I thought of trying my computers windows network name. (Lewin) To my surprise it then tried to connect to my own computer. Suddenly the mission editor seamed unimportant compared to this. By using an example program for networking I hosted a server and was delighted to find that KaM connected to me! It then sent me 2 packets, the first one was one character hex code 19 and the second was 3 characters FE FE 08. The protocol seam to work with codes, which is rather annoying as I can't workout what it is expecting back from me.
I tried saying: "Hi! I'm a nice KaM master server!" but that didn't work,
it did not send anything back. KaM continued to say "Connecting to server" so it must be waiting on some kind of response, maybe the server listing.
If anyone would like to play with this then you can download the network testing program (to use as the fake master server) from here:
http://lewin.namsys.com.au/kam/downloads/testnet.exe
You will need to open the kam tpr EXE and change netserver.earthnet.de to your computers name. (right click on my computer -> computer name then click change at the bottom. Use the name it displays) If the name is shorter than the original thing then fill all the spare spaces with hex code 00, and kam will ignore them. Then start the network test program. Click host. (you don't need to change the settings) Start KaM and click multiplayer -> net games. Then kam should establish a connection with the program. Try sending it stuff and see if it replies.
Lewin.
I've had an idea. Surely somewhere in the EXE would be the host name of the netplay server. If we could somehow change this to another server (that we control) then we could start up the whole net play thing again!
Of course, we would need to work out how the protocol works. (how the server and clients communicate)
By using a program called Current Ports (very useful) I discovered that it tries to connect to 212.78.110.19:6112 when I click net games. The reverse look up of 212.78.110.19 is netserver.earthnet.de and by searching through the EXE I found netserver.earthnet.de was there! I then changed this to lewin.namsys.com.au and saved it. This time when I ran kam it tried to connect to 203.26.16.137:6112! (that's the IP address of my web server) It still failed as my web server is not listening on that port, but it did say "connected to server" first. (it normal just fails)
You cannot enter an IP address for the server name, it doesn't open the connection properly, as I think it first does a reverse look up on it and that doesn't work for an IP address.
I was about to give up when I thought of trying my computers windows network name. (Lewin) To my surprise it then tried to connect to my own computer. Suddenly the mission editor seamed unimportant compared to this. By using an example program for networking I hosted a server and was delighted to find that KaM connected to me! It then sent me 2 packets, the first one was one character hex code 19 and the second was 3 characters FE FE 08. The protocol seam to work with codes, which is rather annoying as I can't workout what it is expecting back from me.
I tried saying: "Hi! I'm a nice KaM master server!" but that didn't work,

If anyone would like to play with this then you can download the network testing program (to use as the fake master server) from here:
http://lewin.namsys.com.au/kam/downloads/testnet.exe
You will need to open the kam tpr EXE and change netserver.earthnet.de to your computers name. (right click on my computer -> computer name then click change at the bottom. Use the name it displays) If the name is shorter than the original thing then fill all the spare spaces with hex code 00, and kam will ignore them. Then start the network test program. Click host. (you don't need to change the settings) Start KaM and click multiplayer -> net games. Then kam should establish a connection with the program. Try sending it stuff and see if it replies.
Lewin.

Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
According to the official website, at least TSK uses DirectPlay, is that any help? (so they should be UDP packets .. ?) (TPR probably uses DirectPlay as well but I'm not sure)
My guess would be that the master server sends you a list of all the servers running via the TCP connection. (one of the packets it sent me are probably a request for this) Then both the clients (the one serving and the one joining) connect to the master server with UDP. With the same connection they start talking to each other. This tricks the firewall into thinking that it is still the master server they are talking to and it allows the packets through. This is the same way Himachi and LogMeIn work, it's very clever. If anyone can workout the protocol that KaM uses with the master server then I will be willing to program a new master server, and maybe, host it.
Good job lewin maybe with some tinkering we can get kam back online
Has anyone ever played it using net games? (before it went offline)
Lewin.
P.S. @Harold: Have the invalid sessions gone away now? I've noticed that you have been posting a bit recently.
I never had that problem but i think i can help
First
keyboard scrolling or mouse ?
Second
In the saving menu of the game theres a settings sub menu, and in there is a fast scrolling button, it may just be that (tpr)
also if you open setup.cfg (with notepad) in the folder kams installed in theres a:
!SCROLLING
it should have a 0 after it
last thing if your on a low game resolution (800x600) if you make it larger (1024x768, or 1280x960 ect) it will take longer to scroll
if you still have the problem i can look in to it more for you
First
keyboard scrolling or mouse ?
Second
In the saving menu of the game theres a settings sub menu, and in there is a fast scrolling button, it may just be that (tpr)
also if you open setup.cfg (with notepad) in the folder kams installed in theres a:
!SCROLLING
it should have a 0 after it
last thing if your on a low game resolution (800x600) if you make it larger (1024x768, or 1280x960 ect) it will take longer to scroll
if you still have the problem i can look in to it more for you

Both keyboard and mouse. Checked the settings and the config file and it's set to 0, and the resolution is the highest 
But thanks for the reply all the same
I've always had this problem, as have my bros and my friend, _however_, my friend installed TPR the other day and the scrolling was fine on that...

But thanks for the reply all the same

I've always had this problem, as have my bros and my friend, _however_, my friend installed TPR the other day and the scrolling was fine on that...
26 posts
26 posts
• Page 2 of 2
•
1
2
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests