I'm gonna check the joypad inputs, weird since they seem to work correctly for other games. I'll see what I can find

Games read the controllers in different ways... Some rely on open bus, or use more than 1 bit from the byte read from the controller register, or expect different results when reading them more than 8 times... There's plenty that can go wrong with input handling, even if it works fine in most games.

when writting to 4016, bit 0 is strobe bit.When reading 4016, I have an internal pointer that gets a bit from my buttons status, if strobe is 1, returns the current bit of the buttons (ored with 0x40, read somewhere that paperboy needed that), increment the pointer (wraps at 8). If strobe is 0, always return the first bit of the buttons status (A button).

Seems like Mario is always writting 0 and 1 to strobe, and then proceeds to read the 8 bits for the buttons, so it doesn't look like it relies on weird behaviour. But you are the experts =)

When reading 4016, I have an internal pointer that gets a bit from my buttons status, if strobe is 1, returns the current bit of the buttons (ored with 0x40, read somewhere that paperboy needed that), increment the pointer (wraps at 8). If strobe is 0, always return the first bit of the buttons status (A button).

Er, I'm pretty sure that's backwards - strobe=1 is when the button states are copied into the shift register, and strobe=0 is what allows them to be read back.

DarkMoe wrote:

Seems like Mario is always writting 0 and 1 to strobe, and then proceeds to read the 8 bits for the buttons.

Actually, it writes 1 followed by 0, just like every other NES game which uses standard controllers.

_________________Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum