Slowdown accuracy for cv1k games on MAME is almost perfect

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
User avatar
Plasmo
Posts: 3502
Joined: Wed Jan 26, 2005 6:02 pm
Location: In a storm
Contact:

Slowdown accuracy for cv1k games on MAME is almost perfect

Post by Plasmo »

I'm likely the wrong person to open this topic. However, noone else wants to do the job so I figured that spreading the knowledge in this place as well might be a good thing.

For some people here, this might be old news. This topic is specifically directed at those who haven't heard of it yet. As it appears, this has been around for quite some time but still hasn't entered common knowledge yet. Let's change this!

I was browsing the good old cave-stg forum and found this thread. To quote the forum user "el_rika":
el_rika wrote:There are two kinds of slowdown that occur in a cv1000 game:
1. CPU dependant
2. Blitter dependant
CPU alone will get the major sources of slowdown, blitter will help smooth it out. Using both of these, we are able to tweak the slowdown so that it's almost arcade perfect. The results are absolutely stunning! We are talking about 95%+ slowdown accuracy!

The job now is to look at PCB footage and tweak the slowdown as much as possible. The user "Pearl" is working closely together with players of the respective games and has achieved great results. Our findings are summarized as follows (tested under Mame 0.219):

Code: Select all

Mushihimesama:      37.6% cpu, 56% blitter
Pink Sweets:        37.2% cpu, blitter off
Ibara Black Label:  50% cpu, blitter off [still in progress!]
I will update this opening post with data for the other games as well as soon as we are able to achieve satisfying results.

Please play around with the numbers yourself and tell us about your results! Figuring out the best settings for each game is a huge undertaking and can only be achieved as a community effort.
Last edited by Plasmo on Fri Apr 03, 2020 10:09 am, edited 1 time in total.
I like chocolate milk

My highscores | Twitter | Twitch | YouTube
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Great findings :D Just a few small observations.

Lets use absolute values for CPU in Mhz (Machine Information, after setting the %). 360 ports handle slowdown differently. It's there in most parts, as in pcb, but many stuttery parts are reduced, and this can be tricky. Use pcb as much as possible for comparison.

Important to note is that the CPU induced slowdown is generally smoother, while the blitter one is a bit more stuttery. This is helpful in identifying which sections depend on what.

All Mushihime games rely on heavy CPU underclocking. They run at the lowest clocks in all the library. My numbers for Mushihime-sama are very close to yours: 40.6 Mhz and 57 blitter (i use an older mame version so the actual effect of the numbers could be identical) :wink:
Futari 1.5 is even lower (35.5 Mhz), but also a bit trickier yo get right, as the overall game is much less linear, and Reco and Palm have very different graphical effects for shot/laser, which drastically affect slowdown. I'm certain Palm needs a lower blitter throughout the entire game.

Also, in Futari 1.5 (BL has no issues), whatever settings are used, the brief three seconds (blitter induced) slowdown at the stage 3 boss's fourth?? pattern (when the little rock appears) can not be achieved without breaking the rest of the game's slowdown (only with Reco, Palm is good).
So, perfect accuracy can not be achieved in all games, but very close, yes!

Espgaluda 2 runs at a much higher CPU frequency (around 50 Mhz, maybe just a little lower) and relies on blitter for most of the slowdown (and it has a lot of that if played properly).

Daifukkatsu 1.0, 1.5 are not difficult to set, as they have a very noticeable jumpiness flow/speed issue if the CPU is set too low, at the very begining of both stage 1 and 3. The PCB has it on stage 3 (with any of the ships, but more noticeable with C), so taking it as a guideline basically sets the CPU for the entire game.

Muchi, apart from the slight 5 seconds loading at the begining of each levels, which reduces the speed of the game slightly, can be set to play very very close to pcb, with its linear slowdown like Ibara and Pink.

