Weird famiclone with infrared controllers

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

Moderator: Moderators

User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Weird famiclone with infrared controllers

Post by krzysiobal »

I become owner of quite weird but compact famiclone console:
Image Image Image Image Image Image Image Image

The mainboard contains just ordinary set of chips (UA6527+UA6538+2x74368 + 74373 + 74139).

The add-on board with pad sockets is equipped with IRDA receiver (I've never heard of any consoles with infrared pads before) and some chips (7408, 4094, UA6581). Here is schematics of that board:
Image

If we consider standard 15-pin pinout for most famiclones (1=GND, 8=DATA, 9=CLK, 12=STROBE, 15=+5V), then:
* Socket marked as "1" is de-facto ready for PAD2 (with the exception that P2.D0 is ANDed with some signal from mysterious UA6581)
* Socket marked as "2" is non-functional

But when assuming that: 1=GND, 2=DATA, 12=STROBE, 14=CLK, 15=+5V) then this custom pinout might agree that 1=PAD1, 2=PAD2.

There are two jumper-wires (not soldered) which probably should be soldered when no irda & extra chips were soldered in.

What's the IRDA protocol & how UM6581 works is still not known. Some other famiclone's pads (IQ502) were equipped with UM6582.
Also, 4094 can reset console (and it does it quite often as sometimes this famiclone spuriously resets).
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Weird famiclone with infrared controllers

Post by krzysiobal »

Ok, I did some measurements and research. Here are results:

UM6581 - details of operation
1. Package & pinout: DIP14, 300mils

Code: Select all

         ,---V---.
!RESET?  |01   14|->VCC
 delay?  |02   13|->P2 inactivity pulse?
  XTAL1->|03   12|->P1 inactivity pulse?
  XTAL2->|04   11|->P2.D0
 P1.CLK->|05   10|<-P2.CLK
  P1.D0<-|06   09|<-STROBE
    GND -|07   08|<-IRDA
         `-------`

There is how the chip was connected in famiclone:
Image

2. Clock
XTAL1 & XTAL2 are ceramic oscillator inputs (455 kHz). The chip has built-in clock generator (probably with inverter). During operation, there is sine wave at XTAL1 and TTL square wave at XTAL2. This clock is used by chip to decode signal from IRDA input & measure idle time time.

Image

Code: Select all

+-1MEG-+                
|      |
+-1.2k----to XTAL2
|      |
+-XTAL-+--to XTAL1
| 455k |
|      |
330p  330p
|      |
GND   GND
3. Infrared receiver
Output from infrared receiver should be connected to IRDA input. Originally, 3-pin 38 kHz SONY SBX1610-52 INFRA RED SERIAL TRANSMISSION ENCODER RECEIVER is used (455 kHz / 38 kHz ~= 12)
This chip has two 8 bit registers to store states of eight buttons for each player. When it detects proper waveform on IRDA input, it updates internal register with received button states.

for player1: 00[A][Select][Start][Up][Down][Left][Right]11000011
for player2: 00[A][Select][Start][Up][Down][Left][Right]00111100

Each bit takes 500 us time:
* GND on IRDA input = blinking of LED at 38 kHz = logical 0
* VCC on IRDA input = LED turned off = logical 1
If no infrared signal is received within 25 ms for each player, internal button states for this player will be reset (set to ones).

Original infrared joypads probably send those signals only if any buttons are pressed, instead of continuous transmission, to save battery. If signals from two joypads are send at the same time, they will interfere and no valid data is received by the chip, so probably they send the data more often that once per frame (25 ms) or in diffrent intervals.

Image

4. Output
STROBE is connected to CPU's pin 39 and P1.CLK/P1.D0/P2.CLK/P2.D0 are connected to 74368 buffers in famiclone and they behave the same as for regular joypad:
* rising edge of strobe causes driving P1.D0/P2.D0 with state of A's button for 1/2 player,
* each rising edge of P1.CLK/P2.CLK causes the P1.D0/P2.D0 to be driven with state of next button (B/Select/STart/Up/Down/Left/Right),
* after eight edges, D0 is driven with 0.

Image

5. Miscellaneous
* Pin 1 & pin 2 have internal pull-ups to VCC and they acts as some kind of inputs, while pin 13 & pin 14 are outputs.

* Pin 1 is probably !RESET. If GND is applied, chip does not generate signals on pin 12/13, ignores IRDA input,returns 0xFF for pad1/pad2 and if there were time shift between pulses on pin 13 and pin 12, they will be in sync after releasing reset.

* There are pulses on pin 12 if no data is received for P1 within some time (and the same on pin 13 for P2). Those pulses have constant duty cycle of 12.5% and frequency, which can be set (lets call it fpoll)
If data for pads are received, there won't be any pulses. Maybe this signal can be used as some kind of notification for the pad to send signal.
Image

