It is currently Tue Oct 15, 2019 9:39 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Fri Dec 24, 2010 1:33 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3737
Location: Indianapolis
Regarding the expansion pins on NES cartridges, that normally aren't used. It's time to use them, here is what I'm proposing:

Code:
EXP0: in - CopyNES mapper disable
EXP1: I/O - CAN bus H
EXP2: out - A0 (PRG)
EXP3: out - A1
EXP4: out - A2
EXP5: out - /CE for parallel port device
EXP6: out - audio out
EXP7: Ground
EXP8: I/O - CAN bus L
EXP9: out - PRG R/W


Originally I thought I would use EXP7 for audio in (from the NES), it'd be nice to have but I'm not sure it's needed. So I put another ground there, to give the CAN bus some help (and maybe hope for higher speeds).

This standard would apply to both expansion port devices, and NES cartridges (and requires both to work, of course). So I'm curious if anyone has any thoughts on it, or other alternatives.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2010 3:44 pm 
Offline
User avatar

Joined: Sun Feb 21, 2010 6:06 pm
Posts: 108
It looks good to me, but why would EXP7 need to be GND if there are already two GND pins on the expansion port? A dedicated GND for communication between two MCU's?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2010 9:37 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3737
Location: Indianapolis
Yes, this ground would be near the CAN pins, so theoretically should be closer to the transceiver GND on both ends. So less potential noise sources in-between, is my reasoning, I dunno if it's sound. :) Of course it's still connected to the same ground as everything else, it's just in addition to that.

