I was wondering if anybody has come up with a cheap bidirectional communication method with the PC. By cheap I was thinking like ~US$2.00. (So no fancy hardware UARTs.) I was going to try a software UART but I quickly discovered that the NES-side timing would be too much for me, so I came up with a very simple asynchronous serial comm. method using two 7400s for a special SR-like latch controlled on either side by 2 output bits and 2 input bits. The PC side output bits could be the data bits of the parallel port, and the input bits could be the status bits. The NES side output would be the two $4016 outputs which don't affect controllers, and the inputs would be the $4016 inputs which aren't affected by the controllers. All these bits can be accessed from the NES or FC expansion ports.
I haven't built it yet because I'm afraid it's just too slow to do anything too useful in real time (like dump FDS disks :)
Here's the idea though:
The latch arbitrates (half duplex or full duplex) transfer by having one side set the bit ("strobe"), then have the other clear the bit ("acknowledge") but to the other side, they are strobing and getting acknowledgment.
To send *and* receive a bit, just:
-set your output bit
-toggle strobe
-poll acknowledge
-at acknowledge get your input bit
-repeat :)
The latch is a little special in that the "invalid" state is now a hold state and the outputs only change on the rising and falling edges. I think (and hope) these two things will eliminate "race" conditions and keep everything stable.
Here's the whole diagram:
Any suggestions or interest in the project?
I haven't built it yet because I'm afraid it's just too slow to do anything too useful in real time (like dump FDS disks :)
Here's the idea though:
The latch arbitrates (half duplex or full duplex) transfer by having one side set the bit ("strobe"), then have the other clear the bit ("acknowledge") but to the other side, they are strobing and getting acknowledgment.
To send *and* receive a bit, just:
-set your output bit
-toggle strobe
-poll acknowledge
-at acknowledge get your input bit
-repeat :)
The latch is a little special in that the "invalid" state is now a hold state and the outputs only change on the rising and falling edges. I think (and hope) these two things will eliminate "race" conditions and keep everything stable.
Here's the whole diagram:
Any suggestions or interest in the project?