Shmupmame 5.4 - March 2026

 -Added Mars Matrix fixes from trap0xf (https://bitbucket.org/trap15/mmatrix_unfuck/src/master/)
   to all mars matrix roms, further reducing lag, 3-button controls, better sound balance and better reset behavior
	Thanks to trap15 for the permission to distribute his patch!
 -Fixed a bug with the windows version that complained about the loop2 hacks being clones of clones despite working
 -Added the loop2 hacks to the favorites folder since mame search functionality can be pretty bad
 -Fixed a small bug in the cv1k slowdown code (the fix will also be applied to bio_endio's implementation)
    And included the latest improvements from bio_endio

 -------------------------------------------------------------------------------------------------------------------------------------------

Shmupmame 5.3.2 - March 2026

 -Minor fix, the loop 2 start roms no longer show a background error message stating that the game is "a clone of a clone"
	Also added the loop 2 start hacks to the favorites list to make them easier to find (mame's search function is awful)

 -------------------------------------------------------------------------------------------------------------------------------------------

Shmupmame 5.3.1 - March 2026

 -Added bio_endio's code for accurate cv1k slowdown emulation. 
	Huge thanks to bio_endio for implementing correct cache emulation which results in as far as we know pcb matching slowdown.

 -------------------------------------------------------------------------------------------------------------------------------------------

Shmupmame 5.11 hotfix: Corrected issue where Batsugun special and Daifukkatsu Loop 2 modes could be incorrectly initialized on normal sets.

 -------------------------------------------------------------------------------------------------------------------------------------------

Shmupmame 5.1 - 2026 nimitz - minor fixes release

Changes from 5.0:
	-sh3 memory timings back to coffeePope's build values since only the first ~30 seconds of Deathsmiles behave oddly. 
		Seems to be a GFX upload issue that only shows up in the first few seconds of play on deathsmiles.
	-Stopped injecting Game Tengoku credit switch to prevent weirdness (too many coins)
	-DDP loop 2 start now starts the player at max power as you would if playing normally.
	-DDP loop 2 start now work for both p1 and p2 start.

 -------------------------------------------------------------------------------------------------------------------------------------------

Shmupmame 5.0 (sh3, psx, stv, cave 68000 and more) by nimitz 2026


  Version 5.0 marks a somewhat new approach to reduce latency, focusing on latency lowering modifications that have no visual side effects or glitches.
  This means no more background layer de-sync on games with left/right panning when moving sideways.

  -------------------------------------------------------------------------------------------------------------------------------------------

  MAME now has a low-latency mode, which almost removes a frame of delay on computationally light systems, which makes many shmups responsive enough as-is.

  I did some testing with a 240fps camera and the low-latency mode is very dependend on the computational cost of the driver (and your pc speed). 
  So some drivers are now very playable even if the frame advance test shows 3 frames delay, but some drivers get very little benefit. I took that into
  consideration when deciding which drivers to modify.

  Here's how a given shmup can be included in the build:
  	 -Responsive enough on vanilla mame (2 frames (~33ms) delay or less)
	 -Modified to be 2 frames delay or less (ideally via input forwarding or single buffering and in last resort via sprite buffer delete)
	 -Modified to remove at least 2 frames of delay compared to vanilla mame (stv, psikyo 1st gen, mars matrix)

  -------------------------------------------------------------------------------------------------------------------------------------------

  Another new addition to this version is the inclusion of Loop 2 start versions of some specific games. Some of these loop have a relatively easy first loop
  and in my opinion benefit grealy from the option of having a shorter more intense mode. The build includes empty romfiles to trick mame into using the base
  roms for these variants.

  This should also allow for comparing scores in a meaningful way.

  The games:
	• Batsugun special (Starts at loop 2 with max power, but "level 1")
	• Donpachi (jp) (Starts at loop 2 with max power)
	• Dodonpachi (Starts at loop 2 with minimum power, max power not needed at all)
	• Dai-ou-Jou Black Label (also includes WL) (Starts at loop 2 with max power for both shot and laser)
	• Ketsui Ura Loop (Starts at loop 2 with max power)
	• Ketsui Omote Loop (Starts at loop 2 with standard power)
	• DaiFukkatsu 1.5 Omote Loop (Starts at loop 2 with max power)

  -------------------------------------------------------------------------------------------------------------------------------------------

 List of included drivers (shmups only, with some exceptions):

  Shmupmame 5 "exlusives" (current alternatives are worse, due to inaccuracies, runahead/preemtive limitations or only available in vanilla mame)
	 • CV1k via single buffering (Mushihimesama, Futari, Galuda 2, Dfk, Ibara, Deathsmiles, Pink Sweets, etc..)
	 • Sega STV via single buffering (Guardian Force, Radiant Silvergun, Cotton 2/boomerang, Soukyugurentai, Shienryu)
	 • Sony ZN via single buffering (Brave blade, G-Darius, Raystorm, Aero Fighters special)
	 • Taito G-net via single buffering (Raycrisis, Psyvariar, Shikigami no shiro, Night Raid, Xii Stag)
	 • Gradius IV via single buffering (voodoo1 video driver, no artefict)

  New de-lag methods in shmupmame 5
	 • Cave 68000 via input injection (Dodonpachi, Esprade, Dangun feveron, Mazinger Z, Air gallet, Guwange (buffer delete)) (Donpachi and Hotdog Storm already responsive)
	 • Jaleco Mega System 32 via input injection (P47 Aces, Game Tengoku, Gratia)
	 • Gradius II via sprite buffer delete (the method is new, might have been de-lagged in older builds though)

  De-lagged drivers ported from shmupmame 4.2 (removed hacks with visual side effects)
	 • Psikyo 1st gen both injection and sprite buffer delete (Strikers 1945, Gunbird, Sengoku Ace, Tengai) (Frame advance shows 3 frames, but measured at 2 frames)
	 • Namco System 1 both injection and sprite buffer delete (Galaga '88, blast off, dangerous seed, dragon spirit (injection only))
	 • Some NMK 16 shmups via sprite buffer delete (Thunder Dragon 2, Rapid Hero, Macross 2, Strahl, US AAF Mustang, Black Heart, Acrobat mission, task force harrier)
	 • Psikyo 2nd gen via sprite buffer delete (Strikers 1945 2/3, Gunbird 2, Dragon Blaze, Space Bomber)
	 • Mars matrix via sprite buffer delete (5 frames -> 3 frames, autosword and autofire for player 1)
	 • Cps2 via sprite buffer delete (Progear, Gigawing, 1944, 19XX) *not Great Mahou/dimahou and 19XX due to visual artifacts
	 • Cps1 via sprite buffer delete (3wonders, 1941, area88, carrier air wing, lost/forgotten worlds) *varth/3wonders/mercs are untouched since it results in visual artifacts
	 • Jaleco megasys1 via sprite buffer delete (Chimera Beast, EDF, Cybattler, P47, Saint Dragon) Plus alpha untouched but responsive
	 • Boogie wings via sprite buffer delete (unique hardware/driver)

  Included vanilla responsive drivers (2 frames lag or less)
	 • PGM (Ketsui, Espgaluda, Ddp Dai-ou-jou, Ddp2)
	 • Konami systems (Parodius series, Gradius I/III, Twinbee series, Salamander series, Thunder cross 1/2, Xexex, Trigon)
	 • Toaplan systems (Batsugun, Tatsujin/Truxton 1/2, Fling Shark, Fire Shark, Twin Cobra, Outzone, Dogyuun, Vimana, Hellfire, Zero wing)
	 • Taito F3 (Rayforce, Darius Gaiden, Grid Seeker, Gekirindan, Twin Cobra 2, Space Invaders 95)
	 • Taito F2 (Metal BLack, Gun & Frontier, Super Space Invaders, Megablast)
	 • Seibu Systems (Raiden 1, Raiden 2/DX, Raiden Fighters 1/2/Jet, Viper Phase one)
	 • Sega Sysemt 16A/B (Fantasy zone 1/2, cotton, aurail, SDI, sonic boom)
	 • Neogeo shmups (some) (twinkle star, tomaday, andro dunos, viewpoint, sonic wings 2/3, pulstar, last resort, zed blade, shock troopers 1/2), the rest need testing
	 • Omega Fighters & Cyvern (might need injection)
	 • Irem System (R-type 1/2/Leo, Mystic Riders, Image Fight, X-multiply, Air Duel, Gallop, Dragon Breed) 
	 • Darius 1 & 2
	 • 1942 & 1943 & 1943 kai
	 • Some classics (mad planets, robotron, juno first, sky kid, xevious, zaxxon, centipede, millipede, space invaders, galaxian, galaga, gaplus, space invaders, gyruss)
	 • Sammy Seta Visco hardware (Change Air blade, storm blade, vasara 1/2, ultra x weapons, twin eagle 2)
	 • Nostradamus

  Drivers/games unfortunately not included:
	 • Most of Raizing's 68000 games, 3-4 frames delay, recommended to play with a runahead/preemptive emulator (Mahou is included as it is responsive)
	 • Dragon Saber, very laggy and buffer delete is noticable because of panning
	 • Daioh (somehow very laggy even though other games on the system are fine, investigated a bit and found no easy fix)
	 • Dooyong, Afega, Comad and other very low budget shmups, due to lack of interest
	 • Early 80s space invaders copycats, there are hundreds of those, tried to inlcude some of the best ones


A note on raiden fighters nvram:
	In some previous builds I have included nvram for some of these games, but instead you can just use the "single board" versions of these games
	which do not require that long one-time nvram preloading.

  -------------------------------------------------------------------------------------------------------------------------------------------

Past version readme:

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

	-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

	So removing a frame of PCB lag actually makes it line up with real hardware!
