I know the Zapper trigger state is read through D4... but I'm a little unsure about how.
The info I was reading was saying 1=pulled, 0=released. However when playing Duck Hunt, it would only respond when I let go of the trigger, which hinted that maybe I had it backwards... so I switched it so that 1=released and 0=pulled. Duck Hunt, Hogan's Alley work... but now Chiller acts awfully strange.
So now I'm thinking the behavior is a little more complicated than a simple button state. I'm thinking one of the following 3 things is happening which I'm not taking into account:
1) Trigger pulled state is actually a little before the trigger is actually pulled all the way... meaning that when the user pulls the trigger, it only registers are pulled at like 80% the way down, and when it's 100% down, it registers as released.
or
2) Trigger pulled state is cleared after $401x is read, so that if the game reads trigger state twice while the user has the trigger held down, only the first read will indicate the trigger is pulled. After that it won't register as pulled again until the player releases, then pulls the trigger again.
or
3) $4016 strobing has some affect on the zapper. Currently, I'm totally ignoring strobing for the zapper.
Can anyone shed some light on this for me? Thanks
EDIT - crap... meant to post this in nesemdev.
WHOOPS!
The info I was reading was saying 1=pulled, 0=released. However when playing Duck Hunt, it would only respond when I let go of the trigger, which hinted that maybe I had it backwards... so I switched it so that 1=released and 0=pulled. Duck Hunt, Hogan's Alley work... but now Chiller acts awfully strange.
So now I'm thinking the behavior is a little more complicated than a simple button state. I'm thinking one of the following 3 things is happening which I'm not taking into account:
1) Trigger pulled state is actually a little before the trigger is actually pulled all the way... meaning that when the user pulls the trigger, it only registers are pulled at like 80% the way down, and when it's 100% down, it registers as released.
or
2) Trigger pulled state is cleared after $401x is read, so that if the game reads trigger state twice while the user has the trigger held down, only the first read will indicate the trigger is pulled. After that it won't register as pulled again until the player releases, then pulls the trigger again.
or
3) $4016 strobing has some affect on the zapper. Currently, I'm totally ignoring strobing for the zapper.
Can anyone shed some light on this for me? Thanks
EDIT - crap... meant to post this in nesemdev.
WHOOPS!