Hi Calamity,
Oh that's very interesting, I guess we should write a little how-to post for W7 users as soon as the specific patches are adder to GM.
That's a good idea. I'm definitely willing to give the how-to post a go once we're sure things are working the way they should.
There's something that I'm not fully sure yet: are you really getting dynamic modelines working in W7? I mean, from your previous posts it seems that you've really observed it actually working. One obvious test case would be toki / snowbros, same resolution, quite different refresh, in case you can prove they're using the same video mode index and updating with the corresponding modeline. If this is true, then these are *very* good news indeed.
I can confirm the very good news, dynamic modelines *are* working in W7 :-). Thanks for providing the testcase with toki and snowbros btw, it's a good testcase. To make it even a bit more extreme I bumped the 256x224 modeline to 62Hz to create an even bigger difference for Toki and especially Snowbros. I have attached the logs for both games. They both run of the 256x224_62Hz modeline, recalibrating correctly to 59.61Hz and 57.5Hz respectively. Both audio and video are fully smooth and the log shows speed at 100%, with no audio buffer issues. Good news indeed
There are some non-trivial things though about getting the modelines setup properly. At first I was getting sort of random working/non-working resolutions. It was actually quite frustrating at the beginning, because I couldn't seem to find what was causing the erratic behaviour. After a lot of trial and error, I finally found out what steps need to be taken to get things working properly. Disclaimer of course applies, this is work/findings in progress, none of it is actually expected to work without creating new issues ;-)
There are two non-trivial steps to follow:1) The number of custom modelines to install must be > 16
If you install say 15 or 16 modelines, they will show up as installed resolutions, but GM will *not* (be able to) do any dynamic refresh rate adjustments. It attempts to switch them, but in fact it's just switching to the predefined soft15khz timings. So for any modeline list that contains =< 16 modelines, the dynamic modelines will not work. It will appear as if dynamic modelines just doesn't work in W7.
2) An extra step is needed for "Activating" the modelines/resolutions.
To get the list from step 1 really working, a number of extra "dummy" modelines need to be installed. It's pretty weird and I'm not sure what the logic behind it is, but for every few modelines that you install above number 16 (say three additional modelines 17-20), the first bunch of modelines from 1-16 become available for dynamic refresh rate adjustment. By adding more "dummy modelines" they all become available.
This probably needs an example. Suppose you want the following list of modelines activated for use with GM:
Modeline "256x224_62 15.65KHz 62.15Hz" 5.710 256 272 304 352 224 234 237 261 -hsync -vsync
Modeline "256x240_63 15.65KHz 62.65Hz" 5.710 256 272 304 352 240 242 245 261 -hsync -vsync
Modeline "280x224_62 15.66KHz 62.05Hz" 6.090 280 296 328 376 224 234 237 261 -hsync -vsync
Modeline "320x224_63 15.66KHz 62.71Hz" 6.940 320 336 368 424 224 234 237 261 -hsync -vsync
Modeline "320x240_63 15.66KHz 62.71Hz" 6.940 320 336 368 424 240 242 245 261 -hsync -vsync
Modeline "320x244_63 15.66KHz 62.65Hz" 7.040 320 336 368 424 244 246 249 265 -hsync -vsync
Modeline "352x223_62 15.66KHz 61.61Hz" 7.590 352 368 408 472 223 234 237 261 -hsync -vsync
Modeline "512x224_62 15.65KHz 62.26Hz" 10.920 512 536 584 672 224 234 237 261 -hsync -vsync
Modeline "512x240_62 15.65KHz 62.26Hz" 10.920 512 536 584 672 240 242 245 261 -hsync -vsync
Modeline "544x240_62 16.19KHz 62.05Hz" 11.660 544 568 624 720 240 242 245 261 -hsync -vsync
Modeline "544x242_63 16.19KHz 63.16Hz" 11.960 544 568 624 720 242 244 247 263 -hsync -vsync
Modeline "544x288_52 16.19KHz 52.41Hz" 11.660 544 568 624 720 288 290 293 309 -hsync -vsync
Modeline "656x296_52 16.20KHz 52.44Hz" 13.740 656 688 752 848 296 298 301 309 -hsync -vsync
Modeline "704x288_51 15.81KHz 51.17Hz" 14.800 704 736 808 936 288 290 293 309 -hsync -vsync
This sums to 14 modelines you want to install. As per step number 1, 14 < 16, so none of the modelines will work for dynamic refresh adjustment in GM. Now how to get them working? Answer: install additional "dummy" modelines.
The tricky part is that you just can't fill it up to 16 and have them all working. You actually have to fill it up more > 16. So adding a modeline nr 17 to the list will start to make the first resolutions from the 1-16 list available for dynamic refresh rate adjustments, starting with the smallest resolutions. Add some more "dummy" modelines and more from the 1-16 list get "activated". (Note that the dummy modelines seem to need at least some resolutions that are larger than the largest ones in the "to be activated list".)
For example in my current modeline list I have added the following "dummies":
modeline "744x287_50" 14.21 744 772 840 908 287 290 293 313 -HSync -VSync
modeline "745x286_50" 14.21 745 772 840 908 286 290 293 313 -HSync -VSync
modeline "746x285_50" 14.21 746 772 840 908 285 290 293 313 -HSync -VSync
modeline "747x284_50" 14.21 747 772 840 908 284 290 293 313 -HSync -VSync
modeline "748x283_50" 14.21 748 772 840 908 283 290 293 313 -HSync -VSync
modeline "749x282_50" 14.21 749 772 840 908 282 290 293 313 -HSync -VSync
modeline "750x281_50" 14.21 750 772 840 908 281 290 293 313 -HSync -VSync
modeline "751x280_50" 14.21 751 772 840 908 280 290 293 313 -HSync -VSync
modeline "752x279_50" 14.21 752 772 840 908 279 290 293 313 -HSync -VSync
modeline "753x278_50" 14.21 753 772 840 908 278 290 293 313 -HSync -VSync
modeline "754x277_50" 14.21 754 772 840 908 277 290 293 313 -HSync -VSync
modeline "755x276_50" 14.21 755 772 840 908 276 290 293 313 -HSync -VSync
modeline "704x240_61" 14.80 704 736 808 936 240 242 245 261 -HSync -VSync
I wish there was some clear logic to it. At first I thought every resolution just needed a "shadow" modeline, or that there needs to be two refresh rates per resolution (50/60hz) etc. But it seems none of that. Maybe these issues can be resolved by further findings/research, and/or adaption of GM, I don't know, but in any case I'm happy that we're having a real "proof of concept" for working dynamic modelines in W7!
The next interesting thing would be to check if we can fool W7 to use magic resolutions.
That sounds interesting. I'm not too familiar with the concept of magic resolutions yet. Are there any steps I can take to test it?
On more positive notes for the W7 experience, I've been testing the Playstation driver and in *D3D* mode it runs interlace flawlessly and also does the realtime switching between the progressive and interlace playstation modes without problems now!! DDraw on the other hand bombs out directly with an error when trying to open an interlace screen (see attached logs). Hopefully it can be fixed for DD also.
I'm afraid that's the progressive/interlaced switch bug for DirectDraw, and unfortunately I don't believe we can fix that. You're running your desktop at a progressive resolution and that produces the crash when switching to interlace.
Ah yes, but I'm also running WinUAE on my setup (site:
http://www.winuae.net/ , Git source:
https://github.com/tonioni/WinUAE), and it has working progressive/interlaced switching for DDraw (and D3D). So there's a living example of it on my W7 machine. I spent some time in the past with the author testing it, to come out at fully working DDraw progressive/laced switching. It can even do it in realtime as the emulated machine calls for it by adding some lines to the configuration file, like in the example below.
displaydata=25.000000,t=lace,pal,lace,gfx_width_fullscreen=740,gfx_height_fullscreen=574,gfx_linemode=double,gfx_refreshrate=25,gfx_interlace=true
displaydata=50.000000,t=lof,pal,nlace,gfx_width_fullscreen=740,gfx_height_fullscreen=287,gfx_linemode=none,gfx_refreshrate=50,gfx_interlace=false
So for me it's not a question whether the progressive/interlace switching can work on W7. Maybe we can revisit the topic some time in the future to see whether or not it could be made to work for GM also?
BTW, my good-old laptop died last week, I got a new one that comes with W7 (no ATI card unfortunately), anyway I now have system to test generic W7 stuff at least.
That's great news
. Hopefully it will bring the W7 implementation one step closer to its XP counterpart.
Would it be an idea to make a post comparing GM's functionality in XP versus W7, feature wise? That would at least help us to get some idea of where it's lagging and what could possibly still be improved.