Changes between Version 1 and Version 2 of Ticket #13354, comment 7


Ignore:
Timestamp:
Mar 29, 2022, 12:14:19 PM (2 years ago)
Author:
AndywinXp

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13354, comment 7

    v1 v2  
    66
    77Right now I have taken these notes from my own disasms:
    8 - MANIAC **v0** sets the PIT only when playing sound, and when it's not doing that the divisor is defaulted to 0, which means 65536; this would yield a game frequency of about 18.21Hz, which is very slow, but the reality is that ''SCUMM works with quarter frames'' and ''the game processes three game frames for each engine frame'', so we have to multiply 18.21 by 4 * 3, finally obtaining about 218.48Hz which matches the original speed (this was compared on DosBox);
    9 - **v1-4** games all appear to run on PIT in which the divisor is 0x13B1 (5041); this is true also for the shake effects, but be aware that the game timer and the shake timer ''are different entities'' and are not interchangeable (unlike UrQuan did on his implementation); I was able to match DosBox time very accurately when drowning Guybrush in MI1 EGA and VGA.
     8- MANIAC **v0** sets the PIT only when playing sound, and when it's not doing that the divisor is defaulted to 0, which means 65536; this would yield a game frequency of about 18.21Hz, which is very slow, but the reality is that ''SCUMM works with quarter frames'' and ''the game processes three game frames for each engine frame'', so we have to multiply 18.21 by 4 * 3, finally obtaining about **218.48Hz** which matches the original speed (this was compared on DosBox);
     9- **v1-4** games all appear to run on PIT in which the divisor is 0x13B1 (5041), yielding about **236.6955Hz**; this is true also for the shake effects, but be aware that the game timer and the shake timer ''are different entities'' and are not interchangeable (unlike UrQuan did on his implementation); I was able to match DosBox time very accurately when drowning Guybrush in MI1 EGA and VGA.
    1010- Starting from **v5**, the interpreters set up some kind of timer orchestrator which handles several "sub-timers"; the base timer seems to be the iMUSE timer (divisor: 0x1000 or 4096 in decimal, yielding about 291.3042 Hz) ''which is used as the shake timer as well''. The game timer was a bit tricky to obtain, here's the algorithm for reference:
    1111