I'll come back with more info, numbers to compare and examples, to make these games playable for evwryone still interested :P
Bassa-Bassa
Posts: 1161
Joined: Tue Mar 12, 2019 5:18 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Bassa-Bassa »

Hi, I'm not sure if this post still has usable data, but still it's worth linking even if only to see how old the subject is -

viewtopic.php?p=1276872#p1276872

That's way before the Groovymame version which adds the feature to save CPU%/blitter delay settings, which I think it's a necessary tool to test this (and then play the games) in a reasonable way. Groovymame in fact helps with the input lag (and it's actually the only good version for CRT usage), so it's also worth linking to one of Xyga's post explaining the whys and hows:

viewtopic.php?p=1367277#p1367277

As I mention in that thread, I more than welcome a thread like this and never understood why it was taking so long - I just could not start it when my experience with actual CV1k PCBs is zero. Xyga's right that it may come off counterproductive if a non-recent version of (Groovy)mame is used, as well as Android (unadvised by Mame devs themselves), if we're after accuracy in a general sense, that is. CV1k emulation may be affected by improvements in other drivers anytime.

At any rate, reporting which Mame version are you testing is crucial in a thread like this.

(A good addition to the first post may also be a list of links to PCB videos that the people may find here to know as many opinions as possible, btw.)

Also, link to the Groovymame forum, where I found everything I needed to know to configure it - it's not really that hard:

http://forum.arcadecontrols.com/index.p ... ,52.0.html
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Quick [crappy] run of Mushihime-sama ultra up to level 4 mid boss.

https://youtu.be/5BWclKbSbKk

(the small annoying stutters are from youtube rendering, not the video itself)

Though maybe a tad slower in some moments (ex: the level 4 mid boss seems to start the last pattern a bit slower than pcb..or not?), it is noticeably closer to pcb than the ps2 port.
As a small observation, the ps2 port also lacks the on-the-fly blitter management that exists in the pcb hardware, that affects a few spots in the game (very few luckily). Just like mame, it uses a pre-set CPU and Blitter for the entire game. {probably the same case with Ibara}
User avatar
CStarFlare
Posts: 2999
Joined: Tue Feb 19, 2008 4:41 am

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by CStarFlare »

Excellent. I've been holding off on adding these as available in MAME on Restart Syndrome because of their inaccuracy - as more games get "perfected" I'll add them.

What an exciting time. Now that the puzzle's being put together, maybe it's time to start making an SDOJ pool? ;)
Restart Syndrome::
Shmup leaderboards and Video Index! | My score history on RS
User avatar
bytestorm
Posts: 175
Joined: Wed Nov 09, 2011 5:19 am
Location: Sweden

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by bytestorm »

Awesome! Thanks for taking the initative and also for sharing. Hope we can get them close :D
Looking to buy, working or faulty: Dodonpachi, Deathsmiles, Ibara, Rainbow Islands, Bubble Bobble.
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Futari 1.5 maniac quick test (Abnormal Palm)

Settings: cpu 37.9 mhz, blitter 54%


https://vimeo.com/406256643

Just a bit slower in some spots (ex. level 1 boss lava shot, level 4 boss third pattern is smoother but just a bit slower), but also very close.

Reco Normal needs a lower CPU, same blitter
User avatar
nesrulz
Posts: 181
Joined: Wed Nov 13, 2013 6:01 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by nesrulz »

I'm not a fan I'm just a regular player. This settings works great for me. Futari rulz.

Rgds,
Miroslav
User avatar
nesrulz
Posts: 181
Joined: Wed Nov 13, 2013 6:01 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by nesrulz »

And guys thanks for the reminder.
I forgot how much the 1.54 version is better than the BL and Another Ver.

54/37 here. o/
User avatar
emphatic
Posts: 7917
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by emphatic »

Very cool, guys. Very cool.
Image | My games - http://www.emphatic.se | (Click) I have YEN stickers for sale
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
Despatche
Posts: 4196
Joined: Thu Dec 02, 2010 11:05 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Despatche »

