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

Offline el_rika

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +7/-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.39 (41.4%) / 57 (All ships/modes)

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

Mushihimesama Futari:
47.7 (46.6%) / 57 (Reco N maniac)
48.5 (47.3%) / 57 (Palm N maniac)
41.57 (40.6%) / 56 (Palm Ab maniac)

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.33 (43.3%) / 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:


edit: as i further analyse and test the accuracy, i will post slight modification to some values.
« Last Edit: August 05, 2022, 04:00:10 AM by el_rika »

Offline dink

  • Administrator
  • *****
  • Posts: 4649
  • Karma: +407/-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

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +7/-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: 985
  • Karma: +56/-1
  • 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

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +7/-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: 4649
  • Karma: +407/-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

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +7/-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.