Batrider (+Garegga+Bakraid?) does not have added input lag.

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Batrider (+Garegga+Bakraid?) does not have added input lag.

Post by trap15 »

I have just confirmed, there is no programmed input lag in Armed Police Batrider. I can understand how nimitz came to his conclusion, but he did not look into it hard enough and did not fully understand the input handling code. What he thought was intentional input lag was actually how the game handles auto-repeat for the test menu. I am about 99% sure that the same applies to Garegga and Bakraid, though I haven't gone in to confirm them myself.

Here's a high-level reconstruction of the Batrider input handling code, for anyone who wants to confirm. http://pastebin.com/rwvESZ72

If you want to look at the original code, here: http://pastebin.com/1Qk23YD1

If you "feel" there is input lag, it's a nocebo effect, it does not actually exist.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
Dave_K.
Posts: 4570
Joined: Wed Jan 26, 2005 5:43 am
Location: SF Bay Area
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Dave_K. »

Nice job confirming Trap!

I've often thought the perceived input lag was simply differing ship speeds on X vs Y movements.
User avatar
cools
Posts: 2057
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by cools »

If there's no input lag, why do all the ships feel sloppy when compared to say: Raiden DX?
Image
User avatar
Squire Grooktook
Posts: 5997
Joined: Sat Jan 12, 2013 2:39 am

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Squire Grooktook »

cools wrote:If there's no input lag, why do all the ships feel sloppy when compared to say: Raiden DX?
Mame input lag?

Feels fine to me on shmupmame.
RegalSin wrote:Japan an almost perfect society always threatened by outsiders....................

Instead I am stuck in the America's where women rule with an iron crotch, and a man could get arrested for sitting behind a computer too long.
Aeon Zenith - My STG.
User avatar
Jenseits
Posts: 58
Joined: Mon Jan 13, 2014 7:48 am
Location: Germany

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Jenseits »

I almost don't know s***: Perhaps code doesn't indicate input lag but what about processing the input afterwards resulting in a "late" output?
Or did you observe the whole chain from input signal to the outputted frame, Trap?
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by trap15 »

As far as the software goes, the input is processed at the beginning of each frame, and utilized on that frame. I believe the board does utilize double-buffering, so there's an extra frame there, but that wasn't my original point; as far as the game software goes, there's no additional input lag, especially nothing as drastic as nimitz originally believed.

I also don't care about MAME's added lag, that's not relevant here, this is exclusively relevant to the original arcade board.
cools wrote:If there's no input lag, why do all the ships feel sloppy when compared to say: Raiden DX?
My guess is the non-normalized diagonals, or the speed of the horizontal panning.

EDIT: Additionally, it could be the nocebo effect I mentioned.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Xyga »

So compared to the board the Saturn port shouldn't have that double-buffering frame and therefore be completely lag-free ?
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by trap15 »

