home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 April / PCWorld_2007-04_cd.bin / multimedia / taksi / taksi-0.7.6.msi / _8D5FD7AD06165589B24FBADFB2F3FB86 / _6DE31EF302AF42DEB6235AB1568C345A < prev    next >
Text File  |  2006-06-22  |  14KB  |  378 lines

  1. MOST RECENT CHANGES AT THE BOTTOM
  2.  
  3. NOTE: This file contains chaotic notes taken primarily during the early 
  4. stages of development. The information here has mostly historic value.
  5. =======================================================================
  6.  
  7. d3d8.dll base: 00230000
  8.  
  9. IDirect3DDevice8 vtable (First 20 methods):
  10. -------------------------------------------
  11. 0013c8a0: vtablePtr[00]: 00280540 - QueryInterface
  12. 0013c8a4: vtablePtr[01]: 002804f0 - AddRef
  13. 0013c8a8: vtablePtr[02]: 00280510 - Release
  14. 0013c8ac: vtablePtr[03]: 00280a40
  15. 0013c8b0: vtablePtr[04]: 00280d60
  16. 0013c8b4: vtablePtr[05]: 002720b0
  17. 0013c8b8: vtablePtr[06]: 00280c30
  18. 0013c8bc: vtablePtr[07]: 00281a00
  19. 0013c8c0: vtablePtr[08]: 00280d00
  20. 0013c8c4: vtablePtr[09]: 00280ca0
  21. 0013c8c8: vtablePtr[10]: 00280730
  22. 0013c8cc: vtablePtr[11]: 002807d0
  23. 0013c8d0: vtablePtr[12]: 00280830
  24. 0013c8d4: vtablePtr[13]: 002805e0
  25. 0013c8d8: vtablePtr[14]: 00281fc0
  26. 0013c8dc: vtablePtr[15]: 002809c0 - Present
  27. 0013c8e0: vtablePtr[16]: 00280940
  28. 0013c8e4: vtablePtr[17]: 00280b40
  29. 0013c8e8: vtablePtr[18]: 002808a0
  30. 0013c8ec: vtablePtr[19]: 002808f0
  31.  
  32. Algorithm:
  33. ----------
  34. 1. determine d3d8.dll base
  35. 2. create vtable of first 20 methods, using DLL base.
  36. 3. search d3d8 module for this vtable.
  37. 4. in the found vtable, replace Present's address with our function's address.
  38. 5. our function will call Present and do useful stuff.
  39.  
  40. New info:
  41. ---------
  42. It appears that d3d8 module contains the vtable in 3 places.
  43. Present address is located at the following offsets:
  44. 12724  12D14  13894
  45.  
  46. New info:
  47. ---------
  48. previous new info is useless. It appears that vtable lives in the heap.
  49. For example, for CDJuce.exe, it was found in 13c880 (as reported by the prog).
  50.  
  51. progress:
  52. --------
  53. Was able to manually hook Present (via SoftIce). However program crashes.
  54. If appears that original Present is called correctly, but the crash occurs
  55. on return statement in JucePresent.
  56.  
  57. more progress!!!:
  58. -----------------
  59. Was able to fix the crashing, by declaring JucePresent as STDMETHODCALLTYPE
  60. (same as __stdcall)
  61.  
  62. New info:
  63. ---------
  64. Windows XP has different "clean" offset for Present(): 0x50980
  65. (Windows 2000 has: 0x509c0)
  66. Possibly, each operating system has a different one.
  67.  
  68. Next thing TODO:
  69. replace manual hooking with automatic hooking.
  70.  
  71. *MILESTONE* #1:
  72. ---------------
  73. Implemented automatic hooking, which finds vtable by searching the process heap.
  74. Works with PES3 and Direct3D sample applications 
  75. on Windwows 2000 and Windows XP.
  76.  
  77. BUG:
  78. if PES3 is started first in fullscreen mode, then task-switched (Alt-Tab), 
  79. then hook.exe is started, PES3 cannot restore with Alt-Tab. Hooking appears 
  80. to be performed correctly though... (according to the log file)
  81. MORE On THIS: it can be restored with ALt-Enter. WEIRD...
  82.  
  83. Something fishy about it window resizing/restoration
  84. If window is resized, programs die.
  85.  
  86. NOTE:
  87. -----
  88. Added correct restoration of original Present(), when dll is detached.
  89.  
  90. *MILESTONE* #2:
  91. ---------------
  92. - fixed resizing/restoration problem.
  93. - added visual indicator.
  94. PROBLEM:
  95. some applications fail. This appears to be happenning at the stage
  96. of heap searching. Probably, because heap space is not contiguous.
  97.  
  98. #### big MILESTONE ########:
  99. ----------------------------
  100. All Direct3D 8 apps seem to work now.
  101. Recent additions/fixes:
  102. - fixed bugs in JuceReset and JucePresent which were causing Alt-Enter thing with PES3
  103. - fixed sound problems with PES3, by implementing optimized indicator drawing routine.
  104. - added keyboard hook and screenshots logic.
  105.  
  106. Screenshots can be made in fullscreen applications.
  107. (don't work yet in windowed apps: get black rects as screenshots)
  108.  
  109. Next TODO:
  110. ~~~~~~~~~~
  111. * speed-up screenshot taking 
  112.   (perhaps replace D3DXSaveSurfaceToFile with custom routine)
  113. * figure out windowed apps
  114. * fix global hooking/unhooking logic
  115. * capture video
  116.  
  117. - fixed windowed apps.
  118. - added 2 additional screenshot routines (now 3 diff. routines!).
  119. - added BMP-writing routine.
  120. - About ready to start writing the AVI file.
  121.  
  122. *MILESTONE* #4
  123. --------------
  124. - added minification procedure.
  125. - video capturing implemented.
  126.  
  127. INFO:
  128. Looks like, "clean" offsets for Present() and Reset() differ from machine to machine.
  129. A test for 2 Win2K boxes showed 2 different sets of offsets.
  130. SOLUTION: hook.exe dynamically creates a IDirect3DDevice8, and uses its vtablePtr to
  131. create a vtableFrag, which contains offsets for Present() and Reset().
  132.  
  133. #### another big MILESTONE #####:
  134. ---------------------------------
  135. - hook.exe now dynamically determines offsets of Present() and Reset() and gives that
  136. information to the DLL. 
  137. - problem with CopyRects (sound breaking after one use of CopyRects) seems to be fixed
  138. by installing new video drivers (53.03 from Nvidia)
  139. - correct unhooking implemented.
  140. - two modes implemented: "exclusive" and "system-wide".
  141. "Exclusive" means, after the first DX8 app is found, the system wide hook is removed.
  142. "System-wide" : the system wide hook stays hooked.
  143.  
  144. Feb.4,2004
  145. ----------
  146. Re-implemented indicator drawing routine (idle mode):
  147. CopyRects is abandoned in favour of Direct3DDevice8 drawing methods. As a result,
  148. massive speed improvement, which also results in games running much more smoothly. 
  149. (Probabal explanation is that: CopyRects needed to constantly copy data from 
  150. system memory to video memory, which was the bottleneck operation.)
  151. CopyRects is still used for screen grabbinng / video capturing, and seems
  152. to work just fine in those cases. At the moment, no alternative that would work
  153. in general cases (such as unlockable backbuffers) has been found.
  154.  
  155. Feb.6,2004
  156. ----------
  157. Fixed bug related to new indicator drawing logic: now FIFA2003, F12001,
  158. PES3, and all Direct3D SDK Samples work fine.
  159.  
  160. Mar.03,2004
  161. -----------
  162. Finished first version of Win32 GUI. Full support for all features,
  163. including custom settings. Renamed executable, DLL, and configurtion file to
  164. taxi.exe, taxi.dll, and taxi.cfg respectively. This is the first version ready 
  165. to be given away for testing/trying.
  166.  
  167. Mar.10,2004
  168. -----------
  169. Renamed to "Taksi". Executable, DLL, and configuration file, as well as
  170. logfile names are updated accordingly.
  171.  
  172. May.21,2004
  173. -----------
  174. First rough support for Direct3D 9.0 implemented.
  175.  
  176. May.23,2004
  177. -----------
  178. moved API-graphics-specific stuff outside mydll.cpp
  179.  
  180. May.24,2004
  181. -----------
  182. Both DirectX 8 and DirectX 9 are now supported.
  183.  
  184. Nov.3,2004
  185. ----------
  186. Added beginnings of OpenGL support: hooking via different methods
  187. (Import table overwrites, Run-time code modification). Looks like hooking of
  188. wglSwapBuffers (using "temporary" JMP instruction) is enough for most cases,
  189. as it works when application uses SwapBuffers, or even GLUT library
  190. (glutSwapBuffers).
  191.  
  192. Nov.7,2004
  193. ----------
  194. Screenshots and video capture implemented for OpenGL apps.
  195. Support for OpenGL now complete.
  196. Version 0.3 released.
  197.  
  198. Nov.10,2004
  199. -----------
  200. Re-implemented Present/Reset hooking for DirectX-based games.
  201. The "JMP-implant" algorithm is now used (same idea as in OpenGL hooking).
  202. Implemented proper reference counting by hooking AddRef and Release methods
  203. of IDirect3DDevice9 and IDirect3DDevice9 interfaces. Now all DX9 SDK
  204. samples exit cleanly, as do Warcraft III, and PES games. 
  205. Implemented proper release of device resources in the event of device change.
  206. (As a result, 3DMark2001SE now fully works with Taksi.)
  207.  
  208. Nov.11,2004
  209. -----------
  210. - Cleanup of system-wide/exclusive modes functionality. New configuration
  211. parameter: "startup.hookMode.systemWide". Takes boolean values (0/1), where
  212. 0 - means that taksi should go into "exclusive" mode once an application is
  213. hooked, effectively meaning that no other application will be hooked until
  214. this application exits, or taksi unhooks from it. 1 - means: stay in 
  215. system wide mode, allowing many apps to be hooked in parallel. (HOOK_MODE
  216. hot key can still switch between the modes (as before), once the application 
  217. is hooked by taksi.)
  218. - Cleanup and fixes for keyboard handling code. "useDirectInput" option
  219. now has new meaning: always use DirectInput (regardless of what the app
  220. itself is using). 
  221.  
  222. Nov.14,2004
  223. -----------
  224. - Simplified hooking logic. 3 new threads are no longer created upon the
  225. mapping of taksi.dll. Instead, the checks for Direct3D8, Direct3D9, and
  226. OpenGL are done sequentualy. (Also, OpenGL check is now a simple lookup
  227. using GetProcAddress.) Additional checks for the APIs are triggered by
  228. GetMsgProc, which ignores non-window-related messages, but does the 
  229. GetModuleHandle checks when a window-related message (<= 0x24) arrives.
  230. - Logging from multiple threads is not an issue now.
  231.  
  232. Nov.16,2004
  233. ===========
  234. - Yet another modification to DLL-mapping/API-hooking algorithm in
  235. search of faster and more reliable mapping/hooking. Currently, WH_CBT
  236. hook is used, and all three DLLs (d3d8.dll, d3d9.dll, opengl32.dll)
  237. are pre-loaded and modified with JMP-implants. CBTProc is used to
  238. monitor existence of JMP-implants, which are checked whenever a
  239. HCBT_SETFOCUS message is received. This seems to work well.
  240.  
  241. Nov.18,2004
  242. ===========
  243. - experimental feature: full-size video capture.
  244. Right now, it's working very well. Very visible slowdown in games,
  245. and also the actual frame rate of the video is not very good.
  246. However, this may be useful option for windowed-applications, which
  247. are running in relatively small windows.
  248.  
  249. May 20,2006
  250. ==============
  251. Dennis Robinson - Extreme Refactoring of code.
  252.  
  253. 'Explore folder' button for the files directory.
  254. main button bar added. global record button on Taksi.EXE App
  255. Update the button bar correctly for current state.
  256. Fill in the live stats data for Taksi.EXE dialog.
  257. Single record app at any given time.
  258. Tool tips - for the main window buttons.
  259. Add all hot keys to the button bar.
  260. Add a seperate hotkey for video stop.
  261. Add icons to the config pages.
  262. Add graphics to the installer MSI.
  263. Record GDI like iCord
  264. trim capture rectangle to 4 byte alignment to fix XVid refuseing to record.
  265. Browser dialog for selecting dir to place files.
  266. Persist Selected audio format. 
  267. Select Audio Format. (ACM dialog)
  268. allow hotkeys to have SHIFT, CTRL, ALT, etc
  269. Gray out the save button in config dialog if there are no changes.
  270. Add Stats Tab to config dialog.
  271. Unify INI prop names with the rest of the code.
  272. floating point frame rate to allow <1 sec frame rates.
  273. do frame compression/write on background thread
  274. persist selected video codec in INI file
  275. Tabbed config dialog
  276. Move common code to a common sub dir
  277. use MS hotkey control for setting hotkeys
  278. General C++ wrapper for the VFW 
  279. Replace CFG file with INI file format
  280. RC file for dialog
  281. Replace logging system with logging class.
  282. Basic MSI installer.
  283. Wrap hooking functions in a class 
  284. Wrap frame alloc functions in a class
  285. IRefPtr smart pointers for DX interfaces.
  286. Renaming of Taksi.EXE and TaksiDll.DLL files.
  287. Use of consistant header files.
  288. Object oriented Classes. Wrap major functionality in classes.
  289. Merge redundant code in graphics mode handlers to single shared function calls.
  290. always use sizeof() instead of constants
  291. use of static for scoping of variables.
  292. use of precompiled headers.
  293. Clear seperation of EXE,DLL and shared files.
  294. New TAKSI icon
  295.  
  296. June 6,2006 
  297. ==============
  298. Ver 0.745 test release.
  299. sources all merged into Subversion on sourceforge.
  300.  
  301. Ver 0.746 test release.
  302. Title shows name of prime hooked app.
  303. Fix logging of messages to 'Taksi_App.log' file.
  304. DebugLog=0/1 in the INI file. keep debug log files or not?
  305. Indicator button reflects current state.
  306. FIX - App Hook switch not always correct. TEST switch between 2 apps
  307. Move debugLog flag to Gui such that logs are turned on on demand?
  308. all INI options are settable from the config dialogs
  309. Break config structures out into Config.H file for organization
  310. FIX - hook Switch DX app multiple times causes crash. asymetric hook/unhook.
  311. Option to hook GDI or not.
  312.  
  313. June 7,2006 
  314. ==============
  315. Ver 0.747 test release.
  316. Background thread queue N raw frames for compression.
  317. Save previous window position
  318. ToolTips for some config controls.
  319. Test on OpenGL samples.
  320.  
  321. Ver 0.748 test release.
  322. Naming control - postfix saved file name note
  323.  
  324. June 8,2006 
  325. ==============
  326. Ver 0.749 test release.
  327. Move VS_VERSION_INFO from taksi.rc to taksiver.rc2 so it wont be destroyed by the resource editor.
  328. Pause mode for video record
  329.  
  330. June 9,2006 
  331. ==============
  332. Ver 0.750 test release.
  333. Attempt to fix hooking GDI mode with multiple main windows or instances.
  334.  
  335. Ver 0.752
  336. Unique error codes for VFW errors.
  337.  
  338. Ver 0.753 - SourceForge RELEASED
  339. Tray Icon and tray menu support for all functions. USE_TRAYICON conditional compile
  340. Supports uncompressed video. Why would anyone want that ?
  341. check menu for paused mode.
  342. FIX - overflow when storing bad wave format.
  343.  
  344. June 13,2006 
  345. ==============
  346. Ver 0.754
  347. Display the M of data recorded in the main GUI window title.
  348. stats show graphics mode hooked.
  349. Half sized GDI record
  350.  
  351. June 14,2006 
  352. ==============
  353. Ver 0.755
  354. test switch to turn off opengl hook. OpenGLUse
  355. better error codes loggged. testing feedback from boards.
  356.  
  357. Ver 0.756
  358. FIX bug creating new custom config.
  359. re-try getting info on the surface if the GetFrame() call fails.
  360.  
  361. Ver 0.757
  362. check the save dir exists (Create if not) at start up.
  363. hotKeys indicated in the shell icon
  364.  
  365. Ver 0.758
  366. Move config dialog window to the foreground if opened via hotkey
  367. FIX Data recorded stat number not including overhead! too small.
  368. Warning message of possible codec that is not that great.
  369.  
  370. June 21,2006 
  371. ==============
  372. Ver 0.759
  373. Non Frame GDI not working properly.
  374. Make the Frame Overhead compensation code optional. 
  375. UseOverheadCompensation in INI file. and in GUI config dialog.
  376. Add button to fill in the custom app pattern automatically.
  377. 0,0 as params for the custom app means DONT hook that app.
  378.