1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2003 Xodnizel
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 static uint32 MReal,MRet;
26 static uint8 FP_FASTAPASS(2) MJ_Read(int w, uint8 ret)
31 ret|=((MRet&0x80)>>6)&2;
39 static void FP_FASTAPASS(1) MJ_Write(uint8 v)
41 /* 1: I-D7, J-D6, K-D5, L-D4, M-D3, Big Red-D2
42 2: A-D7, B-D6, C-D5, D-D4, E-D3, F-D2, G-D1, H-D0
43 3: Sel-D6, Start-D7, D5, D4, D3, D2, D1
52 MRet=(MReal>>14)&0x7F;
53 //MRet=((MRet&0x1F) |((MRet&0x40)>>1)|((MRet&0x20)<<1)) <<1; //(MReal>>13)&0x7F;
66 static void FP_FASTAPASS(2) MJ_Update(void *data, int arg)
69 //printf("%08x\n",MReal>>13);
70 //HSVal=*(uint8*)data;
73 static INPUTCFC Mahjong={MJ_Read,MJ_Write,0,MJ_Update,0,0};
75 INPUTCFC *FCEU_InitMahjong(void)