$4016 D3 and D4 ports on Famicom

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
$4016 D3 and D4 ports on Famicom
by on (#237946)
The $4017 bit 3 and 4 are used by things like light guns and paddles, and these bits are somehow connected to I/O ports on the CPU. But what about the same bits on port $4016? On NES these are accessible from controller port 1 (which makes it possible to use a Zapper in that port if the game allows it) but on Famicom they are not accessible at all (unlike $4017). All schematics that I've seen are of a Famicom so I have no idea how they are laid out on a NES.

Anyone knows how this looks like on a NES, and if it's possible to add them to a Famicom?
Re: $4016 D3 and D4 ports on Famicom
by on (#237949)
Pokun wrote:
All schematics that I've seen are of a Famicom so I have no idea how they are laid out on a NES.
The Electronix corp reverse-engineered schematics are close enough - https://console5.com/wiki/Nintendo_NES-001 (Note that the mainboard sheet has some errors, I've fixed them in a copy here)

Quote:
Anyone knows how this looks like on a NES, and if it's possible to add them to a Famicom?
You certainly could add another three-state-able inverting buffer, like the 74'368 that's already used.

The 74'368 is divided into a group of four and a group of two; in the NES, they're used together in a group of six; in the Famicom that's only true of the inverter associated with $4017. The one associated with $4016 only uses the group of four, while the group of two are permanently enabled and used for two inverters to invert PPU A13 (for nametables) and as the audio amplifier.

The NES adds a full hex inverter (74HCU04) for those two inverters (the remaining four are related to the CIC).

So there's a variety of ways you could do this, but without a way to connect something to them, what for?
Re: $4016 D3 and D4 ports on Famicom
by on (#237962)
Thanks for the explanation and NES schematics!
I see, so there's a bunch of extra circuitry needed at least. I'm very much a novice when it comes to hardware, so I'll need time to study this stuff a bit.

lidnariq wrote:
...but without a way to connect something to them, what for?
Well it's about adding things the Famicom is missing and are required by certain games. There was talk about adding a Four Score to a Famicom, which would require it to connect to the internal controller ports on the PCB, or it wouldn't work with Four Score games (unless you use magic like the Hori multitap that seems to be able to access D0 via the expansion port). Some people add NES ports to their Famicom, which I think should work with a Four Score. I just wanted to know what was required for adding all NES controller pins, so that for example games with two Zappers could be played, or games that otherwise requires the Zapper or similar accessories to use NES controller port 1.

The internal controller connectors are apparently "standard 2.54 mm male headers" (which I haven't been able to find in my local parts store) one 5-pin and one 6-pin (extra pin is for mic), so it should be possible to build an adapter using NES extension cables and avoid modding the Famicom too much (not sure if increased resistance from all the required adapters including the Four Score would be a problem though). For D3 and D4 pins on the controller II port I guess it's enough to connect them to pin 4 and 5 respective on the expansion port inside, but for controller I D3 and D4 pins the discussed circuit would need to be built. Sounds like a lot of work if everything should be detachable.

Another question:
Would it be possible to add a 3.5 mm mono port to the NES controller adapter so that any microphone can be used? From schematics it looks like there are a few extra components in controller II that's also needed besides the mic, but I don't know what a 3.5 mm mono port would require. Famicom microphones tends to go bad over time.
Re: $4016 D3 and D4 ports on Famicom
by on (#237967)
Pokun wrote:
unless you use magic like the Hori multitap that seems to be able to access D0 via the expansion port

Do you actually have one, or some knowledge of it actually working that way?

I think the conclusion reached before was that it never really did what it says it does.
Re: $4016 D3 and D4 ports on Famicom
by on (#237970)
Pokun wrote:
unless you use magic like the Hori multitap that seems to be able to access D0 via the expansion port
My informed guess is that the Hori Multitap is either a total lie and players 1 and 2 on it just don't work, or it invokes a novel protocol that no games ever used.

Pokun wrote:
Well it's about adding things the Famicom is missing and are required by certain games.
I mean, if you start with an AV Famicom - which already has the ports in the front - and just want to make $4016d3 and $4016d4 work, that's easy enough. There were several parts that do same right thing, beyond the 74'368 already used. (any "three-state inverting buffer with active low enable", e.g. 74'210, 74'240, 74'310, 74'340, 74'366, 74'4305, 74'540.)

Quote:
The internal controller connectors are apparently "standard 2.54 mm male headers" (which I haven't been able to find in my local parts store) one 5-pin and one 6-pin (extra pin is for mic)
You can't find standard pin header? I mean, those connectors aren't simple pin header; at the very least there's a retaining clip...

Quote:
For D3 and D4 pins on the controller II port I guess it's enough to connect them to pin 4 and 5 respective on the expansion port inside
You can find instances of people modifying their AV Famicoms in this way.
Quote:
but for controller I D3 and D4 pins the discussed circuit would need to be built. Sounds like a lot of work if everything should be detachable.
I personally think it would be too much effort to keep the original case if you wanted to make it compatible with NES Four Score games.

Quote:
Would it be possible to add a 3.5 mm mono port to the NES controller adapter so that any microphone can be used? From schematics it looks like there are a few extra components in controller II that's also needed besides the mic
There's a bunch of different parts here... here's a spliced segment of Enri's reversed engineered schematics showing the full microphone pathway, from electret to CPU data bus interface-
Attachment:
Enri-famicom-microphone-digital-path.png
Enri-famicom-microphone-digital-path.png [ 1.59 KiB | Viewed 8245 times ]

I guess you could just put a 1/8" jack in lieu of the electret microphone in the above schematic. And I have no idea how one would want to handle the volume knob (120k pot)

Quote:
Famicom microphones tends to go bad over time.
You can buy new form and fit compatible electret microphones.
Re: $4016 D3 and D4 ports on Famicom
by on (#237981)
rainwarrior wrote:
Pokun wrote:
unless you use magic like the Hori multitap that seems to be able to access D0 via the expansion port

Do you actually have one, or some knowledge of it actually working that way?

I think the conclusion reached before was that it never really did what it says it does.
No I never had one, Lidnariq is the one who told me that it uses magic. Maybe it just uses D1 serially like the Four Score does with D0. But yeah if no games uses it, it's pretty useless. Micro Mages claims to support it besides the Four Score, but I wonder how they did that if no one knows how it works and no games are known to support it. Maybe they just meant that they support standard expansion port controllers though and read Wikipedia's misinformation about the adapter.

lidnariq wrote:
I mean, if you start with an AV Famicom - which already has the ports in the front - and just want to make $4016d3 and $4016d4 work, that's easy enough. There were several parts that do same right thing, beyond the 74'368 already used. (any "three-state inverting buffer with active low enable", e.g. 74'210, 74'240, 74'310, 74'340, 74'366, 74'4305, 74'540.)
I see, on the other hand the AV Famicom requires more work to get the microphone working.

lidnariq wrote:
You can't find standard pin header? I mean, those connectors aren't simple pin header; at the very least there's a retaining clip...
Well I can find breakable header rows with 2.54 mm pitch, but I mean one that looks like the controller connector with clip. I'm not sure what to search for.

Quote:
I personally think it would be too much effort to keep the original case if you wanted to make it compatible with NES Four Score games.
If it was just the Four Score you could just add two NES-Famicom controller adapters sticking out in the back (might look ugly though), but for adding $4016-D3 and $4016-D4 and also retaining the microphone there's indeed a bit too much work. I would personally not be willing to mod my case.

Quote:
I guess you could just put a 1/8" jack in lieu of the electret microphone in the above schematic. And I have no idea how one would want to handle the volume knob (120k pot)
I see, thanks.

Quote:
You can buy new form and fit compatible electret microphones.
Yeah I plan to do that and see if it fixes the microphone in my own controller. If one is to make an adapter for NES controllers I thought adding a microphone port to it made sense instead of adding a microphone to the adapter.
Re: $4016 D3 and D4 ports on Famicom
by on (#237990)
Pokun wrote:
Maybe it just uses D1 serially like the Four Score does with D0.
The "standard" 4 player mode on the Famicom is: the two built-in controllers on both D0, and two more controllers on both D1. Several companies made controllers that specifically connected to 4016d1 (e.g. HAL JoyBall) and also released adapters (e.g. HAL JoyPair) that allowed a second expansion port controller to instead send data via 4017d1.

The problem is that the Hori 4-Players Adapter has four DA15 connectors, implying that it adds four more controllers, but it's impossible for it to replace the two that are built in to the Famicom.

For some inscrutable reason, the Famicom expansion port includes access to 4017d0, which can't be overridden without getting in a fight with the player 2 controller. But that does mean that on the AV Famicom, if nothing's plugged in to the front, it could be possible to supply three of the controllers data.

If someone ever gets their hands on a 4-Players Adapter - which I understand are rare and comparatively expensive - I'd love to see a picture of its PCB. Maybe it's genuinely a 6-players adapter, and the other two players are made available on other bits of $4017.

Or maybe it's like Naki's Tribal Tap, which added five SNES controller ports but one was simply nonfunctional.

Pokun wrote:
I see, on the other hand the AV Famicom requires more work to get the microphone working
Specifically because the ASIC used in the AV Famicom leaves 4016d2 open bus. The only real difference is that this person had to add another 74'368 to drive it.

Pokun wrote:
Well I can find breakable header rows with 2.54 mm pitch, but I mean one that looks like the controller connector with clip. I'm not sure what to search for.
I mean, DigiKey's the wrong distributor to use in Europe, but I just searched there for 0.1" pitch, 1 row, 5 or 6 position, and the first thing I found that wasn't breakable pin header had the retaining clip.

I don't know if it's fully geometry compatible. I'd need to look more closely inside a Famicom. All the pictures I found are only of the mainboard.

Quote:
If one is to make an adapter for NES controllers I thought adding a microphone port to it made sense instead of adding a microphone to the adapter.
Certainly on the NES 4016d2 is already accessible via the expansion port.
Re: $4016 D3 and D4 ports on Famicom
by on (#237996)
lidnariq wrote:
Pokun wrote:
Maybe it just uses D1 serially like the Four Score does with D0.
The "standard" 4 player mode on the Famicom is: the two built-in controllers on both D0, and two more controllers on both D1. Several companies made controllers that specifically connected to 4016d1 (e.g. HAL JoyBall) and also released adapters (e.g. HAL JoyPair) that allowed a second expansion port controller to instead send data via 4017d1.

The problem is that the Hori 4-Players Adapter has four DA15 connectors, implying that it adds four more controllers, but it's impossible for it to replace the two that are built in to the Famicom.

For some inscrutable reason, the Famicom expansion port includes access to 4017d0, which can't be overridden without getting in a fight with the player 2 controller. But that does mean that on the AV Famicom, if nothing's plugged in to the front, it could be possible to supply three of the controllers data.

If someone ever gets their hands on a 4-Players Adapter - which I understand are rare and comparatively expensive - I'd love to see a picture of its PCB. Maybe it's genuinely a 6-players adapter, and the other two players are made available on other bits of $4017.
I meant that the Hori adapter might be using $4016/$4017-D1 for all four controller ports serially just like the Four Score uses $4016/$4017-D0 serially for four controllers on the NES. The Four Score's PCB seems to be marked "HORI", so I thought it wouldn't be too surprising if they used a similar protocol for both adapters. But yeah it could simply be using two of the other input pins for the two extra controllers.
I have almost never seen the adapter in the wild so I assume it's quite rare, but if I ever get it I will document it.

Oh I found an old thread with SeanOrange of Famicom Dojo video series do some simple testing with the Hori adapter. From the sound of this, it seems like the first two ports always simply works as normal expansion controllers ($4016/$4017-D1) no matter the 2P/4P-switch's setting. And the two other ports are using this unknown protocol and are only enabled by the 2P/4P-switch. Athena's Wit's, US Championship V'Ball and Downtown Nekketsu Koshinkyoku seems to be three games that do support this unknown protocol (I heard US Championship V'Ball also supports the Four Score). So yes it is probably a 6 controller multitap only that all games that supports it, merges the first two ports' data with the hardwired controllers' data so that no more than 4 players are supported. Maybe someone interpreted this in a strange way which started the false rumour that it can actually be read from $4016/$4017-D0.
Getting this straight might fix things like the Wikipedia misconception that the Hori adapter is the only way to use four controllers on Famicoms.

Quote:
I just searched there for 0.1" pitch, 1 row, 5 or 6 position, and the first thing I found that wasn't breakable pin header had the retaining clip.

I don't know if it's fully geometry compatible. I'd need to look more closely inside a Famicom. All the pictures I found are only of the mainboard.
OK I will try search a bit harder before complaining again. For pictures, you can see the mainboard with controller connectors (marked P4 and P5) here and some smaller pictures here. Spare controllers often show up on ebay sometimes with good pictures of the connector heads. Here is one quite good.

lidnariq wrote:
Quote:
If one is to make an adapter for NES controllers I thought adding a microphone port to it made sense instead of adding a microphone to the adapter.
Certainly on the NES 4016d2 is already accessible via the expansion port.
I was talking about the NES->Famicom controller adapter for Four Score and more controller options on the red & white and Twin Famicoms. Since the NES ports won't have the microphone pin the microphone would have a separate connection. Some people use one of the D3 or D4 pins for the microphone which breaks Zappers and accessories but then adds a switch so you have to choose either microphone or Zapper but not both at the same time.
Re: $4016 D3 and D4 ports on Famicom
by on (#237997)
Pokun wrote:
Athena's Wit's
Ok, looking in the code here. Starting at $FE29
After asserting and then de-asserting OUT0
It reads 8 times from $4017, combines the 2s and 1s bits and stores that in $6D
It reads 8 times from $4016, combines the 2s and 1s bits and stores that in $6C
It reads 8 times from $4017, stores the 1s bit in $73 and the 2s bit in $71
It reads 8 times from $4016, stores the 1s bit in $72 and the 2s bit in $70
It reads 8 times from $4017, stores the 1s bit in $77 and the 2s bit in $75
It reads 8 times from $4016, stores the 1s bit in $76 and the 2s bit in $74.
It clears $78.
If $74 holds #$20, it sets the $80s bit in $78 - checking for the 4-Player Adapter's different signature
If $75 holds #$10, it sets the $40s bit in $78 - ditto
If $76 holds #$10, it sets the $20s bit in $78 - checking for Four Score signature
if $77 holds #$20, it sets the $10s bit in $78 - ditto
If $78 holds exactly #$C0, it copies $71 over $6F and $70 over $6E - using the data from the 4-Player Adapter
If $78 holds exactly #$30, it copies $73 over $6F and $72 over $6E - using the data from the Four Score.

So - good intuition. That's exactly what Wit's expects.

Quote:
Maybe someone interpreted this in a strange way which started the false rumour that it can actually be read from $4016/$4017-D0.
I think the problem is that it's misleadingly named. Before it came out, there already was a convention for four simultaneous players. The labels on the toggle maybe should have been 4/6 instead of 2/4.

Quote:
OK I will try search a bit harder before complaining again. For pictures, you can see [...] good pictures of the connector heads
Ok, that's shrouded on all four sides. I admit I didn't see any like that, but a single retaining clip is probably good enough to mate to the existing connector. Digi-Key doesn't have anything that's shrouded on more than one side.

edit: or maybe you're looking for something more like this?.
Re: $4016 D3 and D4 ports on Famicom
by on (#238171)
So, from the way it's used in Micro Mages with the assertion that that's mode "4"...

$4016 D1
0-7 = Port 1
8-15 = Port 3
16-23 = Signature $20

$4017 D1
0-7 = Port 2
8-15 = Port 4
16-23 = Signature $10

So what does mode "2" do? Does this just disconnect ports 3 and 4 and the signature, and now 8-23 will be an extended report from ports 1 and 2? (That's what the Four Score does in mode "2" as well, right?)
Re: $4016 D3 and D4 ports on Famicom
by on (#238173)
Given that the protocol sounds like the same ASIC as in the Four Score, I'd bet your guess is correct.
... and maybe given that the part number for the Four Score (both inside and on the ASIC inside) starts with "FPA" = Four Player Adapter?
Re: $4016 D3 and D4 ports on Famicom
by on (#238174)
Yeah sounds plausible.

So even the signature is identical to the Four Score's?
Edit: Oh it's reversed. The Four Score gets $10 from $4016 and $20 from $4017.
Re: $4016 D3 and D4 ports on Famicom
by on (#238199)
Hori 4 players has been described on this page.
http://forum.contrabanda.eu/index.php?topic=817.0

The method of connecting the asic and which signals were used were copied.
Image
Re: $4016 D3 and D4 ports on Famicom
by on (#238200)
Would it be accurate to sum it up as a Four Score connected to D1 with $4017 and $4016 swapped at both the input and output?
Re: $4016 D3 and D4 ports on Famicom
by on (#238203)
Sure sounds like it.

If we can trust that image of monospaced text (reproduced below), it's the same label on the ASIC as in the Four Score, anyway.

Code:
            HORI FPA-92-S01
                ___  ___
CLK player2 <- | 01\/22 | -- +5V
  D player2 -> | 02  21 | <- selector(+5v-2players, GND-4players)
CLK player3 <- | 03  20 | -> CLK player1
  D player3 -> | 04  19 | <- D player 1
CLK player4 <- | 05  18 | -> OUT player1, player2, player3, player4
  G player4 -> | 06  17 | <- OUT0
        GND ?? | 07  16 | -> $4016 D1
        GND ?? | 08  15 | <- CLK1
         RA -> | 09  14 | -> $4017 D1
         RB <- | 10  13 | <- CLK2
        GND -- | 11  12 | ?? +5V
                --------

... ok I couldn't quite bring myself to reproduce it verbatim. I added arrows.

OUT0, CLK1, CLK2, and all four "D player" lines are pulled high with a 7x10k resistor SIP.

RA and RB (100kΩ resistor between; 250pF capacitor from RA to ground) form a retriggerable one-shot with time constant 25µs - I assume this is how it detects when the game is done reading the report.
Re: $4016 D3 and D4 ports on Famicom
by on (#238209)
Probably not news to the people in this thread, but I hadn't seen what the Four Score PCB looks like. There are some good photos here:
http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=65237

So it was actually made by Hori? Both the ASIC and the PCB have their name on it.

tepples wrote:
Would it be accurate to sum it up as a Four Score connected to D1 with $4017 and $4016 swapped at both the input and output?

Are we missing a turbo feature?
Re: $4016 D3 and D4 ports on Famicom
by on (#238215)
So I've just tried Micro Mages, and realised to my disappointment that both my Fourscores are PAL variants and won't play it at all on my NTSC NES. And judging by the thread at Nintendo age, no one has figured out a solution for how to mod the fourscore either.

I'd like to avoid any more delay in getting Micro Mages to run in 4-player mode, by just buying a US one on eBay. But this is proving more difficult than expected. The listings which show the back side of the fourscore are few and far between. So I guess my best bet is to look at the seller's location and hope it indicates the right model.

What's more, I'm not even sure exactly what part number I am looking for here, as despite loads of googling I cannot find any definite statement of what part number the US fourscore actually has. So far, I've found pages saying that the common European version is "NESE-034", and the one released in Scandinavia is "NES-034". And then yet another page saying the Scandinavian model is "NES-034A". And yet, I seem to be finding US sellers on ebay selling "NES-034A" versions. So something doesn't add up here...

Could anyone fortunate enough to own a US fourscore check the back / upload a photo?
Re: $4016 D3 and D4 ports on Famicom
by on (#238216)
From the back of the Four Score accessory (for NTSC NES) that I bought to write the "Eighty" tech demo:

Nintendo®
NES FOUR SCORE™
----------
Model No: NES-034
Rating: 10 mA
©1990 Nintendo
Pat. Pend. Made in Japan
Re: $4016 D3 and D4 ports on Famicom
by on (#238217)
Bananmos wrote:
So I've just tried Micro Mages, and realised to my disappointment that both my Fourscores are PAL variants and won't play it at all on my NTSC NES. And judging by the thread at Nintendo age, no one has figured out a solution for how to mod the fourscore either.
I'd guess that the controller ports on the PAL Four Score have the same stupid pile of diodes that the PAL NES has...
Re: $4016 D3 and D4 ports on Famicom
by on (#238239)
Yes, but only PAL-A (IIRC) and certain (German) PAL-B Four Scores. They should work on any NES but they require NES-004E controllers. The SCN PAL-B Four Scores shouldn't have those diodes or else they wouldn't be usable with the NES-004 controllers that NTSC and SCN NES systems comes with.

In other words NES-034A should be fine for NTSC and should work with any NES controllers.

rainwarrior wrote:
tepples wrote:
Would it be accurate to sum it up as a Four Score connected to D1 with $4017 and $4016 swapped at both the input and output?

Are we missing a turbo feature?
Good point, I can't see a turbo switch anywhere.
Re: $4016 D3 and D4 ports on Famicom
by on (#238263)
Pokun wrote:
Some people use one of the D3 or D4 pins for the microphone which breaks Zappers and accessories but then adds a switch so you have to choose either microphone or Zapper but not both at the same time.
... Could you get away with shorting 4016d2 and 4017d3? Such that whatever's plugged in (controller with microphone, or zapper) the same bit will appear in both places?

I suppose it could be a problem if there games that use the microphone and also the zapper?
Re: $4016 D3 and D4 ports on Famicom
by on (#238268)
So to my delight, it appears that NES-004E controllers *do* work on an NTSC NES when plugged into a NESE-034 fourscore. And they are the standard ones here in the UK, so easy to buy. I just didn't happen to have many of them, since my PAL NES's were from Sweden, and I then got NTSC ones - both of which use the NES-004 controller variant.

So looks like I'll soon have a 4-player Micro Mages setup after all... and the fourscore setup will be useful as a general coord extension too. :)
Re: $4016 D3 and D4 ports on Famicom
by on (#238271)
Do we have some documentation I could reference about the PAL controllers' diode protection?

From what I could find: the PAL controller port has 6 diodes on it, which can be bypassed to get NTSC controllers to work. To mod the controller side instead to work with PAL the recommendation is to put two 3.6K resistors connecting both LATCH and CLK to 5V. Presumably the latter is how the PAL controllers are normally wired?

Is there a schematic for the diodes in the controller port? Are there any negative consequences of doing either mod, or is it perfectly safe to use a PAL controller with an NTSC system? Is it unsafe to have an NTSC controller plugged into a PAL system?
Re: $4016 D3 and D4 ports on Famicom
by on (#238272)
rainwarrior wrote:
Is there a schematic for the diodes in the controller port?
Using the pictures here and here, it appears to be
+5V --|>|-- jack
D3 --|>|-- jack
D4 --|>|-- jack
D0 --|>|-- jack
OUT --|<|-- jack
CLK --|<|-- jack
Attachment:
File comment: the marked capacitor isn't populated
nes controllers PAL1-marked.png
nes controllers PAL1-marked.png [ 61.26 KiB | Viewed 8079 times ]

Digitally, the diodes on D0, D3, D4 are a no-op - the NES already has a pull-up inside the console. However, on OUT and CLK it makes them open-collector, and the controller must add those pull-ups to work around it.

The diode on +5V makes this really sound like it was for some sort of regulatory compliance instead of "just" region locking them.

Quote:
Are there any negative consequences of doing either mod, or is it perfectly safe to use a PAL controller with an NTSC system?
I can't think of any reason that the extra pull-ups on a NES system (3.6kΩ) would be bad. There's already a 10kΩ pull-up inside the console; two PAL controllers plugged into a deck would consume a tiny bit more static power – about 1.4mA per controller since OUT is idle low and CLK is idle high.

Quote:
Is it unsafe to have an NTSC controller plugged into a PAL system?
No, it just won't work. It'll always see OUT and CLK as low, so no bits will ever come out.

Pedantically, diodes actually do conduct a tiny amount when reverse-biased, so it's conceivable that a sufficiently leisurely reading routine might be able to coax bits out.
Re: $4016 D3 and D4 ports on Famicom
by on (#238275)
Thanks for that explanation.
Re: $4016 D3 and D4 ports on Famicom
by on (#238286)
Yes thanks! I'm glad to finally get a good explanation of how they are wired and why NES-004 controllers doesn't work on non-SCN PAL systems and Four Scores.

I see that the Hori multitap and the non-SCN PAL controller situation are both added to the wiki. Great!
Maybe the non-SCN PAL Four Score (NESE-034) should be mentioned too. It works on any NES (and HVC-101 I guess) but it requires controllers with pull-ups (NESE-004).

lidnariq wrote:
Pokun wrote:
Some people use one of the D3 or D4 pins for the microphone which breaks Zappers and accessories but then adds a switch so you have to choose either microphone or Zapper but not both at the same time.
... Could you get away with shorting 4016d2 and 4017d3? Such that whatever's plugged in (controller with microphone, or zapper) the same bit will appear in both places?

I suppose it could be a problem if there games that use the microphone and also the zapper?
Yes and maybe a buzzy microphone would also mess with the Zapper. I think the microphone needs a separate wire.

lidnariq wrote:
The diode on +5V makes this really sound like it was for some sort of regulatory compliance instead of "just" region locking them.
Then again Nintendo did the same thing with PAL SNES controllers, and that time they didn't discriminate Scandinavia either.
On the other hand, the 64 has region-free controllers but PAL versions got a ferrite bead lump on the cord. It's like a pattern of Nintendo to modify PAL controllers.
Re: $4016 D3 and D4 ports on Famicom
by on (#238306)
Pokun wrote:
Yes and maybe a buzzy microphone would also mess with the Zapper. I think the microphone needs a separate wire.
But only if there are games that care about both at the same time, right? The point is that on the AV Famicom there's no microphone unless the user added it... Whereas on the original Famicom someone theoretically could have held the P2 controller as a mic and the zapper at the same time.

So it's true that if a game expects the microphone, and the zapper is plugged in instead, it'll get a nonsense signal, and vice versa ... but if the right peripheral is plugged in, and no game cares about both at the same time, I can't figure out why it wouldn't be ok?



Also, I sat down and traced the picture of the PCB of the US Four Score, and found something interesting... they didn't swap the various pins on the ASIC around to achieve the changed signature... I think the signature might be controlled by pin 12... either that, or pins 13-16 are wired differently and pin 12 routes the different signals differently.
Code:
           ---v---
P2 Clk <- |o 1 22 | -- 5V
P2 Dat -> |  2 21 | <- 2//4
P3 Clk <- |  3 20 | -> P1 Clk
P3 Dat -> |  4 19 | <- P1 Dat
P4 Clk <- |  5 18 | -> relayed OUT
P4 Dat -> |  6 17 | <- *out?
TurboB -> |  7 16 | -> *4016d?
TurboA -> |  8 15 | <- *clk1?
  C/RA -> |  9 14 | -> *4017d?
    RB <- | 10 13 | <- *clk2?
   Gnd -- | 11 12 | <- gnd***
           -------
* can't verify, assumed same as preceding pinout.
*** note change

(edit:) Have to admit I'm tempted to get my hands on a Four Score just so that I can see what changes if I change what pin 12 is tied to.

Pull-ups R2, R3, & R4 on the board pull "out", "clk1", and "clk2" high. Current-limiting resistors R9, R10 prevent bus conflicts (with what??) on "4016d" and "4017d". Every pin between the ASIC and one of the controller jacks has undervoltage protection diodes (nine in total: one for OUT, four for DATA and four for CLOCK). Every data pin from a controller has a pull-up resistor.

Also, in hindsight, there's no reason the Four Score needs its own 25µs RC to detect when to restart the serial stream, so I'm not entirely certain what it is for. It's too fast to just be the turbo button control, although they obviously could have a digital divider inside.
Re: $4016 D3 and D4 ports on Famicom
by on (#239781)
I did few experiments with four-score (PAL version 1.1, chip: FPA-PAL-S01).
Image Image Image Image


First, the exact shape and parameters of input clocks (pin 9, 10):
13.2395 kHz
Image

Then, I wrote a simple program that returns in loop state of button A as fast as possible,
Code:
lda #1
   ldx #0
   clc
forever1:   
   sta $4016
   stx $4016
   bcc forever1

enabled "turbo A" on four score and hold the A button. The button read-back state was alternating every 34.617ms and the transition always appeared during rising edge of four-score clock, every 512 of them.
Image

Next I looked at the time dependency between OUT0 (from console) and its buffered version (fed into joypads), as well as the joypad clocks.
Image

And last thing is the mysterious pin 12 - it alters he signature returned by 16-24 reads.
When disconnected, it seems to be internally pulled up to +5V.

Code:
pin 12 | $4016 reads 16-24  | $4017 reads 16-24
 GND           $10                   $20
 +5V           $20                   $10


BTW. I did few months ago similar adapter, which can work in 3 modes (selected by switch):
Mode 1 - 4 players in NES format
Mode 2 - 4 players in Famicom format
Mode 3 - Joypad 1 and 3 controls $4016.D0 and Joypad 2 and 4 controls $4017.D0 (So you can play regular 1 player games using 2 joypas or 2 player games using 4 joypads)

Image