This was just a dumb idea I had while I was at work. Let's say you could hypothetically add a rumble motor to an NES controller (somehow); this would require the ability for the CPU to send data to the controller, but the controller port obviously wasn't designed with this in mind. An interface for the special rumble-supporting controller would also need to be compatible with a standard controller.
The main hurdle is the fact that the only data line you have direct control over is the strobe signal, which goes to both controllers simultaneously. Happily, you can send a CLK pulse to each controller separately, so the idea I had was this:
The controller not being addressed (be it a standard controller or a rumble controller) will simply see a bunch of strobes, which won't affect its operation; the controller being addressed sees the activity on the strobe line plus all the CLK pulses, and a standard controller wouldn't care about this either.
My original idea was to send a 2-bit packet to drive two rumble motors, but this can be used to just send data in general. If you wanted to control LEDs on the controller, or some kind of expansion port on the controller, or whatever.
You can send data to both controllers simultaneously by interleaving the bits of both packets and alternating between reading 4016/4017 on each bit. This would be insufficient to accidentally trigger the 1-0-1-0 termination sequence, so you'd be good to go.
The main hurdle is the fact that the only data line you have direct control over is the strobe signal, which goes to both controllers simultaneously. Happily, you can send a CLK pulse to each controller separately, so the idea I had was this:
- Set strobe to 1 and then read from the port of the desired controller. A normal controller doesn't care about this and doesn't send anything useful. The rumble controller will see this and switch into a "receive mode".
- Send data 1 bit at a time by placing a bit on the strobe line and then reading from the recipient controller's port. Reading from the port will send a CLK pulse to that controller, and the controller will accept the bit (placed on the strobe line) into a shift register.
- Terminate the data packet by making two 1->0 transitions on the strobe line without sending any CLK pulses (so write 1-0-1-0 to the strobe). The controller accepts the transmitted data and then goes back into the standard mode of reporting button presses.
The controller not being addressed (be it a standard controller or a rumble controller) will simply see a bunch of strobes, which won't affect its operation; the controller being addressed sees the activity on the strobe line plus all the CLK pulses, and a standard controller wouldn't care about this either.
My original idea was to send a 2-bit packet to drive two rumble motors, but this can be used to just send data in general. If you wanted to control LEDs on the controller, or some kind of expansion port on the controller, or whatever.
You can send data to both controllers simultaneously by interleaving the bits of both packets and alternating between reading 4016/4017 on each bit. This would be insufficient to accidentally trigger the 1-0-1-0 termination sequence, so you'd be good to go.