Author Topic: Cv1000 slowdown accuracy tweaks  (Read 44299 times)

Offline el_rika

  • Member
  • ***
  • Posts: 101
  • Karma: +11/-0
Cv1000 slowdown accuracy tweaks
« on: May 17, 2022, 04:50:15 PM »
(this post is a bit lenghty, so skip to the numbers for instant fun)

So, for shmup fans that love last gen Cave shmups, i want to share my 2 years long endeavour of making cv1000 emulation as close to pcb speeds, in terms of slowdown, as possible.
These games are fantastic and they also have more slowdown than one might probably think  :smilie: (especially when played for score).
We are talking single digit framerates and hud/ship/bullets completely vanishing when things get out of hand!

The games/modes that were possible to work on through observation and reproduction,  are those with more or less fixed rank, or with a more linear approach to rank management (thankfully most of them).
Some modes, like Futari original, are so wildly different at low and high rank, that they're nearly impossible to tackle, without owning the pcb.

Another issue, regarding current state of emulation vs how accurate it can be tweaked (via only CPU speed and Blitter Delay), is that a certain ship's shot/laser blending mode (Palm Abnormal in Futari) will simply mess with the overall blitter settings, so that particular ship's numbers can not be improved, unless:
The dev Trap15, suggested some 10 years ago that different blitter sliders for different blending modes would be an improvement, and that would certainly fix a few issues, like Palm Abnormal and a couple of others (like the, atm, unavoidable slowdown in the menus in some games, too much slowdown in certain areas ex. the first pattern of boss No3 in Futari BL God mode).

All in all however, the current state of the emulation is actually pretty good and with the CPU and Blitter combo, the slowdown accuracy that can be achieved is very good, and in many instances better than the 360 ports (which are great ports).

In emulation, some elements are CPU related (mainly bullets) and their speed responds first to CPU underclock, while others (effects, explosions, lasers, overlaping effects) are Blitter affected first.

Concrete example:
Mushihimesama's lvl1 boss 1st pattern in Ultra is CPU bound, and once you fine-tune it for just that pattern, you have your CPU value for the rest of the game, for a pretty good accuracy. However, satisfactory Blitter value was only decided at the stage 5's boss in Ultra, as those patterns are Blitter dependant.
Similar story in Futari BL God mode.

The main logic was to find a few elements for each scenario in pcb, recreate that scenarios in emulation and fine-tune them to be as close as possible. Once a few key moments (ex. boss patterns, stationary enemy bullet swarms) were reproduced, most of the rest of the game would fall into place nicely, though some moments would slow down a tad more in emulation, it's usually in the single digits %.

Some games/modes like Futari Ultra or Pink Sweets (damn that game) are stil wip. Maybe thanks to dink's incredible work on the driver, i'll make faster progress in those.

A quick note:
All these tests were made using ume2014, based on mame 0.155. The FBNeo driver is also based on mame 0.155 so everything should be identical in terms of CPU and Blitter (from the little i tested since the driver was released last week, all is good).

Some games need different values for different modes/ships. What works in Ultra, is not good for Maniac. Also Deathsmiles characters have so different shot/laser effects, all needing slightly different values.

Ok, so the values (CPU/Blitter):

(Edit: added actual % value for CPU. The math is: game mhz x 100 /102.4)

Daifukkatsu:
43.62 (42.6%) / 59

Espgaluda 2:
49.76 (48.6%) / 62

Daifukkatsu Black Label:
42.4% / 57 (All ships Strong)
41.4% / 57 (All ships Bomb/Power)

Mushihimesama:
42.3 (41.6%) / 57 (ultra)
48.02 (46.8 %) / 57 (maniac)

Mushihimesama Futari:
47.7 (46.6%) / 57 (Reco N maniac)
48.5 (47.3%) / 56 (Palm N maniac)
42.5 (41.6%) / 55 (Palm Ab maniac)
40.6% / 56 (RecoN Ultra)
40.6% / 55 (Palm Ab Ultra)

Futari Black Label:
45.26 (44.2%) / 54 (Reco maniac)
46.08 (45.0%) / 56 (Palm maniac)
44.54 (43.5%) / 56 (Reco god)
44.54 (43.5%) / 56 (Palm god)


Deathsmiles:
52.53 (51.3%) / 59 (Windia, Casper)
53.04 (51.8%) / 58 (Follet)
53.35 (52.1%) / 57 (Rosa)

Deathsmiles MBL:
53.35 (52.1%) / 54 (Windia)
53.04 (51.8%) / 56 (Follet)
52.53 (51.3%) / 58 (Casper)
52.53 (51.3%) / 58 (Sakura)
53.35 (52.1%) / 55 (Rosa)

Ibara:
49.04 (47.9%) / 53

Ibara Black Label:
49.04 (47.9%) / 53

Akai Katana:
48.32 (47.2%) / 63 (C ship)
47.00 (45.9%) / 68 (B ship)
46.08 (45%) / 72 (A ship)

Muchi Muchi Pork:
53.55 (52.3%) / 53

Sdoj:
43.0 (42.0%) / 59 (Expert all)
44.3 (43.2%) / 57 (Shot/Laser all)


In games that have power-ups i sometimes use infinite lives, as losing a power-up or continuing with full power earlier than normal, messes with the slowdown. Never used God mode...not fair ;)

Here are quite a few vids i made (some are good quality, some potato quality as i made so many of them i kept running out of memory):

https://youtu.be/qf75S_iG7aY
https://vimeo.com/476652165/description

Thanks so much dink, barbu and everyone involved in bringing these woderfully addictive games to FBNeo!  :biggrin:

Important: when using the old blitter method (manual blitter), be sure to set Clip Margin (test) - off.

