MiSTer-devel / NeoGeo_MiSTer

NeoGeo for MiSTer
GNU General Public License v2.0
148 stars 78 forks source link

Change to AES clock #134

Closed paulb-nl closed 3 years ago

atrac17 commented 3 years ago

Wouldn't adding a wrapper for the clocks make more sense to keep MVS timings too? MVS timings are the proper way to play the games. I can't read everything. I just see you changing the main clock to an NTSC AES 48.335658.

NTSC AES
24.167829MHz main clock / 4 = 6.041957MHz pixel clock
6.041957MHz / 384 pixels per line = 15.734kHz horizontal rate
15.734kHz / 264 lines = 59.599 frames/second

PAL AES
24.167829MHz main clock / 4 = 6.041957MHz pixel clock
6.041957MHz / 384 pixels per line = 15.734kHz horizontal rate
15.734kHz / 312 lines = 50.429 frames/second

MVS
24.000000MHz main clock / 4 = 6.000000MHz pixel clock
6MHz / 384 pixels per line = 15.625kHz horizontal rate
15.625kHz / 264 lines = 59.1856 frames/second
paulb-nl commented 3 years ago

Yes it would be good if the clock speed can be switched between AES and MVS but I don't know if the core will have timing problems. Maybe Sorgelig can answer it.

AES clock with 59.59Hz is more compatible with HDTVs and it fits a bit better horizontally with consumer CRT TVs.

atrac17 commented 3 years ago

Yes, I understand the logic behind this change to an extent. I just don't fully agree with it. CRT's have service menu's/ pot adjustments for h_size. If a user has sync issues with a consumer set they can get an extron or other device. That's why the AES clock is different to begin with.

For HDTV, I don't think it's necessary, if it is then it should have a toggle/wrapper like the cave68000. This core was the reason I got a MiSTer; for MVS functionality. The speed isn't right otherwise. I mean no disrespect by this. Thanks for fixing sprites in Yanchamaru.

sorgelig commented 3 years ago

Ok. i will try to add automatic clock switch depending on AES/MVS. So i hold on this PR for now.

paulb-nl commented 3 years ago

Oh I am compiling a build with clock switching now :) It will change the clock depending on the "System Type" setting.

atrac17 commented 3 years ago

Also, dependent upon AES revision the clock can be 61.18Hz.

1

paulb-nl commented 3 years ago

With some quick testing the clock switch seems to work well but it may need some better testing.

Here is the rbf if someone wants to test. NeoGeo_aes.rbf.zip

sorgelig commented 3 years ago

61.18Hz is more far from TV spec than 59.60Hz, so it's enough to support the older revision of AES.