Now that the baby is sleeping through the night, I finally have time to work on the ENIO (ethernet/USB KB adapter) again. I've been playing around with a Xilinx CPLD to use as the glue logic between the NES and the PIC32. For the longest time I KNEW </sarcasm> that the best way to implement a peripheral with the best possible download speed was to put an address decoder on the cart and feed /CS and PRG R/W lines to the peripheral through the EXP-Cart pins.
The down side to this approach is obvious. There are currently no carts (except maybe Powerpak & NESDEV1) that could use this without hardware modification. I didn't want to use $4017 reads and $4016 writes for a few reasons: interference with the second controller port, space constraints due to the added discrete logic chips and the need to do serial writes.
But it doesn't do any good to have a car that can't drive on 99% of the roads. Because the CPLD will address the physical space constraints and allow for full 8-bit reads from $4017 (as well as re-assemble the serial writes to $4016) I'm now using these addresses to communicate with the ENIO. This way it should be compatible with any dev cart on a toaster NES. As long as the second controller is not plugged in.
The down side to this approach is obvious. There are currently no carts (except maybe Powerpak & NESDEV1) that could use this without hardware modification. I didn't want to use $4017 reads and $4016 writes for a few reasons: interference with the second controller port, space constraints due to the added discrete logic chips and the need to do serial writes.
But it doesn't do any good to have a car that can't drive on 99% of the roads. Because the CPLD will address the physical space constraints and allow for full 8-bit reads from $4017 (as well as re-assemble the serial writes to $4016) I'm now using these addresses to communicate with the ENIO. This way it should be compatible with any dev cart on a toaster NES. As long as the second controller is not plugged in.