In the source code, you can see how the author modified a similar system call for Linux (" gettimeofday()") for this. SpeedHacking, in general, works by injecting code into the running process and hacking the timing functions to return sped-up / slowed-down "ticks" to modify the program's running speed.Īlthough, I can't be sure how exactly CE achieved this (the source code is pretty hard to understand) but another programmer pulled off a similar thing ( video) on Linux. On Windows, " GetTickCount()" is usually used for this which returns number of milliseconds passed since the Windows has been up ("If no of milliseconds passed since the last tick count is more than 16ms, render a new frame else continue."). Computer games often need to render 60 frames / second and to make this happen they need to call the rendering function every 16.6ms. According to this page, there are around 480+ system calls in Windows NT kernel.įor any purpose that deals with the hardware, programs usually resort to system calls because that's what OS does best and one of these things happen to be knowing time. Each OS has a different set of calls but often they do similar things like - allocating memory, reading and writing files, or handling processes. :)Ī computer program usually communicates with the kernel using predefined functions called system calls. Three years later, I think I know enough to answer my own question.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |