ENIO Cart Compatibility

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

Post Reply
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

ENIO Cart Compatibility

Post by chykn »

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. :P
User avatar
infiniteneslives
Posts: 2102
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

Good deal, looking forward to seeing this progress.

I'm kind of confused though with your argument about devcarts. Why wouldn't you just make your own PCB in place of a devcart? The ENIO needs it's own PCB anyways. Additionally you need the NES cords as connectors which there isn't a decent supply for. I guess I don't see where the convenience of the controller ports comes from. If just seems cheaper, easier, and faster to go with a custom cart... I'm guessing people would want something that didn't require messing around with a EEPROM NROM devcart that they presumably don't have anyways.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

Good questions. Let's see...
infiniteneslives wrote:I'm kind of confused though with your argument about devcarts. Why wouldn't you just make your own PCB in place of a devcart? The ENIO needs it's own PCB anyways.
Time
I got the first 10Mb ethernet adapter working on the NES a year ago, but I still don't have a finished product. If I spend another year working on an SRAM dev cart it will never get finished.

Re-inventing the Wheel
I don't own a PowerPak or any sort of real dev cart, but they already exist. If someone else has already done it, it's better to complement their work instead of compete with it. Unless you can do it a hell of a lot cheaper or add some killer feature, of course. If someone does write an online game, they could probably use existing parts from RetroUSB to build the carts.

Ability to Emulate
I spent a couple weeks modifying the FCEUX source code to add ethernet functionality to the MMC1 mapper. If the ENIO is implemented as a peripheral using $4017 reads, you can add it as another controller port device to select from a drop down menu.
infiniteneslives wrote:Additionally you need the NES cords as connectors which there isn't a decent supply for. I guess I don't see where the convenience of the controller ports comes from.
No, there will be no controller cords involved. The expansion port has all the signals that are available to the controller ports. Plus the controller ports can only input 3 bits at a time - D0, D3, D4. The expansion port gives you the ability to input all 8 bits in a single read.

Keep in mind that the ENIO's CPLD will be attached to a few of the Cart-EXP lines. If someone did want to design a cart to decode an address and send /CS and R/W signals to the ENIO, the CPLD could be updated. That way the ENIO could either be addressed using $4017(r)/$4016(w) or a cart designated address, say $4200(r/w). The two advantages to the latter being that you could do parallel writes instead of serial and you could use the second controller port for another device.
User avatar
infiniteneslives
Posts: 2102
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

I guess I see where you're coming from now. I forgot the controller signals were at the EXP port.

I think the real thing I wasn't thinking about was the fact that it's more of an accessory that would allow anyone to develop their own game using the net. I was thinking more along the lines of if you were to release one game, which doesn't make much sense.

Your method supports someone buying the device one time, and playing a library of games if they were to be produced. Basically giving the game developer the most freedom including mapper selection and such. That way your device wouldn't be rendered useless by a new cart design or something. Additionally the carts can be cheap where my idea was for a more expensive cart.

For what it's worth I configured the NESDEV1 EXP pins 0-3 as inputs to the cart and EXP 4-9 as outputs. If this wasn't ideal I could make provisions for bidirectional pins. But since there wasn't much application for it I just picked something that matched up with the free pins I had available in my level shifters. Now that I think about it I had a free set of pins on the open collector level shifter I used for /IRQ. I could easily implement one of the EXP pins for directionless birdir with only changing the PCB layout. I think I'll make that change officially, and choose EXP1.
80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Post by 80sFREAK »

Go with custom cart. It's a custom device anyway. NES have huge shells to fit big enough prototype board.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

