Shmupmame sh3: cv1k, playstation based and stv

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

Edit: new version released Shmupmame 5.0

I was recentlymade aware of CoffeePope's mame-sh34 fork (thanks Buffi) which tries to improve on the accuracy of the emulated sh3 cpu in mame (https://github.com/CoffeePope/mame-sh34/) which in turns helps make the Cavecv1k games have mostly accurate when combined with Buffi's blitter delay improvements. I did some testing/comparison with pbc captures and and the slowdown seems near perfect from my limited testing. Please let me know if you find examples where the slowdown is not accurate.

But since these sh3 cpu modification come at a non-negligible computational cost, it is currently completely impractical for runahead based emulators such as retroarch to get these accuracy improvements. One solution is the good old Shmupmame way of removing double buffering from the cv1k driver in mame, removing one frame of lag/delay and making the input lag closer to real hardware when running on a typical pc setup. And unlike other older shmupsmame hacks, this comes without any adverse visual artifacts!

I applied similar fixes to other systems which are not easily combined with runahead due to emulation computational costs:

This is a special Shmupmame build with only those specific drivers:

cv1k games (one frame less lag) and with accurate slowdown

Improved playstation hw based shmups (one frame less lag):
  • RayStorm
  • RayCrisis
  • Brave Blade
  • G Darius
  • Pryvariar
  • Shikigami no shiro
  • XII Stag
  • Night Raid
  • Xevious 3D/G
  • Sonic Wings Special
I also did hw input injection for these stv games to make them more playable:
  • Radiant Silvergun (mame latency 5 frames to 3 frames delay)
  • Guardian force (mame latency 7 frames to 4 frames delay)
  • Cotton 2 (mame latency 7 frames to 4 frames delay)
  • Cotton Boomerang (mame latency 7 frames to 4 frames delay)

Downloads (source code is in the /src folder):
Shmupmame sh3 Windows 64
Shmupmame sh3 Linux 64bit

the Linux build dynamically links SDL2, Qt5, libFLAC etc, ymmv. I could check to make an AppImage if some people are interested.

If you use your own mame.ini make sure to use the lowlatency 1 setting to ensure mame is as responsive as possible.

Let me know if you find any issues/bugs

ImageImage
Image
Last edited by nimitz on Sun Feb 01, 2026 6:33 pm, edited 4 times in total.
User avatar
copy-paster
Posts: 1809
Joined: Thu Apr 30, 2015 7:33 pm
Location: Indonesia

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by copy-paster »

Shmupmame release in this economy? Not on my 2025 bingo card :shock:
User avatar
DMC
Posts: 1227
Joined: Wed Jan 26, 2005 2:41 pm
Location: Sweden
Contact:

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by DMC »

1 frame less lag in brave blade = best christmas gift ever!
shmupplayer5252
Posts: 1
Joined: Wed May 05, 2021 10:16 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by shmupplayer5252 »

hey thanks for making this. i want to remove cave slowdown for a certain game. in regular mame, i just overclock cpu but here its not working. how do i remove the slowdown?
Last edited by shmupplayer5252 on Sat Dec 27, 2025 11:54 pm, edited 3 times in total.
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

shmupplayer5252 wrote: Sat Dec 27, 2025 11:44 pm hey thanks for making this. i want to remove cave slowdown for a certain game. in regular mame, i just overclock cpu but here its not working. how do i remove the slowdown?
The slowdown is the feature, If you want no slowdown and low latency for cv1k you can use retroarch
User avatar
EmperorIng
Posts: 5350
Joined: Mon Jun 18, 2012 3:22 am
Location: Chicago, IL

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by EmperorIng »

This is a stealth christmas gift to all insane people that want to play and score Sonic Wings Limited... and Night Raid! Thank you for the treat; I am less interested in cave games but I really love GNET, STV, and PS1 arcade shmups! :mrgreen:

I haven't tried yet but I assume this doesn't change the graphical glitches on the STV games?
User avatar
maximo310
Posts: 530
Joined: Fri Nov 28, 2014 11:33 pm
Location: SoCal

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by maximo310 »

Oh man, what an awesome way to end the year! I played around a little bit with Guardian Force earlier today & it's shocking how much better the game feels with the lower input lag.

With all of these input lag improvements, it feels like pretty much everything I could want to play is responsive, outside of the mame nmk16 driver...
Ixmucane2
Posts: 804
Joined: Mon Jan 19, 2009 3:26 pm
Location: stuck at the continue prompt

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by Ixmucane2 »

