Bandai Hyper Shot grenade bug in Nestopia 1.40

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Bandai Hyper Shot grenade bug in Nestopia 1.40

Post by zeroone »

There is no way to launch a grenade in Space Shadow using the Bandai Hyper Shot machine gun because Nestopia contains an incomplete implementation of the device. The port details can be found here. Bits 3 and 4 of port $4017 act like a Zapper and bit 1 of port $4016 acts like a third gamepad where the B button is the grenade launch button and the A button is unused. Although the Hyper Shot provides a full D-pad, Space Shadow--the only game designed for the Hyper Shot--is a rail shooter. The only direction required is Up, which advances the player to the next screen. Consequentially, Nestopia only supports the Up button, ignoring the rest including the B button. The snippet below, from NstInpBandaiHyperShot.cpp, contains a hack used to get most of the Hyper Shot working. First, the same data is provided to both ports instead of being split up as described above. And, second, instead of using a shift register for the gamepad bits, a single "move" bit is used for the Up button. This hack mostly works except that the player cannot launch grenades.

Code: Select all

uint BandaiHyperShot::Peek(uint)
{
  uint data = (Poll() >= LIGHT_SENSOR ? 0x0 : 0x8);
  return data | fire | move;
}
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Bandai Hyper Shot grenade bug in Nestopia 1.40

Post by koitsu »

Can you review the relevant NestopiaUE code and see if this still applies? If so, can you please file a GitHub Issues request that outlines this problem and/or include a patch or submit a pull req?
Post Reply