Change core clock from 59.18 hz to 60 hz
Re: Change core clock from 59.18 hz to 60 hz
Maybe I am mistaken, but I always though the vsync_adjust param to be related to the scaler and therefore attached to the hdmi output (unless you are using the scaler on vga). I personally don't have any issues with hdmi output on any of my lcd tvs using the original neogeo core. The tweak is aimed more at forcing 60hz for crt usage. Without this fix, on my end, I have a slight roll/wave on my sony trinitron. Now the picture is more stable at the cost of accuracy I guess.
Re: Change core clock from 59.18 hz to 60 hz
You are actually wrong here, vsync_adjust only applies to hdmi-output.
Re: Change core clock from 59.18 hz to 60 hz
I think this is what I said vsync_adjust applies to hdmi output.
Re: Change core clock from 59.18 hz to 60 hz
Thank you for this. This has fixed the issue of stuttering scrolling on my TCL 55R617. I'd like to try this with the double dragon core as well, as the 57hz refresh rate causes stuttery scrolling on my TV. However speeding that game up to 60hz would probably affect gameplay more noticeably than the neo's slight increase?
Re: Change core clock from 59.18 hz to 60 hz
I can have a look for you. Is it the jtdd core?rastan wrote: ↑Wed Apr 07, 2021 4:57 pm Thank you for this. This has fixed the issue of stuttering scrolling on my TCL 55R617. I'd like to try this with the double dragon core as well, as the 57hz refresh rate causes stuttery scrolling on my TV. However speeding that game up to 60hz would probably affect gameplay more noticeably than the neo's slight increase?
Re: Change core clock from 59.18 hz to 60 hz
I am sure with everything else on his plate, and he understands how individual cores interface with the main framework that Sorgelig got his reasons.Insert Disk Two wrote: ↑Sat Jan 16, 2021 6:46 pm Updates on Neogeo are done by Sorgelig himself and he does not want to include this option.
Plus he is not fond of 15khz CRTs so there no motivation on his part to include the option in the core.
It is my great regret that we live in an age that is proud of machines that think and suspicious of people who try to.
Re: Change core clock from 59.18 hz to 60 hz
Yes. thanks for offering to look at it!uberyoji wrote: ↑Wed Apr 07, 2021 10:35 pmI can have a look for you. Is it the jtdd core?rastan wrote: ↑Wed Apr 07, 2021 4:57 pm Thank you for this. This has fixed the issue of stuttering scrolling on my TCL 55R617. I'd like to try this with the double dragon core as well, as the 57hz refresh rate causes stuttery scrolling on my TV. However speeding that game up to 60hz would probably affect gameplay more noticeably than the neo's slight increase?
-
- Posts: 221
- Joined: Sun May 24, 2020 7:59 pm
- Has thanked: 16 times
- Been thanked: 28 times
Re: Change core clock from 59.18 hz to 60 hz
Ummm adding a 60hz option would be beneficial to LCD screen users not CRT.darksakul wrote: ↑Thu Apr 08, 2021 1:39 pmI am sure with everything else on his plate, and he understands how individual cores interface with the main framework that Sorgelig got his reasons.Insert Disk Two wrote: ↑Sat Jan 16, 2021 6:46 pm Updates on Neogeo are done by Sorgelig himself and he does not want to include this option.
Plus he is not fond of 15khz CRTs so there no motivation on his part to include the option in the core.
Re: Change core clock from 59.18 hz to 60 hz
Nothing to do with what I was talking aboutInsert Disk Two wrote: ↑Wed Jun 02, 2021 11:14 am
Ummm adding a 60hz option would be beneficial to LCD screen users not CRT.
15Khz is the carrier frequency not the refresh rate.
It is my great regret that we live in an age that is proud of machines that think and suspicious of people who try to.
Re: Change core clock from 59.18 hz to 60 hz
Hello mate, any chance of 'NeoGeo_20210713.rbf' being given your magic touch? Thanks!uberyoji wrote: ↑Thu Apr 01, 2021 10:06 pm Not too complicated honestly if you have a little xp in software devs. It is basically those steps high level:
1) install Quartus lite v17.0 (once)
2) Install git (once)
3) Get/update source code from repo
4) Modify Entity pll from 96 to 97.330180 and 48 to 48.665090
5) Compile core
6) Profit
I plan to maintain the 60hz fork forever so no worries, I will always update this thread each time there is a version in a timely fashion now that my setup is done. I put some notifications on the repo to alert myself when the master is updated.
Re: Change core clock from 59.18 hz to 60 hz
Sure. But if I read the github thread correctly, sorgelig agreed to make the mvs and aes timing different. It might fix our crt problem by selecting aes. I will have to check if I can still apply the mod.
You can see the discussion here: github.com/MiSTer-devel/NeoGeo_MiSTer/pull/134
You can see the discussion here: github.com/MiSTer-devel/NeoGeo_MiSTer/pull/134
-
- Core Developer
- Posts: 216
- Joined: Sun May 24, 2020 8:48 pm
- Has thanked: 49 times
- Been thanked: 285 times
Re: Change core clock from 59.18 hz to 60 hz
Since there is now a clock switch used in the core you'll have to change it to 60Hz in a different way.
There are 2 numbers here: https://github.com/MiSTer-devel/NeoGeo_ ... eo.sv#L373
The first is for MVS and the second for AES. The number for 60Hz should be 3148288251. So just change one or both numbers.
You might also still need to change the PLL to the higher clocks if it is unstable.
There are 2 numbers here: https://github.com/MiSTer-devel/NeoGeo_ ... eo.sv#L373
Code: Select all
cfg_data <= sys_mvs_r ? 2576980378 : 2865308404;
You might also still need to change the PLL to the higher clocks if it is unstable.
Re: Change core clock from 59.18 hz to 60 hz
I finally decided to get back to this. How do you calculate the fractionnal? On my end I approximated to 3148289000 but I can use your constant instead. I am building a version and will test shortly.paulbnl wrote: ↑Tue Jul 20, 2021 10:21 am Since there is now a clock switch used in the core you'll have to change it to 60Hz in a different way.
There are 2 numbers here: https://github.com/MiSTer-devel/NeoGeo_ ... eo.sv#L373
The first is for MVS and the second for AES. The number for 60Hz should be 3148288251. So just change one or both numbers.Code: Select all
cfg_data <= sys_mvs_r ? 2576980378 : 2865308404;
You might also still need to change the PLL to the higher clocks if it is unstable.
Re: Change core clock from 59.18 hz to 60 hz
Here's the latest version fixed at 60hz.
https://mega.nz/file/sxUi3BrC#CBxoZxTKy ... h3eQ9Abz44
https://mega.nz/file/sxUi3BrC#CBxoZxTKy ... h3eQ9Abz44
Re: Change core clock from 59.18 hz to 60 hz
Updated folder with a patched version of the Sept 8th release.
https://mega.nz/folder/xlUVEIzB#vKdNV8vkMuQixxPgItnV2w
https://mega.nz/folder/xlUVEIzB#vKdNV8vkMuQixxPgItnV2w
-
- Core Developer
- Posts: 216
- Joined: Sun May 24, 2020 8:48 pm
- Has thanked: 49 times
- Been thanked: 285 times
Re: Change core clock from 59.18 hz to 60 hz
I just changed the PLL to the higher clock and then the value is at Advanced Parameters -> K-Fractional Division Value (DSM).
-
- Posts: 6
- Joined: Thu Jul 08, 2021 9:49 am
- Has thanked: 2 times
Re: Change core clock from 59.18 hz to 60 hz
Hi everyone, would it be possible to make a similar change to the Game Boy/GBA cores? So, adjusting the core clock from 59.7Hz to 60Hz? These systems are really the only ones giving my TV (Sony XH90) trouble, I get frequent stuttering even with vsync_adjust=2. I'm not able to build the change myself unfortunately as I'm on MacOS.
Re: Change core clock from 59.18 hz to 60 hz
What I do on my end is I toggle the Stabilize Video(buffer) on. Try it out and let me know.wondermagenta wrote: ↑Mon Sep 27, 2021 6:39 pm Hi everyone, would it be possible to make a similar change to the Game Boy/GBA cores? So, adjusting the core clock from 59.7Hz to 60Hz? These systems are really the only ones giving my TV (Sony XH90) trouble, I get frequent stuttering even with vsync_adjust=2. I'm not able to build the change myself unfortunately as I'm on MacOS.
-
- Posts: 6
- Joined: Thu Jul 08, 2021 9:49 am
- Has thanked: 2 times
Re: Change core clock from 59.18 hz to 60 hz
I do have that option turned on actually (without it, the image just completely goes haywire,) but unfortunately the stutter I mentioned is present either way. It's relatively subtle, but personally I believe it has to do with my TV deliberately dropping frames to keep pace with the GBA's 59.7Hz, so the only real fix would be to run at 60Hz I feel (like the GBA Consolizer does for example.)
-
- Posts: 6
- Joined: Thu Jul 08, 2021 9:49 am
- Has thanked: 2 times
Re: Change core clock from 59.18 hz to 60 hz
Just wanted to say thank you for looking into this, I know it's gonna be a big help for a ton of people.
Re: Change core clock from 59.18 hz to 60 hz
Arg. I am a bit screwed. The timings are already tweaked on the pll component. I would need base timings to recalculate the ratios. Anyone knows the proper timings? Gameboy is quite far from the 96/48 baseline.
Currently this is what is set:
GBA
- 100.663296
- 50.331648
Gameboy
- 67.108864
- 33.554432
Currently this is what is set:
GBA
- 100.663296
- 50.331648
Gameboy
- 67.108864
- 33.554432
-
- Posts: 6
- Joined: Thu Jul 08, 2021 9:49 am
- Has thanked: 2 times
-
- Core Developer
- Posts: 385
- Joined: Sat May 23, 2020 12:55 pm
- Has thanked: 42 times
- Been thanked: 414 times
Re: Change core clock from 59.18 hz to 60 hz
For GBA:
base clock is 16.78Mhz.
Core is using 6x this clock, so 100.68 Mhz.
In total there are 280896 pixels (visible and blank), resulting in 59.73 Hz
So let's do the math other way around: 60hz * 280896 = 16.853760 mhz * 6 = 101.122560Mhz
You can probably round it a bit if the PLL cannot directly match it.
For Gameboy:
base clock is 4.194Mhz.
Core is using 8x this clock, so 33.552 Mhz. (core is actually using 33.56)
In total there are 70224 pixels (visible and blank), resulting in 59.72 Hz
So let's do the math other way around: 60hz * 70224 = 4.213440 mhz * 8 = 33.707520 Mhz
You also need to set SDRAM clock to 16 times clock: 4.213440 mhz * 16 = 67.415040 Mhz (currently 67.12)
Make sure both clocks are excatly 1:2 in ratio!
I hope i didn't miscalculate somewhere, that's why i kept the math here.
Have fun!
base clock is 16.78Mhz.
Core is using 6x this clock, so 100.68 Mhz.
In total there are 280896 pixels (visible and blank), resulting in 59.73 Hz
So let's do the math other way around: 60hz * 280896 = 16.853760 mhz * 6 = 101.122560Mhz
You can probably round it a bit if the PLL cannot directly match it.
For Gameboy:
base clock is 4.194Mhz.
Core is using 8x this clock, so 33.552 Mhz. (core is actually using 33.56)
In total there are 70224 pixels (visible and blank), resulting in 59.72 Hz
So let's do the math other way around: 60hz * 70224 = 4.213440 mhz * 8 = 33.707520 Mhz
You also need to set SDRAM clock to 16 times clock: 4.213440 mhz * 16 = 67.415040 Mhz (currently 67.12)
Make sure both clocks are excatly 1:2 in ratio!
I hope i didn't miscalculate somewhere, that's why i kept the math here.
Have fun!
-
- Posts: 6
- Joined: Thu Jul 08, 2021 9:49 am
- Has thanked: 2 times
Re: Change core clock from 59.18 hz to 60 hz
Amazing, thank you so much! (and Robert for providing the necessary math) I don't have access to my MiSTer at the moment but I should be able to report back by Tuesday at the latest.
- emmadness
- Posts: 29
- Joined: Sun May 24, 2020 6:48 pm
- Location: Argentina
- Been thanked: 1 time
- Contact:
Re: Change core clock from 59.18 hz to 60 hz
Thanks for the Toaplan "extras" I was looking for; It works like a charm.
Will you upload more stuff? Thank you in advance and a big greeting from Argentina!