Genesis Core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4700
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Genesis Core

Postby Sorgelig » Tue May 14, 2019 4:41 pm

What's the benefit of turbo on console? All games are written for standard speed.

slingshot
Atari Super Hero
Atari Super Hero
Posts: 937
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis Core

Postby slingshot » Tue May 14, 2019 4:44 pm

Tried mostly 3D games, and turbo CPU clock helps them. Look at Race Drivin' for example, or F117 Night Storm.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 4:45 pm

Sonic 1/2/3, splatter house 2 are prime examples.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 4:46 pm

Sorgelig, it makes spinball road rash and other games with slowdown/framerate issues run without slowdown.

Same as the superfx overclock or the Gradius III sa1 hack.
Last edited by Grego2d on Tue May 14, 2019 5:02 pm, edited 1 time in total.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 4:57 pm

Also slingshot, if you look at my first attempt I'm just changing the rate of the clock, that version gives audio issues as well, so you might want to test on mister, this might only be an issue in the mister implementation.

slingshot
Atari Super Hero
Atari Super Hero
Posts: 937
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis Core

Postby slingshot » Tue May 14, 2019 5:12 pm

Grego2d wrote:Also slingshot, if you look at my first attempt I'm just changing the rate of the clock, that version gives audio issues as well, so you might want to test on mister, this might only be an issue in the mister implementation.

I cannot do it, because I don't have one. I've checked Sonic1 on MiST, didn't notice anything unusual with CPU Turbo ON.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4700
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Genesis Core

Postby Sorgelig » Tue May 14, 2019 5:17 pm

I never noticed slowdowns on Sonic 1/2

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 5:21 pm

Sorgelig, the only slow down in those games is when you lose a lot of rings. That's not what he's testing tho, overclocking causes audio issues in those games on mister.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 5:23 pm

Thank you for testing slingshot, how recent is your build of Genesis for mist? From the look of your code quite a bit is different.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 5:27 pm

I guess it would be prudent at this point to add an osd overclock option so I can see if audio problems clear up when disabled.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4700
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Genesis Core

Postby Sorgelig » Tue May 14, 2019 5:35 pm

Grego2d wrote:Couple of attempts and I think I have Z80 communication fixed. Audio is still messed up in most games, but it's improved. I think the remaining issues are caused by the 68k accessing the psg directly, but I'm not sure.

What kind of audio issues you have? which games?

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 5:39 pm

Wrong pitch/garbled sounds, sonic 1 2 and 3, splatterhouse 2, gunstar heroes, most games are having issues.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 5:44 pm

Just noticed sound debug option in Genesis.sv, recompiling with that so I can test FM/PSG individually.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 6:05 pm

Well, after testing it's both the FM and PSG having issues, hmmmm

In both cases some sounds are fine and others are messed up, Sonic 2 the jump sound is fine, other psg music sounds are wrong.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 6:46 pm

Added an osd option for turbo, turning off turbo after loading a game does fix the audio issues. Sorgelig, does the 68k access the FM chip directly as well as the PSG?
Last edited by Grego2d on Tue May 14, 2019 7:11 pm, edited 1 time in total.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 6:51 pm

More testing, now that I can control turbo from the osd I can see the psg is actually working correctly. Only FM sounds are a problem.

Interestingly, sonic spinball only uses the FM chip and it sounds fine besides being higher pitched.

And apparently road rash is similiar, fm only, audio plays back at higher rate when overclocked resulting in higher pitch.

Gonna try a new tactic, only accelerate ram/rom reads/writes.

slingshot
Atari Super Hero
Atari Super Hero
Posts: 937
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis Core

Postby slingshot » Tue May 14, 2019 7:41 pm

Grego2d wrote:More testing, now that I can control turbo from the osd I can see the psg is actually working correctly. Only FM sounds are a problem.

Interestingly, sonic spinball only uses the FM chip and it sounds fine besides being higher pitched.

And apparently road rash is similiar, fm only, audio plays back at higher rate when overclocked resulting in higher pitch.

Gonna try a new tactic, only accelerate ram/rom reads/writes.


The FM chip gets the same clock enable on MiSTer, as the CPU PHI1 phase, and it is also doubled then. Don't double the FM clock, and it'll be good.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 7:45 pm

Oh damn, I had not noticed that

Made the change, compiling. Thanks so much for your help slingshot :D

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 8:03 pm

Assuming this works I'll clean up the code and send a pull request to Sorgelig shortly.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Tue May 14, 2019 8:15 pm

Works perfectly, this is awesome, code cleanup and pull request incoming.

Here's a working build in the mean time:

https://ufile.io/2h7up0ic

Did some more testing, it's the small things that are surprisingly impressive. Quicker load times on menus, toe jam and Earl goes to map twice as fast. Less lag in tight situations, splatter house 2 turn around ghosts cause no lag at all. Quite an improvement. So far the only game I've found to have an issue is earthworm Jim, slight hiccups in the audio.

Sorgelig, points at which Sonic 2 lags:
Losing too many rings
Tubes on chemical plant zone
Water rising on chemical pz
Bonus stages

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Wed May 15, 2019 6:13 pm

I would have sent a pull request by now Sorgelig, however I did some minor refactoring and now Quartus won't produce a usable binary. I even reverted all my changes back to the working code and it produces cores that do nothing. Kind of at a loss here, just nuked my db/output_files/incremental_db folders, well see if that helps.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4700
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Genesis Core

Postby Sorgelig » Wed May 15, 2019 6:27 pm

Let me implement the Turbo by myself.
I know the core, so will do it.
It's just the feature i didn't think before. But not hard to implement.
Real turbo needs to include other tweaks. For example disable vdp fifo.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Wed May 15, 2019 6:32 pm

Sure, go ahead, was just trying to learn/help.

Btw did you try the build I posted on any of the games that have slowdown?

And out of curiosity, why would you need to disable the vdp fifo?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4700
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Genesis Core

Postby Sorgelig » Wed May 15, 2019 6:51 pm

I didn't express correctly. I mean disable fifo throttling.
I didn't try your build yet.

Grego2d
Atari User
Atari User
Posts: 39
Joined: Thu Dec 06, 2018 5:57 pm

Re: Genesis Core

Postby Grego2d » Wed May 15, 2019 7:02 pm

Ok, figured out the issue finally. Jesus, if you can't find a var Quartus throw a error not a warning...

Gonna send you a pull request when it's working anyway Sorgelig. If you use some of it cool, if not, no worries.


Return to “MiSTer”

Who is online

Users browsing this forum: glaucon1984 and 3 guests