* Pin 2 selects fpoll (the maximum delay between receiving two signals for one pad which will not cause reseting button states.
**Driving with GND causes pin 12/pin13 to have 564 Hz
**Driving with VCC causes pin 12/pin13 to have 23.52 Hz
It is NOT analog input. Some kind of frequency signal could be put here, but it should be in phase with pin12/pin13.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Weird famiclone with infrared controllers

Post by lidnariq »

krzysiobal wrote:Originally, 3-pin 38 kHz SONY SBX1610-52 INFRA RED SERIAL TRANSMISSION ENCODER RECEIVER is used (455 kHz / 38 kHz ~= 12)
In my experience, infrared demodulator chips don't usually use a high-quality time source like the 455kHz resonator, instead just setting the demodulation frequency via an RC or LC.
Each bit takes 500 us time:
2kbit/sec is surprisingly fast for modulated IR. Most of the remotes in the LIRC database seem to use bit rates closer to 500-1000 bits/sec. They also usually encode clock and data in the same stream, rather than start bits...

Actual IrDA doesn't use 38kHz modulation, in order to support higher bandwidths.
69yuan
Posts: 7
Joined: Sun Jan 21, 2018 5:10 am
Location: China

Re: Weird famiclone with infrared controllers

Post by 69yuan »

The UA6581 chip is used to decode the remote controller infrared signal and in the remote controller is UA6580 to encode and transmit signal.This remote controller can switch 1P/2P and when you press SELECT + A button ,the console will reset.Both of the chip are created and manufactured by UMC(联华半导体公司) corp.
IMG20161208131159.jpg
Attachments
-7b995298276b9d58.jpg
Last edited by 69yuan on Wed Feb 20, 2019 7:32 pm, edited 1 time in total.
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Weird famiclone with infrared controllers

Post by krzysiobal »

Thank you! Can I ask for photo of gamepad's PCB from top side?
69yuan
Posts: 7
Joined: Sun Jan 21, 2018 5:10 am
Location: China

Re: Weird famiclone with infrared controllers

Post by 69yuan »

QQ图片20180122102602.jpg
QQ图片20180122102545.jpg
IMG_20160706_093802.jpg
IMG_20160706_093742.jpg
This model of famiclone console(SY-200) were designed in 1989,which was popular in China and been exported to Brazil and some European countries. Two remote controller can not control 1P and 2P in the same time , the console can only decode one of the infrared signals. I guess this model of wireless controller chip (UA6581 UA6580) can be replaced by MCS-51.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Weird famiclone with infrared controllers

Post by tepples »

Is there a UA8580, a successor to UA6581 that offers a cleaner decoded signal and better power use? :P

(Looks like UMC had no qualms about reusing MOS part numbers for unrelated ICs.)
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Weird famiclone with infrared controllers

Post by krzysiobal »

I reverse enginereed that pad, here is schematics & pinout for the chip.
The turbo generator is done using additional 3 inverters.

Code: Select all

UM6580 - wireless padd transmitter
         ,---V---.
     VCC-|01   18|->!LED                     
         |02   17|<-RIGHT
         |03   16|<-LEFT
!P1!/P2->|04   15|<-DOWN
  XTAL1->|05   14|<-UP
  XTAL2->|06   13|<-START
         |07   12|<-SELECT
   IRDA<-|08   11|<-A
     GND-|09   10|<-B
         `-------`
Image Image Image
69yuan
Posts: 7
Joined: Sun Jan 21, 2018 5:10 am
Location: China

Re: Weird famiclone with infrared controllers

Post by 69yuan »

IMG_20180126_211643.jpg
IMG_20180126_211454.jpg
IMG_20180126_211742.jpg
69yuan
Posts: 7
Joined: Sun Jan 21, 2018 5:10 am
Location: China

Re: Weird famiclone with infrared controllers

Post by 69yuan »

I have bought five transimitter chip (UA6580) from Taobao and here is the link https://item.taobao.com/item.htm?spm=a2 ... t=6#detail
I am trying to draw PCB that can put into the clone NES control pad and I guess this chip support wide voltage. I will use the 3.7V Li-Polm battery as the power supply. If this subject success, I will upload the PCB source document to our website. Hope everything goes well :D
IMG_20180131_190532.jpg
Hemming
Posts: 21
Joined: Tue Aug 25, 2020 1:07 pm

Re: Weird famiclone with infrared controllers

Post by Hemming »

Hi
Interesting post
I have just picked up one of these rare machines up and wonder if you could help me
The machine does not seem to recognise the remote pad, when you press a button on the pad the light comes on but as soon as you release it goes off.
I dont know if you have to link it up with the machine somehow.
Regards
Aron
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Weird famiclone with infrared controllers

Post by krzysiobal »

Red led, when turned on, indicates that data packet is being sent to the console, so it should only be ON when button in pressed.
Joypad does not need pairing, but there are some other things that might went wrong:
* infrared led is broken (press button and watch it in smartphone camera to see if it also blinks)
* receiver is broken
* crystal in console, reponsible for receiver, lots its frequency
Hemming
Posts: 21
Joined: Tue Aug 25, 2020 1:07 pm

Re: Weird famiclone with infrared controllers

Post by Hemming »

Hi krzysiobal
You have sold the problem for me, its the infrared led its broken.
You are very knowledgeable on this console
Do you know what infrared led part I need, as they seems to be a few different ones?
Also your article on this famiclone seems to be the only one on the net (These must be the rarest famiclone consoles)
Regards
Aron
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Weird famiclone with infrared controllers

Post by krzysiobal »

Probably any infrared one should be ok. For test, you can replace it with color led to check if other parts of the joypad are OK. If the color led you solder in place of infrared one blinks when button is pressed, it will mean everything else (transistor, integrated circuit) is OK.
Hemming
Posts: 21
Joined: Tue Aug 25, 2020 1:07 pm

Re: Weird famiclone with infrared controllers

Post by Hemming »

Thankyou for the help with the famicom console
I thought the controller infrared led light was broke but it is not (I was looking at the camera on the phone wrong, it does show up as working)
You said the receiver on the console or crystal might need replacing, do you know where that is on the console?
Regards
Aron
Post Reply