Excellent. Now to just add an easy way to muscle out slowdown altogether, and we're good.
CStarFlare wrote:Excellent. I've been holding off on adding these as available in MAME on Restart Syndrome because of their inaccuracy - as more games get "perfected" I'll add them.
Considering that the inaccurate slowdown makes the games harder instead of easier, you might as well go ahead and add them.
Rage Pro, Rage Fury, Rage MAXX!
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Despatche wrote:Excellent. Now to just add an easy way to muscle out slowdown altogether, and we're good.
That's easy. Just play the games without blitter delay activated and at full CPU. Basically just start the games and do nothing more. Some mid bosses and bosses deaths slow-down will still occur, as those are hard-coded, but 99% will be slowdown-free.
Playing these games like that though feels less intense and dramatic for me. That near miss feel that those slowed down moments give you, are the spices of the experience.
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Deathsmiles quick test (cpu 52.5 Mhz, blitter 59%) Lvl 3 forest & cemetery:

https://vimeo.com/407969615

Observations: very good overall, not easy to tweak, as even on pcb, many slow parts don't always trigger the same way, due to very very small yet drastically affecting factors (player position, type of shot, quantity of moving objects).

[Only] Rosa needs a lower blitter (57%) and a higher CPU clock (+ 1.5 Mhz) due to the more complex shot/laser graphics that produces more slowdown. (Pcb is inconsistent in some instances with Rosa as well, sometimes it slows down drastically, sometimes not as much).
User avatar
Udderdude
Posts: 6266
Joined: Thu Feb 16, 2006 7:55 am
Location: Canada
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Udderdude »

I definitely noticed back when I had access to a DS PCB that the slowdown seemed to have a mind of it's own ..
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Quick question: does Deathsmiles MBL slowdown a bit more than vanilla? Black Labels have a tendency to do that.

Could anyone link me a pcb (preferrably Windia) MBL playthrough (not lvl999)?
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

So, Deathsmiles MBL is indeed a bit different in terms of slowdown especially when you activate 1000 Power mode. Windia's full laser slows down the game much more agressively than in vanilla. Capser's shot as well.

1.5 mhz more and 2% less blitter usually does the job. For Windia though, 54% blitter seems to be the sweet spot. Taking a little break from it.


Meantime here's an Espgaluda 2 quick test with Cpu at 49.76 mhz and blitter delay 63%. There are spots when the game slows down, depending on how you play and what shot you use, especially in later levels, but most of the slowdown occurs in awakening and ultra-awakening, mid bosses and bosses.

https://streamable.com/mhvaqf

(Any audio delay or slight stutters are due to streaming conversion)
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Daifukkatsu 1.5, what a gorgeous game :o

Different ships/modes produce more or less agressive slowdown, with B/C Strong ships' shot producing the most. Unlike Futari though, it seems on pcb Cave didn't use different CPU/Blitter values, to have similar timings with all ships/modes.

On pcb, mostly with green and blue, the game has certain parts where it exhibits that CPU dependant spasmic slowdown seen in Futari (and most others).

Too high CPU clock value, eliminates some of the subtle slowdown found on pcb, while too low produces too much in-out slowdowns (spastic). There are some spots affected exclusively by blitter (ex. 2nd Boss penultimate attack), so it's a matter of fine-tuning it.

Quick test with B Power:
https://streamable.com/nppkmt

Quick test with B Strong (a bit longer):
https://vimeo.com/422407474

Cpu 43.62 Mhz
Blitter 59%

As always, the upload conversion produces a little stutter in a couple instances, so ignore it.

As always, the upload conversion produces a little stutter in a couple instances, so ignore it.
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by cools »

Great thread. I've been playing for years with blitter at 63% across all games (no CPU adjustment) knowing full well it wasn't quite right, but good enough to be playable.