Great, just before a few days of holiday to play it!

Typo: Pryvariar -> Psyvariar
User avatar
nesrulz
Posts: 186
Joined: Wed Nov 13, 2013 6:01 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nesrulz »

Futari BL works great. Thanks for new Shmupmame.
valziman
Posts: 47
Joined: Wed Sep 06, 2023 7:26 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by valziman »

Better to play Futari here now or is it roughly equivalent in the special Futari Xenia build?
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

I haven't tested slowdown accuracy of the x360 port, but according to Buffi it is pretty far from accurate.
User avatar
EmperorIng
Posts: 5350
Joined: Mon Jun 18, 2012 3:22 am
Location: Chicago, IL

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by EmperorIng »

I just wanted to chime in again and say that playing Night Raid on this build feels really quite nice. If there was ever a time to get into this weird, janky shmup... the time is here, the place is now!

As to why you'd want to do that, well, to quote JFK: "We don't ask ourselves why, we ask ourselves why not?" :mrgreen:

To answer my previous question: graphical glitches in ST-V are still intact, this is strictly a (needed) lag reduction. I discovered this watching maximo's new run of Guardian Force using this shmupmame build.
joeh
Posts: 19
Joined: Mon Jun 03, 2013 8:09 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by joeh »

valziman wrote: Sun Jan 04, 2026 11:12 pm Better to play Futari here now or is it roughly equivalent in the special Futari Xenia build?
Xenia Canary has been able to play Futari "as-is" for a long time. No need for a special build.
Creamy Goodness
Posts: 376
Joined: Wed May 05, 2021 1:23 am

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by Creamy Goodness »

Does Cotton 2 run well on this? As of now my only options are the Saturn Tribute or a Saturn core on RetroArch in Batocera. Curious if this is a more viable option.
User avatar
birb
Posts: 32
Joined: Fri Apr 25, 2025 8:51 am
Location: UAE, Dubai
Contact:

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by birb »

I tried Futari 1.5 on this. feels better than xenia. I will definitely use this for CV1K games. Should try the PSX hardware based games later.
PC Engine Fan X!
Posts: 9784
Joined: Wed Jan 26, 2005 10:32 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by PC Engine Fan X! »

For nimitz,

Can your latest Shmupmame sh3 build/release be applied to Final Burn Neo emulator?

PC Engine Fan X! ^_~
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

Creamy Goodness wrote: Tue Jan 13, 2026 12:43 am Does Cotton 2 run well on this? As of now my only options are the Saturn Tribute or a Saturn core on RetroArch in Batocera. Curious if this is a more viable option.
Yeah, cotton 2 runs "well", if you're fine with 4 frames of lag, which is still quite a bit. Better than 7 though!

On the other hand it seems cotton boomerang runs at high resolution in mame (not sure if the case on pcb) so it requires a decent cpu.

PC Engine Fan X! wrote: Wed Jan 14, 2026 12:43 pm For nimitz,

Can your latest Shmupmame sh3 build/release be applied to Final Burn Neo emulator?

PC Engine Fan X! ^_~
The main reason for the inclusion of cv1k in this build is to get accurate slowdown (or mostly accurate) for the sh3 cpu instruction timings which when combined with Buffi's blitter delay timings should make cv1k slowdown pretty close to pcb. Unfortunately the FBNeo implementation of the sh3 uses the interpreter implementation (not dynarec) which is way too slow to implement the sh3 timing fixes on. If FBNeo eventually implements a dynamically recompiled sh3 core, then it might be worth porting over, but the computational cost with the sh3 instruction timings is quite a bit higher, so you would need a good cpu for any kind of useful runahead/pre-emptive frames.
zakk
Posts: 1410
Joined: Wed Jan 26, 2005 6:04 am
Location: New York, NY
Contact:

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by zakk »

Is there a source file missing? I'm trying to compile this and it is complaining about m_vdp1.low_latency_mode in stv.cpp
I see no other reference to that member anywhere else.
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

zakk wrote: Thu Jan 15, 2026 6:59 am Is there a source file missing? I'm trying to compile this and it is complaining about m_vdp1.low_latency_mode in stv.cpp
I see no other reference to that member anywhere else.
Thanks for pointing that out, the src folder was missing saturn.h that was declaring this var. The top download is now updated.

