Changes between Version 3 and Version 4 of Ticket #13354, comment 7


Ignore:
Timestamp:
04/22/22 22:45:15 (20 months ago)
Author:
AndywinXp

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13354, comment 7

    v3 v4  
    1212----
    1313
    14 1) Launch the timer orchestrator at a rate of **1193182.0 / 4096 == 291.3042Hz**, whose interrupt will call a function which we'll call advanceGameTimers() for convenience.
    15 2) At each run of advanceGameTimers() a global counter will be increased by 3433;
    16 3) If the global counter is lower than 4166 (or in some games 4167... I have to recheck my disasms) goto 4a, else goto 4b;
     14  1) Launch the timer orchestrator at a rate of **1193182.0 / 4096 == 291.3042Hz**, whose interrupt will call a function which we'll call advanceGameTimers() for convenience.
     15  2) At each run of advanceGameTimers() a global counter will be increased by 3433;
     16  3) If the global counter is lower than 4167 goto 4a, else goto 4b;
    1717
    18 4a) Exit the interrupt function.
    19 4b) We've reached the moment in which we have to mark the quarter frame tick: decrement the global counter by 4166 (or, again, 4167) and increment the SCUMM quarter frame tick count.
     18  4a) Exit the interrupt function.
     19  4b) We've reached the moment in which we have to mark the quarter frame tick: decrement the global counter by 4167 and increment the SCUMM quarter frame tick count.
    2020
    2121----
    2222
    23 * Given what happens above, I found the frequency to be calculated like this: **(1193182.0 / 4096) * (3433 / 4166) == 239.992Hz**; testing the drowning scene in MI1 CD yields accurate-to-frame timings with respect to DosBox. ''Remember, the shake time is regulated only by the 4096 iMUSE divisor set in the IMS driver'';
     23  Given what happens above, I found the frequency to be calculated like this: **(1193182.0 / 4096) * (3433 / 4167) == 239.992Hz**; testing the drowning scene in MI1 CD yields accurate-to-frame timings with respect to DosBox. ''Remember, the shake time is regulated only by the 4096 iMUSE divisor set in the IMS driver'';
    2424
    25 - **v6** games appear to do the same thing, only with 4167 in place of 4166 (at least this is what the Sam&Max disasm tells me). I still have to do some heavy testing to see if this is accurate. I recall, for some reason, DOTT and S&M to be slower than the other games (about 236Hz) but I have no evidence for this right now, but I do have evidence for the fact that the shake timer is still regulated by the 4096 divisor;
     25- **v6** games appear to do the same orchestration stuff, and the shake timer is still regulated by the 4096 divisor. The two games differ in the following way:
     26  - **DOTT** behaves like this: **(1193182.0 / 4096) * (3433 / __''4237''__) == ''236.027Hz''**;
     27  - **S&M** behaves like this: **(1193182.0 / 4096) * (3433 / __''4167''__) == ''239.992Hz''**;
    2628- **v7** games do something similar, again, but set up a base timer with a divisor equal to 3977, and the subtimer has a count of 4971, which means: **1193182.0 / 3977 * 3977 / 4971 = 240.029Hz**. I haven't checked the shake timer for this version yet but I suppose they are using the 1193182.0 / 3977 == 300Hz base frequency. Also, both DIG and FT do something strange in the SCUMM main loop when fetching the whole frame timer counter... anybody know what the heck is this? It seems to decrement something out of the quarter ticks counter every time it wraps around the negative numbers...
    2729