Quote:
Originally Posted by JIPG-reader
In previous versions of this patch, there was only one "replace" of four bytes by another four bytes.
This is the reason why I ask. 
|
The new patch works differently, you only need to change the last replace_int line.
(The value used by the timer is actually in milliseconds, but numbers larger than 255 are encoded in a complicated way, so with the old patch it was necessary to specify a different 4-byte sequence for 3000, 5000, etc. The new patch takes a smaller number in seconds, which can be entered as a plain integer, and multiplies it by 1024 to get an approximation of the timer value in milliseconds. The first replace_bytes line is just to set up this code to do the multiplication.)
(Edit: And if you are wondering why multiply by 1024 instead of 1000? 4 bytes is not enough space to load a multiplicand and load a multiplier and perform a normal multiplication. But there is a trick for multiplying by powers of 2 using a logical-shift-left instruction that doesn't require loading the multiplier. 1024 = 2 to the 10th power.)