Shmupmame sh3+ (sh3, psx, stv) by nimitz 2025

!Make sure you are using the lowlatency MAME setting!

-Based on CoffeePope's mame-sh34 (based on mame 0.275), which greatly improves slowdown accuracy for cv1k (with Buffi's blitter timing fixes)
 (https://github.com/CoffeePope/mame-sh34/)

-Since these modification come at a non-negligible computational cost this makes it impractical for runahead based builds such as retroarch.
 So one "solution" is to remove double buffering from the cv1k driver in mame, to make the input lag closer to real hardware when running
 on a typical pc setup. and it turns out in the case of the cv1k driver this has no added visual artifacts.

-I also applied similar fixes to systems which are not easily combined with runahead due to computational costs and this worked for
 the playstation based arcade hardware and some sega stv games.

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)

-Also included is a fast crt shader written by yours truly a few years back which I find to be a good visual balance.

N.B. Only the concerned drivers are playable through this build.



Finally, a quick note about system latency. I've seen some mame devs pretend that removing latency from a pc setup makes it 
"too responsive" (as if there's such a thing) and that this was never possible on real hardware.

Lets do a quick comparison for cv1k:

Arcade board+cabinet:
	Jamma input: raw jamma, 0ms
	PCB lag: 3 frames, 50ms
	CRT lag: under, 1ms

	Total system lag: ~51ms

Mame pc setup:
	Controller/keyboard: 125hz poll is commom: ~4ms
	HID/USB : 3ms
	Emulated PCB: 3 frames, 50ms
	MAME+GPU: with -lowlatency, ~5ms (at least)
	Monitor: ~5ms (at least)

	Total system lag: ~67ms

In thi example removing a frame of PCB lag actually makes it line up with real hardware.