Cart GND pins are on the far ends of the board, and the CAN transceiver should be as close to the pin as possible (so it'll end up in the middle, above the EXP pins).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 1:35 am 
Offline
User avatar

Joined: Sun Feb 21, 2010 6:06 pm
Posts: 108
Sounds reasonable. My main concern would be standardizing the /CE, R/W and A0-2 pin assignments.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 5:25 am 
Offline

Joined: Tue May 05, 2009 6:12 pm
Posts: 164
why would you need an extra GND for a differential signal?

i might be wrong but i thought you used differential signals to avoid the need of a common GND and to lower the signal noise as both D+ and D- will be equally effected of the noise when twisted. this as you only measure the differential voltage between the D+ and D- instead of between the signal wire and a common GND.

btw, might be a bit off topic, but why use a proprietary (non-free) protocol?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 6:05 am 
Offline
User avatar

Joined: Sun Oct 11, 2009 5:21 am
Posts: 189
Location: Sol 3 in Mutter's Spiral
Unfortunately, this arrangement conflicts with the EXP Sound requirements on the PowerPak, and on many EXP Sound game modded adapters. The latter is less of a problem, but the former needs to be anticipated.

Honestly, with four sources of ground available (two on the conn, and two on the cart slot), I think that placing another here is wasteful. I would rather see the /NMI line available here, as it's the only source for it to the cart slot and this would allow for clever programmers to utilize it in cartridge designs. :)

I'll think about the pinout and see what kind of arrangement I'd suggest. I need to double-check the normal assignments to avoid problems. A DIP or jumper-based selector to change assignments may be a good idea on the EXP board. I've already considered this for assigning where EXP audio is routed, but I need to incorporate it into my next revision when I do a full PCB layout.

If you want GND here, it may be possible to add it this way, but I honestly doubt that the signal noise will be any more or less noticeable using this method. A shared ground is a shared ground, and all you'd be doing is routing it from the main GND source, through the NES PCB, to the EXP conn, and back to the cart slot.

I'm pretty sure that a ground requirement on the cart-end would be sharing the same line anyway, as the two GND pins on the EXP slot, IIRC, share the same trace as those on the cart slot. All that I would expect to happen is extending the length of the path to ground...

As a side-thought, wouldn't it be possible to use a CPLD (or just a PLD) to allow for software configuration of at least two (if not seven) pins, so that for example, if a cart requires audio-in, it can request them via the CPLD, which would assign it to where the cart requires? That may use one pin (for CPLD instruction), but it could potentially program all of the other EXP pins at once so that could be used for anything.


Last edited by Xious on Sat Dec 25, 2010 6:32 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 6:22 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21634
Location: NE Indiana, USA (NTSC)
hyarion wrote:
why would you need an extra GND for a differential signal?

In order to move the signal and ground paths for that signal closer together on the connector.

Quote:
why use a proprietary (non-free) protocol?

How is CAN bus non-free? Bosch owns patents, but these are either expired or will have expired by the time products implementing this are available.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 10:11 am 
Offline
User avatar

Joined: Sun Oct 11, 2009 5:21 am
Posts: 189
Location: Sol 3 in Mutter's Spiral
tepples wrote:
hyarion wrote:
why would you need an extra GND for a differential signal?

In order to move the signal and ground paths for that signal closer together on the connector.


Yet, you'd still be using essentially the same path as you would normally. For example, with a device on the cart side, you'd be utilizing pin 16-20+51-5, and pin 72; on the EXP conn side, you'd be using local GND for any modules. I'm pretty sure that the length is essentially equidistant, and even if it isn't, the difference is likely to be so marginal that nobody would ever notice.

Consider that you could place a CAN component on the cart board so that its signal path is closer to GND just as easily as adding an extra GND path to place it closer, so what is the positive advantage of bridging the GND signal from EXP p02/47 to cart 53 (EXP7) for a device on the cartridge? I guess I'll have to follow the trace to see if it's meaningful, as the EXP bus isn't on the EDC schematics and I don't have any others handy.

I can see wanting the CAN bus close tot he EXP pins for signal quality, but on the NES, all GND paths are effectively shared. IF you really----really---need a GND on the EXP bus for that particular appllication, make it selectable somehow. Obviously, you'd need to be able to enable GND to cart vs. GND to EXP bus on the cartridge end as well as the EXP conn end, but this is easier in the long-run than the deisgn of a gate-array that adds the GND bus.

I say, test it with the cart GND pin and see if all is well before dedicating this function. A sawbuck says there'd be little if any detectable or even noticeable difference, save on a scope. :)

I just think that, unless you make it possible for multiple EXP pin settings, it's frivolous, but I'm giving my idea of a software programmable array of functions serious consideration, pending replies from the others involved or in the forum. I think a CPLD or even a simple PLD is ideal for this and would allow for any function on the EXP conn to be placed on the EXP pins via software control.

That way, the decision of what is available is entirely up to the designer of expansion-enabled cartridge hardware, which if done well, would permit infinite flexibility. Otherwise, you can resort to manual jumpering, which is doable, but a pain for the user. The (C)PLD method is user-invisible, and this the easiest for those folks that don't want to have to meddle, or even those too lazy to move their NES once everything is plugged into it underneath.

The last option is to make a full UnderDeck(TM) module that snaps under the control deck, with a lot of space for hardware and switches on the front. The problem here is cost, as moulding a plastic shell is uber-expensive, whereas the positive benefit is expanded working space for cool stuff, and even a possible future expansion protocol (e.g. micro-slots) to add new modules to it in the future.

If I had first-hand access to injection moulding equipment, I'd have considered this first, as it's the nicest solution, but if we'd need to shell out a fortune for it, that kind of $$$ is best saved for a complete system casing or something equally neat.

I am working on some side-projects to help fund this though. Nothing spectacular, but they'll sell to a boatload of people, with a decent margin, so I can put the majority of the gross into this project, which is a cash-eater to set up. :/

CAN Bus info:
Application for License

The patent in question, USPTO#6208924 will expire somewhere between 2019 and 2020.. I sure hope this'll be done before then, as I'd like to see it realized before Im six-feet-under, but there are licensed CAN technologies to consider, as well as application for licensing the patent. Alternatively, you walk the grey line of ambiguity, but I prefer never to do that. It only gets you deeper in debt than licensing the stuff in the first place. ...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 10:55 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7744
Location: Chexbres, VD, Switzerland
I agree that an extra GND sounds like a waste to me. Especially at 2MHz which is just before those EM side effects on power supplies are critical.
Or if you plan to sink a lot of current on the bottom connector, you'd want to add a second VCC too (so that it's symetrical) or to use another power supply (not a great idea, look at Sega's 32x failure :wink: )

I also use EXP2 for sound for famicom games in (in addition to EXP6 for NES games) because it was right in front of the famicom audio pins so it was just as easy as to add one wire on the FC->NES adapter to get this working. (otherwise you'd have to switch sides which would have been hard).

Currently my NES has both mods done - i.e. audio comes both from EXP2 (famicom games) and from EXP6 (powerpak / MMC5 games). So I'd have to remove the former to get the connector working, which would of course remove audio for famicom games.

So in the end, if you use an GND pin, please use EXP2 - so it won't affect me and other people who did their FC adapter mod with EXP2 instead of EXP6.

Aside of audio circuits, a cool application of this connector would be some kind of memory card that would reliably hold saves for RPGs (more reliably than batteries...). Although I can't see many things that couldn't be done with controller ports...

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 11:27 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21634
Location: NE Indiana, USA (NTSC)
Xious wrote:
CAN Bus info:
Application for License

The patent in question, USPTO#6208924 will expire somewhere between 2019 and 2020

I was under the impression that patents lasted 20 years after filing Bosch had published the CAN 2.0 spec in 1991, eight years before Bosch filed US Patent 6,208,924. Anything published by another before you file, or published by you a year before you file, is ineligible for a patent. So it must be possible to implement CAN without this patent.

Bregalad wrote:
Although I can't see many things that couldn't be done with controller ports

Address lines, for one. There is only one data line from the CPU to both controller ports, and only one clock line from the CPU to each controller port. At least the address lines would allow some sort of chip select.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 5:39 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3737
Location: Indianapolis
As I understand it, you have to license CAN bus to use it in your own chip, as an FPGA for example. However I'm using it in the PIC32, Microchip licensed it, so it's part of the chip cost whether I use it or not. It's a shame not to be able to drop it into an FPGA (the HDL is available), but the way it is integrated into the PIC32 is incredibly convenient. I just figured other potential CAN bus users would be in the same situation as me - not starting from scratch. Also, the transceiver (MCP2551) speed is 1Mbit/s, allows over 100 nodes on the bus, sounds a lot more useful/interesting than RS232.

Yeah, the NES mainboard has some pretty good grounding on it, but part of the reasoning to adding the other ground was that a cartridge that supports CAN bus is likely to have some heavy-duty hardware onboard. The same applies to the exp port device. I'm also pretty concerned about the audio, it should be fine for PowerPak, but if all the other expansion pins where going at the same time? Without grounding near the audio, it seems like it might put noise into it, I'm not sure if it'll be audible though. Noise from the cartridge /exp pins is one thing I hadn't considered fully.

Audio is an analogue signal though, so I'm not sure how that could be switched between pins other than jumpers. Jumpers (other than factory-set ones) are really inconvenient though, I'd hope to not make users have to do that.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2010 11:27 pm 
Offline
User avatar

Joined: Sun Oct 11, 2009 5:21 am
Posts: 189
Location: Sol 3 in Mutter's Spiral
tepples wrote:
I was under the impression that patents lasted 20 years after filing Bosch had published the CAN 2.0 spec in 1991, eight years before Bosch filed US Patent 6,208,924. Anything published by another before you file, or published by you a year before you file, is ineligible for a patent. So it must be possible to implement CAN without this patent.


BOSCH has an earlier patent for it in Germany (BOSCH is a GmbH.), and the US filing is based on their patents there, IIRC.

Also, I'm pretty sure that under the current regulations, you can patent an idea at any time, even after publication or production, as long as nobody else has filed for it. All of these CAN patents tend to pile up though, so it.s a joke to know what's what. There are numerous patents for CAN application, CAN termination, and probably using a CAN bus for generating power with remote controlled hamsters.

(I'll edit this to add my replies to others in a bit... Multiquoting can be...tedious.)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 13, 2011 12:02 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7744
Location: Chexbres, VD, Switzerland
OK I know that usually the sound for the powerpak is passed through EXP7 (pin 53) because that's what official MMC5 carts used.

However, the toploader does NOT have that pin. Only EXP0,3,4,5,8,9 (pins 19,20,51,52,55) are present (they are just left disconnected).

So if one of those pins were assigned to a second sound pin, and that an update of the powerpak would send the sound to both pin 53 and one of those, then it would be possible to get expansion audio on a toploader NES. Otherwise.... you'll have a hard time ading a pin in the connector.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group