Mahjong Controller Guide.

Joined
Jan 13, 2005
Posts
41
Because of my insane love for mahjong games [mvs and others], I would like to put together a guide on the NeoGeo mahjong controller.

I have seen a picture of one, but I have some questions.

Does the mahjong controller have 1 connector for connection to the mv/aes?
(I am thinking that it would)

and a basic neo geo controller question.
It the standard controller based on the older style where each pin creates an individual signal, or is it more modern [like a ps contoller] where it converts a signal into a stream of data?

Knowing these things will help me to work out a diagram for the pinout of the mahjong.

--
Non-Neogeo mahjong games operate on an old system, but create a matrix where a pressed button will set off 2 signals and the game will recognize which button has been pressed.

I have a working non-neogeo betting mahjong controller [which as more buttons than a standard or neogeo mahjong controller] and a jamma to mahjong pinout, so knowing more about the Neogeo mahjong controller should allow me to accurately break down the wiring.
 
Last edited:

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,665
I suspect it has only one connector. I can tell you that each pin creates its own signal, there will be a bit of hardware inside the controller though so that all the buttons can be sent through one controller port. This is done via banks and you can find more infomation in the IR mase thread in this forum about how that works (http://www.neo-geo.com/forums/showthread.php?t=137062).

Raz
 

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
Lots of rereading that IR Maze thread, and mame code, but I think I may actually have it figured out. Or at least I think what Raz has been saying has finally sunk in and the mame code provided the last couple of details. There are three pins (9, 2, and 10) that are high or low, specifying a particular bank of buttons.
(A means pin 10. Hex is easier.)
92A
001 = Bank 1
010 = Bank 2
100 = Bank 3

The response from the controller is on the normal pins (4-7 and 12-15)
Bank 1
Pin 15 MAHJONG_A
Pin 7 MAHJONG_B
Pin 14 MAHJONG_C
Pin 6 MAHJONG_D
Pin 13 MAHJONG_E
Pin 5 MAHJONG_F
Pin 12 MAHJONG_G
Pin 4 UNKNOWN

Bank 2
Pin 15 MAHJONG_H
Pin 7 MAHJONG_I
Pin 14 MAHJONG_J
Pin 6 MAHJONG_K
Pin 13 MAHJONG_L
Pin 5 MAHJONG_M
Pin 12 MAHJONG_N
Pin 4 UNKNOWN

Bank 3
Pin 15 MAHJONG_PON
Pin 7 MAHJONG_CHI
Pin 14 MAHJONG_KAN
Pin 6 MAHJONG_RON
Pin 13 MAHJONG_REACH
Pin 5 UNKNOWN
Pin 12 UNKNOWN
Pin 4 UNKNOWN

Sadly, I have no way to test this. I hope the 'Pon', 'Chi' and others make sense to you at least; I have no clue how to play mah-jong

Ninja edit: Holy fuck, you're in Caldwell!?!?!?!?!?!?!?
 
Last edited:
Joined
Jan 13, 2005
Posts
41
interesting. I'll have to try and rig something to test a mahjong set-up.
I'll be sure and post any results I come across


[yup, I'm in Caldwell.]
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
Based on the MV-1F service guide, the mahjong controllers in the arcade were plugged into the DB15s on the boards.

I knew there had to be some sensible reason for them to have controller ports on them.
 
Last edited:

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
I have a neo mahjong controller on it's way, I'm going to attempt to build a small board with leds on each of the din lines, then I'll hook the sucker up and see what lights up when I push what.

Depending on the results, it might be possible to build a controller that doesn't have an IC in it.

I'll also open the controller up and post a nice big picture of the PCB. Hopefully that will get this ball rolling for everyone else.
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
Oh you guys are going to love this.

I opened up the mahjong controller. There's no IC or anything. Just 21 buttons that each ground two pins when they're depressed.

This thing doesn't worry about the possibility of the player punching more than one button at a time, because mahjong's not exactly a twitch game.

I'll post the pics and a schematic after I get back from my therapy appointment.
 

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
Thanks for doing this, looking forward to seeing it. Is it a cabinet mahjong controller or one for AES?
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
toodles said:
Thanks for doing this, looking forward to seeing it. Is it a cabinet mahjong controller or one for AES?
AES, but they should be exactly the same. It is my belief that the arcade mahjong controller also plugged into the 15 pin port that was on most of the arcade boards.
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
Wouldn't you know that it would happen. It's been that kind of day. The USB port on my camera decided to fall INTO the body of the camera. There's really no way to get a good picture of the button side of the PCB anyway, because the buttons are mounted in a slab of metal and I'd probably destroy the controller trying to remove it.

Still, I've got a schematic.

The "top" is the underside of the PCB. The blue lines are on top, the pink lines are where the traces are on the other side of the PCB. Solder/junction points are indicated in black.

Where there are two solder points right next to each other, that's pretty obviously a button or connector. I've labelled the buttons. The 15 pin connector is numbered like that on the board, so I can't confirm whether that actually matches up to the pins on the standard 15 pin connector yet (mahjong game should be in the mail tomorrow).

mahjong.png


edit: ah crap. I forgot to connect the undertraces to the RON PON etc buttons. You can see where they go, just extend the pink traces to the left until they intersect with those junction points. And yes, the RICHI is connected to the lower point than the RON.

Also, is it just me, or does it seem like the SELECT button might need to be held down in order to use the RON, RICHI, KAN, CHI, and PON buttons (or vice-versa actually)? Since I have no Mahjong game, I can't verify this. I'll scan the instruction sheet tomorrow. I do not read Japanese.

Oh, by the way, PON, CHI etc are names for different types of melds in Japanese mahjong.
 
Last edited:

werejag

Galford's Poppy Trainer
Joined
May 3, 2005
Posts
2,626
so this drawing is correct? and all it is is switches no ics. wow. if i get the proper layout pic i might build one soon
 

SpamYouToDeath

I asked for a, Custom Rank and, Learned My Lesson.
15 Year Member
Joined
Oct 3, 2005
Posts
6,105
Might just be simpler to say "button x connects pins y and z"
 

werejag

Galford's Poppy Trainer
Joined
May 3, 2005
Posts
2,626
looking for a bigger pic of the neogeo controler now so i build a controler
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
I'll borrow a camera tonight and post pics, hopefully.

I'm pretty annoyed, I'm going to have to send my camera in for service :/
 

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
FalcomAdol said:
Also, is it just me, or does it seem like the SELECT button might need to be held down in order to use the RON, RICHI, KAN, CHI, and PON buttons (or vice-versa actually)?
Nope, because when the Neo is checking for RON, RICHI, KAN, etc, pin 9 (which is for some reason also connected through pin 3 according to your pic) will be low, so if KAN or any of those keys is pressed, they will appear shorted to ground.

It looks like I may have been backwards in the bank select I described way back when; got the highs and lows backwards. This looks to match what you described.
(A means pin 10. Hex is easier.)
92A
110 = Bank 1
101 = Bank 2
011 = Bank 3

The response from the controller is on the normal pins (4-7 and 12-15)
Bank 1
Pin 15 MAHJONG_A
Pin 7 MAHJONG_B
Pin 14 MAHJONG_C
Pin 6 MAHJONG_D
Pin 13 MAHJONG_E
Pin 5 MAHJONG_F
Pin 12 MAHJONG_G
Pin 4 UNKNOWN

Bank 2
Pin 15 MAHJONG_H
Pin 7 MAHJONG_I
Pin 14 MAHJONG_J
Pin 6 MAHJONG_K
Pin 13 MAHJONG_L
Pin 5 MAHJONG_M
Pin 12 MAHJONG_N
Pin 4 UNKNOWN

Bank 3
Pin 15 MAHJONG_PON
Pin 7 MAHJONG_CHI
Pin 14 MAHJONG_KAN
Pin 6 MAHJONG_RON
Pin 13 MAHJONG_REACH
Pin 5 UNKNOWN
Pin 12 UNKNOWN
Pin 4 UNKNOWN

So if the neo is checking for the PON/CHI/etc keys, its needs to set it to bank 3. 011 = Bank 3 so pin 9 goes low to ground, while pin 2 and 10 go high. It then checks the normal pins to see which ones are grounded to short. If CHI is pressed, the button connects pin 7 to pin 9. Since 9 is now low, so is 7, and the neo see's CHI.

Very big thanks for doing this!

SpamYouToDeath said:
Might just be simpler to say "button x connects pins y and z"
Which you can do with the list I just requoted. Everything in Bank 1 connects to pin 10, everything in Bank 2 connects to pin 2, everything in Bank 3 connects to pin 9. Start and Select connect pin 1 (common ground) to pin 11 (Start) and pin 3 (select)

The only thing I dont understand is why select is connected to pin 9. There doesnt seem to be a reason to do that.
 
Last edited:

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
I don't understand why those pins are linked either.

If you were to hit the select button, would the system receive charges on both 3 and 9, or would it only receive charge on 9 (path of least resistance)?

If it detects charge on both 3 and 9, then that's a way for the system to determine whether it is talking to a normal controller or to a mahjong controller.
 

toodles

Zero's Secretary
Joined
Jul 14, 2005
Posts
157
FalcomAdol said:
I don't understand why those pins are linked either.

If you were to hit the select button, would the system receive charges on both 3 and 9, or would it only receive charge on 9 (path of least resistance)?

If it detects charge on both 3 and 9, then that's a way for the system to determine whether it is talking to a normal controller or to a mahjong controller.
If you were to hit the select button, both 3 and 9 would be driven low and detected by the neo, but ONLY when select was pushed. If nothing was pushed, it would look no different to the neo than any other stick, or even NO stick, connected.

But you may be onto something with it using it to detect a mahjong controller. Whenever bank 3 was checked by the neo, pin 9 is low, so the select button (pin 3) would be low and appear pressed. I dont have any mah-jong games, so I cant do any kind of checking.

Is there anyway Raz could see if the select button is checked during bank 3 to detect the mahjong controller?
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
If the coins were wired to the mahjong control panel in a mahjong equipped cab, and the panel was connected to the 15 pin port, then MVS would always have "select" activated on coin, and it would just be a way for the MVS cart to know that it was plugged into the correct cab.

The home controller might just have that same path as a vestigial artifact of the MVS controller.

That's just me talking out of my ass though, since I've never even seen a mahjong cab.
 

Razoola

Divine Hand of the UniBIOS,
Staff member
20 Year Member
Joined
Nov 12, 2002
Posts
4,665
On MVS hardware the Mahjong controller is selected by turning on HardDIP 3.

Raz
 

FalcomAdol

Fio's Quartermaster
Joined
Feb 24, 2007
Posts
499
Well, there goes that idea.

It's possible that my vision is just crap. I'll get those pix tonight anyway.
 
Top