infiniteneslives wrote:Your method supports someone buying the device one time, and playing a library of games if they were to be produced. Basically giving the game developer the most freedom including mapper selection and such. That way your device wouldn't be rendered useless by a new cart design or something. Additionally the carts can be cheap where my idea was for a more expensive cart.
Yes, I would certainly like for it to be viewed as a peripheral to be used by any cart as opposed to being tied into a given mapper. But it will be most effective when used by boards such as the NESDEV1 with the ability to load a new game on the fly. Imagine turning on the NES and being given the option to go to a server for a list of ROMs. Select and play. I'd rather go with the more expensive cart and have that ability than to have a single game cart with static code.
infiniteneslives wrote:For what it's worth I configured the NESDEV1 EXP pins 0-3 as inputs to the cart and EXP 4-9 as outputs. If this wasn't ideal I could make provisions for bidirectional pins.
The ENIO only requires two input signals sent from the cart to do 8-bit reads and writes. I'll plan on using EXP8 for /CS and EXP9 for PRG R/W. Does that sound good?
80sFREAK wrote:Go with custom cart. It's a custom device anyway. NES have huge shells to fit big enough prototype board.
Maybe after the ENIO is done, but I wouldn't hold my breath. If I did do a custom cart it would have to be low cost (under $50) and have the ability to load and update PRG code over the network during the game. To keep the cost down, I'd probably have to sacrifice backwards compatibility with most existing mappers and end up using a new custom mapper. It wouldn't have the capabilities to play most existing games like the PowerPak and NESDEV1.
User avatar
infiniteneslives
Posts: 2102
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Post by infiniteneslives »

chykn wrote:I'd rather go with the more expensive cart and have that ability than to have a single game cart with static code.
Yeah I agree with what you're saying. I was speaking more from the standpoint if someone released a game that utilized the ENIO but wanted to sell hardcopies of their game. If the rom was released/sold you could easily integrate with SRAM devcarts like your saying. Your solution really does give freedom to do whatever one would like with the cartridge, that's what'll allow it to gain popularity once finished.
The ENIO only requires two input signals sent from the cart to do 8-bit reads and writes. I'll plan on using EXP8 for /CS and EXP9 for PRG R/W. Does that sound good?
Yeah that would work fine with the setup I've already got. Those pins are hardwired as outputs from the NESDEV1. Right now they are just solder pads where you could manually wire up a free cpld pin (a different solder pad elsewhere on PCB) So it would be simple to adapt to any pins as long as they were the output pins EXP4-9. Additionally, I'm planning on moving up to the larger CPLD in the family which will have more CPLD I/O for the same footprint. So depending on how many extra I/O I have available some more EXP pins may get hardwired/designated pins. Currently EXP0 is the only one like this. But I would give preference to EXP8&9 to support your device especially since there are no other EXP devices released currently.

80sFREAK wrote:Go with custom cart. It's a custom device anyway. NES have huge shells to fit big enough prototype board.
Initially I would have agreed with your statement 80's FREAK. But chykn is right now that I fully understand the goal of his project. The problem is you'll never get everyone to agree on one mapper, NEVER. So you're best bet is to support any mapper the developer chose if you want a game developer to make use of your device. In essence chkyn's solution makes his device universally compatible with any cartridge on a front-loader.

I'm excited about your device chykn. I'm more than wiling to do any hardware testing or whatever I can to help you on this. I'm not sure how you're planning on releasing it, but I'd even build one myself or buy a prototyped version off you and like to work on some hardware testing. I've still got some work to do before I'm ready to release the NESDEV1 I guess the good thing is if I still have time for changes then they can be implemented to support the ENIO.

What address and such are you using for the /CS and R/W logic? Are the signals generated by your version of the MMC1 or something? If it's fairly simple I can even wire up the repro boards I'm working on. The CPLD's I'm using have a few free pins available and mcells for whatever decoding logic you need.
User avatar
chykn
Posts: 108
Joined: Sun Feb 21, 2010 6:06 pm

Post by chykn »

infiniteneslives wrote:I'm not sure how you're planning on releasing it, but I'd even build one myself or buy a prototyped version off you and like to work on some hardware testing. I've still got some work to do before I'm ready to release the NESDEV1
I don't really have a timetable for release, but if you have a Pickit3 (for reprogramming the ENIO) and want to trade a NESDEV1 I'm sure we could work something out. The ENIO would be a dev version similar to what I'm using now - a 48 to 50 pin adapter plugs into the NES and brings the signals via SCSI cable to a PCB that sits in front of the NES. Much better for debugging.
infiniteneslives wrote:What address and such are you using for the /CS and R/W logic? Are the signals generated by your version of the MMC1 or something?
Currently I'm using an 8-bit magnitude comparator on the high address byte lines to send an active low signal to the ENIO. The R/W signal is the PRG bus R/W signal patched through to the EXP port.

If the cart decodes the high address byte and sends /CS and R/W to the ENIO, the cart dictates what address is used. But it would definitely help to standardize this. We could use $4100, $4200 or $4700. If 80sFREAK isn't going to use $4700 for his project, I'd go with that.
Post Reply