I haven't checked Garegga. This is exclusively Batrider knowledge for now. But the Saturn port of Garegga has double-buffering too because 3D hardware. So you're not getting off that easy! However, MAME adds another frame as a requirement (you're not hacking that out, I guarantee you), and your PC probably adds another frame, so unless you've got the PCB and you don't care too much about slowdown, yes play the Saturn port.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Xyga »

I see, thanks.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
chempop
Posts: 3466
Joined: Sun Jul 31, 2005 7:44 am
Location: Western-MA USA

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by chempop »

Diverting a bit here, but the Saturn port of Garegga has no slowdown by default, but "wait on" is an unlockable option (I think by clearing the game [credit feeding is allowed] the extra menu becomes available with slowdown option, redball bullets, etc).

So do Bakraid and Batrider both have the wonky non-normalized diagonals like Garegga? I can definitely imagine someone who isn't used to it thinking, "hey these controls are all messed up.. it must be input lag!" :mrgreen:
"I've had quite a few pcbs of Fire Shark over time, and none of them cost me over £30 - so it won't break the bank by any standards." ~Malc
User avatar
Eaglet
Posts: 1326
Joined: Sat Oct 29, 2011 8:38 pm
Location: Sweeedeeeen.

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Eaglet »

Garegga PCB does have noticable input lag though.
Guessing it's hardware related.
moozooh wrote:I think that approach won't get you far in Garegga.
Image Image
Cagar
Posts: 2234
Joined: Fri Nov 25, 2011 5:30 pm

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Cagar »

Is fixing mame input lag in these games possible then?
Spoiler
Shmupmame 5 when
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Xyga »

Not without messing other stuff up like shmupmame does.

Whatever, from what I understood reading around here, with Mame in its current state we cannot have everything working right at the same time.
For games to be actually playable there's always a thing or two that must be sacrificed (correct speed/sync/lag/sound...)

Plus some stuff/code that should be fixed will likely never be.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
trap15
Posts: 7835
Joined: Mon Aug 31, 2009 4:13 am
Location: 東京都杉並区
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by trap15 »

chempop wrote:Diverting a bit here, but the Saturn port of Garegga has no slowdown by default, but "wait on" is an unlockable option (I think by clearing the game [credit feeding is allowed] the extra menu becomes available with slowdown option, redball bullets, etc).
Even with Wait On, the slowdown is not the same. It's closer, but still quite off.
chempop wrote:So do Bakraid and Batrider both have the wonky non-normalized diagonals like Garegga? I can definitely imagine someone who isn't used to it thinking, "hey these controls are all messed up.. it must be input lag!" :mrgreen:
Batrider does, at least. So weird... I haven't checked Bakraid yet, but I wouldn't be surprised.
@trap0xf | daifukkat.su/blog | scores | FIRE LANCER
<S.Yagawa> I like the challenge of "doing the impossible" with older hardware, and pushing it as far as it can go.
Erppo
Posts: 1146
Joined: Sun Jan 09, 2011 8:33 pm
Location: Finland

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Erppo »

trap15 wrote:Batrider does, at least. So weird...
This really isn't very rare. At least two out of the five games you picked for the last tourney (RF1, GW) do this.
Image
User avatar
cools
Posts: 2057
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by cools »

I'm on about PCB. I sold my board because the controls responded slower than all the other boards I had at the time. Seibu/cv1000/taito all felt tight. Batrider was sloppy. Sold bakraid because I didn't like it, but it also had sloppy controls.

Fine if it's a game you're playing exclusively, but I couldn't switch between batrider and something else without feeling like I was fighting the stick to do what I want.
Image
User avatar
Squire Grooktook
Posts: 5997
Joined: Sat Jan 12, 2013 2:39 am

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Squire Grooktook »

cools wrote:Fine if it's a game you're playing exclusively, but I couldn't switch between batrider and something else without feeling like I was fighting the stick to do what I want.
I dunno, I'm learning Batrider right now and have been playing it kinda obsessively for the past two weeks, and I haven't noticed any sloppiness. Even when I switch to other games.
RegalSin wrote:Japan an almost perfect society always threatened by outsiders....................

Instead I am stuck in the America's where women rule with an iron crotch, and a man could get arrested for sitting behind a computer too long.
Aeon Zenith - My STG.
User avatar
cools
Posts: 2057
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by cools »

Coming back to this... If I do the shift+P trick with MAME (pause, hold a direction, tap shift+P until the player responds) it takes Batrider (+Garegga+Bakraid) until the 4th frame to respond.

Batsugun/DoDonPachi/Ketsui respond on the 2nd frame.

Space Invaders responds immediately.

Just left/right (no diagonals).

Are you saying that the emulation in MAME is (incorrectly) responding on the 4th frame, and that the PCB responds on the 3rd frame? Or are you saying it's actually responding on the 1st or 2nd frame after receiving input?

The NewZealand Story responds on the 2nd frame in MAME. I cannot tell the difference between MAME and the PCB regarding lag.

Batrider (et al) always felt laggy in hardware, and feel laggy in MAME now. If I'm sensitive to what appears to be 2 frames of delay (response on the 3rd frame, if the extra frame in MAME is discounted?) I can at least find another game that behaves the same way and prove to myself what level of input delay I can notice during play.
Image
e_tank
Posts: 148
Joined: Wed Apr 23, 2008 5:04 am

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by e_tank »

when frame stepping in mame, batrider oscillates between showing a response in either 3 or 4 frames. this happens on some other toaplan v2 board games as well, but on the current version of mame the issue is most visible in batrider (try dying immediately, that usually switches the game into showing a response in 3 stepped frames for a bit).

just from this information my initial thoughts were A. the board probably uses hardware buffered sprites, which would be the reason for it being 3/4 vs 2/3. and B. the oscillation could be caused by the game polling input close to the boarder of the emulated frame, sometimes before sometimes after (and that on actual hardware the minimum response time for the game is probably uniform).

so i went to check this out real quick by putting a watch point on when the game polls input from the hardware, and what i found was the game seems to be polling the hardware exactly once per emulated frame, around the same time in each emulated frame. so that probably rules out B. from above. also, according to mame the game seems to be polling input each frame right before the start of vblank, which seems strange to me as the vast majority of games i've seen poll sometime right after vblank (either still in vblank or just after it ends). v-v and batsugun, 2 games that also run on toaplan v2 board and don't suffer from the oscilation in frame response time in mame or fba, and both poll input right after vblank.

tl;dr, why does batrider oscillate between showing a response in 3 or 4 stepped frames in mame? shit if i know, though i hope someone familiar with either how mame works or how batrider and co work with input will chime in on this.
1983parrothead
Posts: 57
Joined: Fri May 23, 2014 8:40 pm

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by 1983parrothead »

Am I the only one who noticed that the ninja boss that commits suicide after being defeated is from NMK's Rapid Hero?
User avatar
Squire Grooktook
Posts: 5997
Joined: Sat Jan 12, 2013 2:39 am

Re: Batrider (+Garegga+Bakraid?) does not have added input l

Post by Squire Grooktook »

1983parrothead wrote:Am I the only one who noticed that the ninja boss that commits suicide after being defeated is from NMK's Rapid Hero?
Actually he's from Mahou Daisukesen/Sorcerer Strike, Raizings first shmup that predates Rapid Hero by 1 year.
RegalSin wrote:Japan an almost perfect society always threatened by outsiders....................

Instead I am stuck in the America's where women rule with an iron crotch, and a man could get arrested for sitting behind a computer too long.
Aeon Zenith - My STG.
Post Reply