And if anyone is interested in a Linux version let me know.
zakk
Posts: 1410
Joined: Wed Jan 26, 2005 6:04 am
Location: New York, NY
Contact:

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by zakk »

That will fix the build, but nothing actually uses that variable (all references are just assignments). Do you also need to provide a modified saturn_v.cpp?
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

Oh yeah, that's probably why I didn't include the header file, I was doing some testing with that which ended up being not necessary. You can either comment it out of include it, same result.
deepthaw
Posts: 17
Joined: Thu Jun 11, 2020 7:49 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by deepthaw »

nimitz wrote: Fri Dec 26, 2025 9:08 pm This is a special Shmupmame build with only those specific drivers:
I compiled a Linux x64 build of this for someone, what parameters should I pass to make to match whichever games this should be limited to? I'm sure it doesn't hurt anything but it'd certainly make the executable smaller. I'll share the smaller one here in case anybody wants to shmup on Linux/Steamdeck without WINE or however people would run it otherwise.
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

Added a Linux build (dynamically linked, might not be ideal)

As for the improved drivers if you want to make your own small build with those only: cv1k, stv, zn, taito gnet and konami gv
deepthaw
Posts: 17
Joined: Thu Jun 11, 2020 7:49 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by deepthaw »

nimitz wrote: Fri Jan 16, 2026 3:25 am Added a Linux build (dynamically linked, might not be ideal)
For the user who asked me to make a Linux build, I had to statically include -static-libstdc++ for it to run on their Batocera setup, and that was all it needed.
Z-Typers
Posts: 2
Joined: Tue Feb 13, 2024 2:45 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by Z-Typers »

Casting my vote for an AppImage
valziman
Posts: 47
Joined: Wed Sep 06, 2023 7:26 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by valziman »

Z-Typers wrote: Sun Jan 18, 2026 1:46 pm Casting my vote for an AppImage
Yeah, that would be awesome.
shotiasbomb
Posts: 1
Joined: Fri Jan 23, 2026 12:11 am

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by shotiasbomb »

I've tried CoffeePope's build before, Deathsmiles (non MBL) had slowdown literally every time you pressed the shot button. Tested it here, same thing. It is absolutely not perfect.
EDIT: specified that it's not MBL
Last edited by shotiasbomb on Fri Jan 23, 2026 12:15 am, edited 1 time in total.
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

valziman wrote: Thu Jan 22, 2026 4:41 pm
Z-Typers wrote: Sun Jan 18, 2026 1:46 pm Casting my vote for an AppImage
Yeah, that would be awesome.
Alright, I'll look at making that happen soon.

shotiasbomb wrote: Fri Jan 23, 2026 12:14 am I've tried CoffeePope's build before, Deathsmiles (non MBL) had slowdown literally every time you pressed the shot button. Tested it here, same thing. It is absolutely not perfect.
EDIT: specified that it's not MBL
Thanks for the info, I checked it out, it seems the instruction timings have been tweaked in the last commit and some are obviously incorrect.

As an example:

Code: Select all

/* SH_TIMING_DIV */       6,     // DIV1 operation - slow, preformed in microcode, there is exception code for this
cross referencing with: https://media.taricorp.net/prizm/SH3%20 ... Manual.pdf on page 122 DIV is clearly one cycle and not 6

The manual says that these are ideal instruction timings, so there's most likely some point in using higher values, but some of these are clearly "out there". I'll do some testing with values much closer to the stated timings and specifically check with Deathsmiles and report back
User avatar
nimitz
Posts: 900
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by nimitz »

Found the issue, there is potential duplication between the memory access delays added by buffi and the sh3 memory timing delays added by CoffeePope.

Edit: actually, the deathsmiles issue was that it was hit with a bunch of tlb_miss_penalty even though MMU is disabled on cv1k games... Removed that penalty as shmupmame only cares about cv1k as far as sh3 emulation goes and this fixed the issue!

There was also a double counting of penalties for cached region misses, fixed it, but that should have had relatively little impact (if at all).
Last edited by nimitz on Fri Jan 23, 2026 7:07 pm, edited 4 times in total.
valziman
Posts: 47
Joined: Wed Sep 06, 2023 7:26 pm

Re: Shmupmame sh3: cv1k, playstation based and stv

Post by valziman »

Thanks!

Also, does this address cv1000d (Akai Katana, DOJ, DSBL, etc?) or just cv1000b?
Post Reply