edit: as i further analyse and test the accuracy, i will post slight modification to some values.
« Last Edit: August 06, 2024, 03:26:16 AM by el_rika »

Offline dink

  • Administrator
  • *****
  • Posts: 5142
  • Karma: +459/-1
  • pie? I nearly bought one!
Re: Cv1000 slowdown accuracy tweaks
« Reply #1 on: May 17, 2022, 08:27:38 PM »
Hi el_rika, Thanks for your help with testing, I admire your dedication to these games :) 

Sometime I'll explore some sort of different rates based on blit type, as trap15 mentioned.  and also explore in the blit dma (copy) mode - which is totally ignored by the blitter at this time.  I think that once this is figured out and implemented properly all games will use the same setting which share the same blitter version.  Another thing I noticed is that the sh3 dma transfers don't eat any cycles, this could possibly be another point of slowdown that isn't implemented which would make a difference.

best regards,
- dink
« Last Edit: May 17, 2022, 08:48:55 PM by dink »

Offline el_rika

  • Member
  • ***
  • Posts: 101
  • Karma: +11/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #2 on: May 17, 2022, 11:56:15 PM »
Great ideas dink!

If anyone is dedicated enough to make things work, that person is definitely you  :biggrin:

Offline Harpuia

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #3 on: May 27, 2022, 02:37:07 PM »
How do you see the exact CPU values, rather than just the percentage? Using FBneo on Retroarch windows

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1140
  • Karma: +60/-2
  • Helper
Re: Cv1000 slowdown accuracy tweaks
« Reply #4 on: May 28, 2022, 03:06:31 AM »
How do you see the exact CPU values, rather than just the percentage? Using FBneo on Retroarch windows

You mean how to set the decimals ? They are part of the dipswitches.

Offline el_rika

  • Member
  • ***
  • Posts: 101
  • Karma: +11/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #5 on: May 28, 2022, 04:02:59 AM »
How do you see the exact CPU values, rather than just the percentage? Using FBneo on Retroarch windows

This is a good question that needs a bit of clarification.
The numbers i posted are the exact CPU numbers, as mame shows them.
In FBNeo, you have to round that number, from say: 41.77 to 41.8

Offline dink

  • Administrator
  • *****
  • Posts: 5142
  • Karma: +459/-1
  • pie? I nearly bought one!
Re: Cv1000 slowdown accuracy tweaks
« Reply #6 on: May 28, 2022, 09:06:49 AM »
Simple math:

percent * 102400000 / 100

56 * 102400000 / 100  =  56,320,000hz

best regards,
- dink

Offline el_rika

  • Member
  • ***
  • Posts: 101
  • Karma: +11/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #7 on: June 20, 2022, 02:44:47 PM »
Added in the original post, the actual % that the CPU must be set at, so that it matches the actual mhz value from mame.

Offline PrincessMonaco

  • Newbies
  • *
  • Posts: 47
  • Karma: +0/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #8 on: August 29, 2022, 11:05:43 AM »
So, someone walk me through this like I'm an idiot:

Ibara:
49.04 (47.9%) / 53

Does this mean that if I'm running through Retroarch, I go into Quick Menu>Options and set CPU speed to 47%, and then set [Dipswitch]el_rika's CPU Rate tenth-percent adjust to .9?

Offline el_rika

  • Member
  • ***
  • Posts: 101
  • Karma: +11/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #9 on: August 29, 2022, 12:11:16 PM »
So, someone walk me through this like I'm an idiot:

Does this mean that if I'm running through Retroarch, I go into Quick Menu>Options and set CPU speed to 47%, and then set [Dipswitch]el_rika's CPU Rate tenth-percent adjust to .9?

Precisely

Offline PrincessMonaco

  • Newbies
  • *
  • Posts: 47
  • Karma: +0/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #10 on: August 29, 2022, 02:12:11 PM »
Yay!

Offline keikojoe

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #11 on: September 29, 2022, 09:29:42 AM »
HI el-rika is it possible to apply these settings on Finalburn Neo or do you need to use fbn on retroarch? Thankyou

Offline el_rika

  • Member
  • ***
  • Posts: 101
  • Karma: +11/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #12 on: September 29, 2022, 11:20:11 PM »
HI el-rika is it possible to apply these settings on Finalburn Neo or do you need to use fbn on retroarch? Thankyou

Yes, of course.

Offline skykid

  • New Member
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Cv1000 slowdown accuracy tweaks
« Reply #13 on: November 07, 2022, 02:23:28 AM »
Super sorry to revive this, but I've been tinkering with the Pi4B and I'd love to be able to tweak CAVE games accordingly to improve their accuracy. But I'm not quite sure I understand how to use the info in the OP and was hoping someone could help me.

I reached this page from a post that specifically targeted the Pi4, but said the info was out of date and to come here. I'm not sure how to apply the settings per game as specified. I'm using FBneo for everything, and when I go into the RA menu -> options -> CPU clock, it only lets me specify in increments of 5%s (so 100/105/110 etc). and not the decimals listed.

Additionally, I don't know what the second numbers are for or how to set them:

"Mushihimesama:
41.98 (41.0%) / 57 (ultra)
48.02 (46.8 %) / 57 (maniac)"

In this case, '57'.

I don't see any info for Donpachi/DDP/DDP DOJ/DOJ BL etc, so I'm assuming they don't need adjustment?

Thanks for the help!

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1140
  • Karma: +60/-2
  • Helper
Re: Cv1000 slowdown accuracy tweaks
« Reply #14 on: November 07, 2022, 02:48:14 AM »
it only lets me specify in increments of 5%s (so 100/105/110 etc). and not the decimals listed.

You might be using some very old version of the core then, recent versions allow fine tuning from 25 to 55.
The decimals need to be set in dips.
The last number (so the 57 from your example) is the blitter delay (from dips too).