I'll try to help out when I have some time spare.
Image
Bassa-Bassa
Posts: 1161
Joined: Tue Mar 12, 2019 5:18 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Bassa-Bassa »

Hey cools, be aware that, unless something changed, el rika's testing and findings are made under Android and a non-recent Mame version, so they may have become obsolete/non-extrapolable at this point.
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by trap15 »

el_rika wrote:it seems on pcb Cave didn't use different CPU/Blitter values
CAVE didn't "use" any values for anything. They have the same specs across boards. The difference is in how the games use the resources. An ideal solution in emulation works for all games with no tweaking, because the games do not do any tweaking.

The CPU performance difference is caused by a combination of cache efficiency and memory waitstates. The blitter performance has not been adequately profiled, and thus the performance of it is unknown for the various blitting modes. The cache is not emulated at all. If these were researched and properly implemented (not saying this is easy; in fact modeling and implementing cache performance penalties is extremely painful and the result would be very host-CPU intensive), there would be no need to tweak anything.

As such, despite CPU performance hacks modeling the performance more closely, you still will never get 100% correct performance with just these tweaks. You can get close, but there'll certainly always be a situation that behaves a little different.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by cools »

Bassa-Bassa wrote:Hey cools, be aware that, unless something changed, el rika's testing and findings are made under Android and a non-recent Mame version, so they may have become obsolete/non-extrapolable at this point.
Yeah I'm aware. My old blitter settings have been okay for the amount of time I play, but any improvement is welcome until the emulation (re: trap15's reply) is 100%. I'm not one for hand tweaking every game - witness my recommendation of 0.8 gamma in mame.ini rather than altering every game to be precise.
Image
Bassa-Bassa
Posts: 1161
Joined: Tue Mar 12, 2019 5:18 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Bassa-Bassa »

Not CV1k, but have you found a better CPU% setting than Mame's default for Progear?
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by cools »

Sorry no, I don't enjoy Progear all that much other than to point out it's a 16:9 game every time it gets mentioned :D
Image
Bassa-Bassa
Posts: 1161
Joined: Tue Mar 12, 2019 5:18 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Bassa-Bassa »

The poor thing never got a proper monitor to show itself till it was well forgotten, then.
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

trap15 wrote:
el_rika wrote:it seems on pcb Cave didn't use different CPU/Blitter values
CAVE didn't "use" any values for anything. They have the same specs across boards. The difference is in how the games use the resources. An ideal solution in emulation works for all games with no tweaking, because the games do not do any tweaking.

The CPU performance difference is caused by a combination of cache efficiency and memory waitstates. The blitter performance has not been adequately profiled, and thus the performance of it is unknown for the various blitting modes. The cache is not emulated at all. If these were researched and properly implemented (not saying this is easy; in fact modeling and implementing cache performance penalties is extremely painful and the result would be very host-CPU intensive), there would be no need to tweak anything.

As such, despite CPU performance hacks modeling the performance more closely, you still will never get 100% correct performance with just these tweaks. You can get close, but there'll certainly always be a situation that behaves a little different.
Thanks very much for answering trap.

I remember MetalliC (the one that originally implemented the blitter hack,) saying that Cave did a very 'hacky' job with their SH3 development, and that's why these hacks work so well in mame :D

It's very true that 100% accuracy can not be achieved. There are parts, very quick and thankfully very few,(Yagawa games seem to not have them), that can not be reproduced without breaking the rest of the game.

Ex: there is a certain 3 seconds slowdown in Futari 3rd level Boss, that can be perfectly reproduced using 59% blitter (58 doesn't do the trick), but for the 99% of the game, a 59% blitter is way too slow. This must also be coupled with the correct CPU value, because most major slowdowns (where bullets fill the screen but there are few explosions), are determined by the CPU.


If i understand correctly, this type of fine tuning is determined by unemulated elements, like cache and waitstates?

All in all, with the current state of the cv1000 driver in mame, the combination of CPU value and Blitter % can get you good results in comparison to originals.
el_rika
Posts: 346
Joined: Sun Oct 30, 2016 8:44 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by el_rika »

Bassa-Bassa wrote:Not CV1k, but have you found a better CPU% setting than Mame's default for Progear?
The mame default (already underclocked to 74% - 11.8 Mhz) is pretty good. I personally think that a little slower CPU clock (i use 70% - 11.12 Mhz) matches the timings in the intense slowdown moments more closely. Emulation may also lack some elements though, in the waitstates area.
Bassa-Bassa
Posts: 1161
Joined: Tue Mar 12, 2019 5:18 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Bassa-Bassa »

Unimplemented waitstates emulation is what makes CPS/CPS2 slowdowns non-accurate in Mame and forces the preset underclock, indeed. Last I read regarding Progear, it was cools the one saying that the preset CPU% wasn't enough for accurate-enough slowdowns, but it was before Groovymame allowed to save the custom CPU% setting if I recall, that's why I was asking now.


All in all, with the current state of the cv1000 driver in mame, the combination of CPU value and Blitter % can get you good results in comparison to originals.
Good or not quite will depend on everyone's standards, but seems sure that it's better than most home ports, if not all. Couple that with Groovymame's low latency options and a CRT, and many will find no reason to keep their PCBs around.
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by cools »

I'm fairly sure I've never said anything about progear and the emulated CPU, can you quote me?
Image
User avatar
mikejmoffitt
Posts: 629
Joined: Fri Jan 08, 2016 7:26 am
Location: Tokyo, Japan

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by mikejmoffitt »

I just want to take this time to point out that a lack of attention towards wait-states, cache, etc. is just as much a problem for FPGA / Mister cores as it is for software emulation. With MAME I think the holdup is a multi-pronged issue, but for software emulators and Mister alike, the main problem is our lack of sufficient understanding and data about the original hardware. Any Mister core inspired by MAME's understanding of the hardware is unlikely to be more accurate. It goes beyond the CPU specifications, and extends to behavior of the other hardware on the PCB, when memory access timing is considered.
Bassa-Bassa wrote:many will find no reason to keep their PCBs around.
Many people will not be bothered by it, and are unlikely to face any repercussions, but I think it is worth pointing out that emulating it with MAME using downloaded ROMs is not legal.
Image
Bassa-Bassa
Posts: 1161
Joined: Tue Mar 12, 2019 5:18 pm

Re: Slowdown accuracy for cv1k games on MAME is almost perfe

Post by Bassa-Bassa »

cools wrote:I'm fairly sure I've never said anything about progear and the emulated CPU, can you quote me?
lol nope. It could be an Arcade Otaku thread, and maybe not mentioning directly the CPU setting but addressing a question about Progear's (lack of) accuracy in Mame, so the CPU/slowdowns were the point there, that's how I understood it.

mikejmoffitt wrote:I just want to take this time to point out that a lack of attention towards wait-states, cache, etc. is just as much a problem for FPGA / Mister cores as it is for software emulation. With MAME I think the holdup is a multi-pronged issue, but for software emulators and Mister alike, the main problem is our lack of sufficient understanding and data about the original hardware. Any Mister core inspired by MAME's understanding of the hardware is unlikely to be more accurate. It goes beyond the CPU specifications, and extends to behavior of the other hardware on the PCB, when memory access timing is considered.
How did the CPS core for FPGA by Jotego solve this long-standing issue (in Mame)? Or it actually didn't?

Bassa-Bassa wrote:many will find no reason to keep their PCBs around.
Many people will not be bothered by it, and are unlikely to face any repercussions, but I think it is worth pointing out that emulating it with MAME using downloaded ROMs is not legal.
I fail to see how could it be worth it in this thread or forum, but it is as legal as using coin-operated machines in unlicensed environments, though? We aren't checking how it is in every country, are we?
Post Reply