Previous 199869 Revisions Next

r34637 Monday 26th January, 2015 at 18:56:34 UTC by Couriersud
If the return type is bool, use bool constants, not integers. (nw)
[src/emu/bus]bus.mak
[src/emu/bus/nes_ctrl]4score.c 4score.h arkpaddle.c arkpaddle.h bcbattle.c bcbattle.h ctrl.c ctrl.h fckeybrd.c fckeybrd.h ftrainer.c ftrainer.h hori.c hori.h joypad.c joypad.h konamihs.c konamihs.h miracle.c miracle.h mjpanel.c mjpanel.h pachinko.c pachinko.h partytap.c partytap.h powerpad.c powerpad.h suborkey.c suborkey.h zapper.c zapper.h
[src/mame]mame.lst mame.mak
[src/mame/drivers]btime.c cps1.c hikaru.c naomi.c silvmil.c
[src/mame/machine]315-5838_317-0229_comp.h naomibd.h naomicrypt.c* naomicrypt.h* naomim1.c naomim1.h ng_memcard.h
[src/mame/video]cps1.c
[src/mess]mess.lst mess.mak
[src/mess/drivers]banctec.c nes.c
[src/mess/includes]banctec.h nes.h
[src/mess/machine]nes.c

trunk/src/emu/bus/bus.mak
r243148r243149
10871087
10881088#-------------------------------------------------
10891089#
1090#@src/emu/bus/nes_ctrl/ctrl.h,BUSES += NES_CTRL
1091#-------------------------------------------------
1092
1093ifneq ($(filter NES_CTRL,$(BUSES)),)
1094OBJDIRS += $(BUSOBJ)/nes_ctrl
1095BUSOBJS += $(BUSOBJ)/nes_ctrl/ctrl.o
1096BUSOBJS += $(BUSOBJ)/nes_ctrl/joypad.o
1097BUSOBJS += $(BUSOBJ)/nes_ctrl/4score.o
1098BUSOBJS += $(BUSOBJ)/nes_ctrl/arkpaddle.o
1099BUSOBJS += $(BUSOBJ)/nes_ctrl/bcbattle.o
1100BUSOBJS += $(BUSOBJ)/nes_ctrl/ftrainer.o
1101BUSOBJS += $(BUSOBJ)/nes_ctrl/fckeybrd.o
1102BUSOBJS += $(BUSOBJ)/nes_ctrl/hori.o
1103BUSOBJS += $(BUSOBJ)/nes_ctrl/konamihs.o
1104BUSOBJS += $(BUSOBJ)/nes_ctrl/miracle.o
1105BUSOBJS += $(BUSOBJ)/nes_ctrl/mjpanel.o
1106BUSOBJS += $(BUSOBJ)/nes_ctrl/pachinko.o
1107BUSOBJS += $(BUSOBJ)/nes_ctrl/partytap.o
1108BUSOBJS += $(BUSOBJ)/nes_ctrl/powerpad.o
1109BUSOBJS += $(BUSOBJ)/nes_ctrl/suborkey.o
1110BUSOBJS += $(BUSOBJ)/nes_ctrl/zapper.o
1111endif
1112
1113#-------------------------------------------------
1114#
11151090#@src/emu/bus/snes/snes_slot.h,BUSES += SNES
11161091#-------------------------------------------------
11171092
trunk/src/mame/drivers/btime.c
r243148r243149
19351935
19361936ROM_START( discof )
19371937   ROM_REGION( 0x10000, "maincpu", 0 )
1938   ROM_LOAD( "w5-f.1a",     0xa000, 0x1000, CRC(9d53c71c) SHA1(53c410cfa4fbbfd08e1c3cf7aeba1c9627171a71) )
1939   ROM_LOAD( "w4-f.2a",     0xb000, 0x1000, CRC(c1f8d747) SHA1(33f5fe73d1851ef4da670075d1aec1550e0417ce) )
1940   ROM_LOAD( "w3-f.4a",     0xc000, 0x1000, CRC(9aadd252) SHA1(c6da7ef46333d525e676c59f03ccc908108b41ba) )
1941   ROM_LOAD( "w2-f.6a",     0xd000, 0x1000, CRC(f131a5bb) SHA1(84b7dea112dce12e5cb235a13f6dc4edcfb18c06) )
1942   ROM_LOAD( "w1-f.9a",     0xe000, 0x1000, CRC(a6ce9a19) SHA1(e8f380e17a21fb33504d6efe9d01d0f903fa25e1) )
1943//   ROM_LOAD( "w1-f",        0xe000, 0x1000, CRC(c8ec57c5) SHA1(904a9ed0a7f1230c611bf473b9bc52e63eb56dbe) ) // 0x7d3 is 0x10 instead of 0x00, 1 bit different, looks out of place, bad?
1944   ROM_LOAD( "w0-f.9a",     0xf000, 0x1000, CRC(b3787a92) SHA1(7f40621dc739c1108a5df43142ab04709a380219) )
1938   ROM_LOAD( "w5-f",     0xa000, 0x1000, CRC(9d53c71c) SHA1(53c410cfa4fbbfd08e1c3cf7aeba1c9627171a71) )
1939   ROM_LOAD( "w4-f",     0xb000, 0x1000, CRC(c1f8d747) SHA1(33f5fe73d1851ef4da670075d1aec1550e0417ce) )
1940   ROM_LOAD( "w3-f",     0xc000, 0x1000, CRC(9aadd252) SHA1(c6da7ef46333d525e676c59f03ccc908108b41ba) )
1941   ROM_LOAD( "w2-f",     0xd000, 0x1000, CRC(f131a5bb) SHA1(84b7dea112dce12e5cb235a13f6dc4edcfb18c06) )
1942   ROM_LOAD( "w1-f",     0xe000, 0x1000, CRC(c8ec57c5) SHA1(904a9ed0a7f1230c611bf473b9bc52e63eb56dbe) )
1943   ROM_LOAD( "w0-f",     0xf000, 0x1000, CRC(b3787a92) SHA1(7f40621dc739c1108a5df43142ab04709a380219) )
19451944
19461945   ROM_REGION( 0x10000, "audiocpu", 0 )
1947   ROM_LOAD( "w6-.1b",     0xf000, 0x1000, CRC(d81e781e) SHA1(bde510bfed06a13bd56bf7ddbf220e7cf82f79b6) )
1946   ROM_LOAD( "disco.w6",     0xf000, 0x1000, CRC(d81e781e) SHA1(bde510bfed06a13bd56bf7ddbf220e7cf82f79b6) )
19481947
1949   ROM_REGION( 0x0020, "proms", 0 ) // board uses 2 proms, not 1
1948   ROM_REGION( 0x0020, "proms", 0 )
19501949   ROM_LOAD( "disco.clr",    0x0000, 0x0020, CRC(a393f913) SHA1(42dce159283427064b3f5ce3a6e2189744ecd943) )
19511950ROM_END
19521951
trunk/src/mame/drivers/cps1.c
r243148r243149
92629262   ROM_LOAD( "s92_19.12c",  0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) )
92639263ROM_END
92649264
9265
92669265/* B-Board 89625B-1 */
92679266ROM_START( cworld2j )
92689267   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
r243148r243149
93179316   ROM_LOAD( "ioc1.ic1",     0x0000, 0x0117, CRC(0d182081) SHA1(475b3d417785da4bc512cce2b274bb00d4cc6792) )
93189317ROM_END
93199318
9320/* B-Board 90629B-3  - all roms have 90629B on the labels, no battery, possibly unofficial / desuicided with reproduction stickers */
9321ROM_START( cworld2ja )
9322   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
9323   ROM_LOAD16_WORD_SWAP("q5 - 34_90629b.8f", 0x00000, 0x80000, CRC(de54487f) SHA1(75b228a6c702c82d4d9a2a992933b5c3c420f6c2) )
9324   ROM_LOAD16_WORD_SWAP("q5 - 33_90629b.6f", 0x80000, 0x80000, CRC(93248458) SHA1(9dcdc6838f52efc9a0a6333fd0d734946db12dbd) )
9325   
9326   ROM_REGION( 0x200000, "gfx", 0 )
9327   ROMX_LOAD( "q5 - 06_90629b.8a",  0x000000, 0x80000, CRC(09d0e7ce) SHA1(ea502b975986222acce82ce8396348af72e1df72) , ROM_GROUPWORD | ROM_SKIP(6) )
9328   ROMX_LOAD( "q5 - 08_90629b.10a", 0x000002, 0x80000, CRC(22e4ce9a) SHA1(9e49aec8e1d6d15a68da63e69765b82fd53a9562) , ROM_GROUPWORD | ROM_SKIP(6) )
9329   ROMX_LOAD( "q5 - 05_90629b.7a",  0x000004, 0x80000, CRC(f7b3aed6) SHA1(bdfb4d5988307b07ad878ac9129954d14da8769b) , ROM_GROUPWORD | ROM_SKIP(6) )
9330   ROMX_LOAD( "q5 - 07_90629b.9a",  0x000006, 0x80000, CRC(520c6c88) SHA1(19ba8ca3d75aae71cdf471e6307e86a5df8a2851) , ROM_GROUPWORD | ROM_SKIP(6) )
9331
9332   ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
9333   ROM_LOAD( "q5 - 09_90629b.12a",  0x00000, 0x08000, CRC(e14dc524) SHA1(0020a9002572002458fbfe45e8a959cb90de3f03) )
9334   ROM_CONTINUE(           0x10000, 0x08000 )
9335
9336   ROM_REGION( 0x40000, "oki", 0 ) /* Samples */
9337   ROM_LOAD( "q5 - 18_90629b.11c",  0x00000, 0x20000, CRC(d10c1b68) SHA1(2423241f3340d8ab1b6bf9514ca8c3bba1273873) )
9338   ROM_LOAD( "q5 - 19_90629b.12c",  0x20000, 0x20000, CRC(7d17e496) SHA1(a274b94ec4f042dddc239ecb9ac2e1e2375f5eb2) )
9339
9340   ROM_REGION( 0x0200, "aboardplds", 0 )
9341   ROM_LOAD( "buf1",         0x0000, 0x0117, CRC(eb122de7) SHA1(b26b5bfe258e3e184f069719f9fd008d6b8f6b9b) )
9342   ROM_LOAD( "ioa1",         0x0000, 0x0117, CRC(59c7ee3b) SHA1(fbb887c5b4f5cb8df77cec710eaac2985bc482a6) )
9343   ROM_LOAD( "prg1",         0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) )
9344   ROM_LOAD( "rom1",         0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) )
9345   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
9346
9347   ROM_REGION( 0x0200, "bboardplds", 0 )
9348   ROM_LOAD( "q522b.1a",     0x0000, 0x0117, NO_DUMP )
9349   ROM_LOAD( "lwio.12e",     0x0000, 0x0117, CRC(ad52b90c) SHA1(f0fd6aeea515ee449320fe15684e6b3ab7f97bf4) )    /* seen the same pcb with IOB1.12E */
9350
9351   ROM_REGION( 0x0200, "cboardplds", 0 )
9352   ROM_LOAD( "ioc1.ic1",     0x0000, 0x0117, CRC(0d182081) SHA1(475b3d417785da4bc512cce2b274bb00d4cc6792) )
9353ROM_END
9354
93559319/* B-Board 89624B-3 */
93569320ROM_START( varth )
93579321   ROM_REGION( CODE_SIZE, "maincpu", 0 )      /* 68000 code */
r243148r243149
1171711681GAME( 1992, sf2koryu,    sf2ce,    cps1_12MHz, sf2hack,  cps_state,   sf2hack,  ROT0,   "bootleg", "Street Fighter II': Champion Edition (Xiang Long, Chinese bootleg)", GAME_SUPPORTS_SAVE )       // 811102 !!! - based on World version
1171811682GAME( 1992, sf2dongb,    sf2ce,    cps1_12MHz, sf2,      cps_state,   sf2dongb, ROT0,   "bootleg", "Street Fighter II': Champion Edition (Dongfang Bubai protection, bootleg)", GAME_SUPPORTS_SAVE ) // 920313 - based on World version
1171911683GAME( 1992, cworld2j,    0,        cps1_12MHz, cworld2j, cps_state,   cps1,     ROT0,   "Capcom", "Adventure Quiz Capcom World 2 (Japan 920611)", GAME_SUPPORTS_SAVE )
11720GAME( 1992, cworld2ja,   cworld2j, cps1_12MHz, cworld2j, cps_state,   cps1,     ROT0,   "Capcom", "Adventure Quiz Capcom World 2 (Japan 920611, B-Board 90629B-3, no battery)", GAME_SUPPORTS_SAVE )
1172111684GAME( 1992, varth,       0,        cps1_12MHz, varth,    cps_state,   cps1,     ROT270, "Capcom", "Varth: Operation Thunderstorm (World 920714)", GAME_SUPPORTS_SAVE )  // "ETC"    // 12MHz verified
1172211685GAME( 1992, varthr1,     varth,    cps1_12MHz, varth,    cps_state,   cps1,     ROT270, "Capcom", "Varth: Operation Thunderstorm (World 920612)", GAME_SUPPORTS_SAVE )  // "ETC"
1172311686GAME( 1992, varthu,      varth,    cps1_12MHz, varth,    cps_state,   cps1,     ROT270, "Capcom (Romstar license)", "Varth: Operation Thunderstorm (USA 920612)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/hikaru.c
r243148r243149
381381
382382#include "emu.h"
383383#include "cpu/sh4/sh4.h"
384#include "machine/naomicrypt.h"
384385
385386#define CPU_CLOCK (200000000)
386387                           /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
r243148r243149
739740
740741   // 317-0283-COM Actel A54SX32
741742   // ID 0x4252
742   ROM_PARAMETER( ":rom_board:key", "56dedf33" )
743   _NAOMI_M1_KEYFILE( "sgnascar-key.bin", CRC(f1452f9e) SHA1(86fb0f278a2eb0aba66a24032fb683f7a516b32b) )
743744ROM_END
744745
745746GAME( 2000, hikaru,   0,        hikaru,   hikaru, driver_device,   0, ROT0, "Sega",            "Hikaru Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
trunk/src/mame/drivers/naomi.c
r243148r243149
15091509#include "machine/jvs13551.h"
15101510#include "includes/dc.h"
15111511#include "includes/naomi.h"
1512#include "machine/naomicrypt.h"
15121513
15131514#define CPU_CLOCK (200000000)
15141515
r243148r243149
26532654 */
26542655
26552656static MACHINE_CONFIG_DERIVED( naomim1, naomi_base )
2656   MCFG_NAOMI_M1_BOARD_ADD("rom_board", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
2657   MCFG_NAOMI_M1_BOARD_ADD("rom_board", ":rom_key", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
26572658MACHINE_CONFIG_END
26582659
26592660/*
r243148r243149
40744075
40754076   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
40764077
4077   // 840-0039    2000
4078   ROM_PARAMETER( ":rom_board:key", "3f5c807f" )
4078   _NAOMI_M1_KEYFILE( "gram2000-key.bin", CRC(179314d9) SHA1(3dbbc04e9ff62800d08c4a239af3a83252a28dc0) )
40794079ROM_END
40804080
40814081ROM_START( tduno )
r243148r243149
41164116
41174117   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
41184118
4119   // 840-0022    2000
4120   ROM_PARAMETER( ":rom_board:key", "2f6f0f8d" )
4119   _NAOMI_M1_KEYFILE("tduno2.key", CRC(8e0f0f3b) SHA1(914d3db8746c806d559539cc0851169161d32c04) )
41214120ROM_END
41224121
41234122ROM_START( mtkob2 )
r243148r243149
41354134
41364135   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
41374136
4138   // 840-0150    2003
4139   ROM_PARAMETER( ":rom_board:key", "3892fb3a" )
4137   _NAOMI_M1_KEYFILE("mtkob2-key.bin", CRC(db088208) SHA1(14d65ad2555183a445abcd93907c85df4032b41d) )
41404138ROM_END
41414139
41424140ROM_START( mushi2k5 )
r243148r243149
45004498
45014499   ROM_COPY( "rom_board", 0x1200000, 0x400000, 0x400000 )
45024500
4503   // 841-0007-02 2000
4504   ROM_PARAMETER( ":rom_board:key", "7c6e8bc1" )
4501   _NAOMI_M1_KEYFILE( "mvsc2-key.bin", CRC(76f095b4) SHA1(773fd67e1eb471a989b3ee6e969a3d33bf61e779) )
45054502ROM_END
45064503
45074504/* toy fighter - 1999 sega */
r243148r243149
51055102
51065103   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
51075104
5108   // 840-0030    2000
5109   ROM_PARAMETER( ":rom_board:key", "96489bcd" )
5105   _NAOMI_M1_KEYFILE("qmegamis-key.bin", CRC(b08650c0) SHA1(9e6b0fac6fb05209da9e01bb1a5437949d218078) )
51105106ROM_END
51115107
51125108/*
r243148r243149
52375233
52385234   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
52395235
5240   // 840-0098    2002
5241   ROM_PARAMETER( ":rom_board:key", "a77cf3a0" )
5236   _NAOMI_M1_KEYFILE( "shootopl-key.bin", CRC(45547e02) SHA1(4f79f478ff1eea14bc939a67ff570143cb56a4bf) )
52425237ROM_END
52435238
52445239// Shootout Pool Prize
r243148r243149
52555250
52565251   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
52575252
5258   // 840-0128    2002
5259   ROM_PARAMETER( ":rom_board:key", "cde98d9d" )
5253   _NAOMI_M1_KEYFILE( "shootpl-key.bin", CRC(03c30b17) SHA1(e8e8659aa27b3d1cac2268850d3973d9afeaeba9) )
52605254ROM_END
52615255
52625256// Shootout Pool Prize Ver. B
r243148r243149
52735267
52745268   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
52755269
5276   // 840-0128    2002
5277   ROM_PARAMETER( ":rom_board:key", "cde98d9d" )
5270   _NAOMI_M1_KEYFILE( "shootpl-key.bin", CRC(03c30b17) SHA1(e8e8659aa27b3d1cac2268850d3973d9afeaeba9) )
52785271ROM_END
52795272
52805273/* Oinori-daimyoujin Matsuri (medal) */
r243148r243149
62566249
62576250   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
62586251
6259   // 840-0084    2001
6260   ROM_PARAMETER( ":rom_board:key", "43472d2d" )
6252   _NAOMI_M1_KEYFILE("vtenis2c-key.bin", CRC(b8c5b510) SHA1(f36d037a62a576e71211093e075f0ffa7e312c2d) )
62616253ROM_END
62626254
62636255ROM_START( kick4csh )
r243148r243149
62866278
62876279   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
62886280
6289   // 840-0140    2004
6290   ROM_PARAMETER( ":rom_board:key", "c9570882" )
6281   _NAOMI_M1_KEYFILE( "kick4csh-key.bin", CRC(889d2ea1) SHA1(daf7acf41b6bc607d443a93221a3e4554b99547f) )
62916282ROM_END
62926283
62936284ROM_START( wrungp )
r243148r243149
65966587   ROM_COPY( "rom_board", 0x01000000, 0x400000, 0xc00000 )
65976588
65986589   // M1 board, but it doesn't appear the protection is used
6599   ROM_PARAMETER( ":rom_board:key", "0" )
6590   _NAOMI_M1_KEYFILE_UNUSED
66006591
66016592   // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes
66026593   ROM_REGION(0x84, "some_eeprom", 0)
r243148r243149
79587949
79597950   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
79607951
7961   // 840-0106    2002
7962   ROM_PARAMETER( ":rom_board:key", "cdb05b1e" )
7952   _NAOMI_M1_KEYFILE( "vf4evoct-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111) )
79637953ROM_END
79647954
79657955ROM_START( hopper )
trunk/src/mame/drivers/silvmil.c
r243148r243149
2828public:
2929   silvmil_state(const machine_config &mconfig, device_type type, const char *tag)
3030      : driver_device(mconfig, type, tag),
31         m_maincpu(*this, "maincpu"),
32         m_gfxdecode(*this, "gfxdecode"),
33         m_sprgen(*this, "spritegen"),
3431         m_bg_videoram(*this, "bg_videoram"),
3532         m_fg_videoram(*this, "fg_videoram"),
36         m_spriteram(*this, "spriteram") { }
33         m_spriteram(*this, "spriteram"),
34         m_sprgen(*this, "spritegen"),
35         m_maincpu(*this, "maincpu"),
36         m_gfxdecode(*this, "gfxdecode") { }
3737
38
39   /* devices */
40   required_device<cpu_device> m_maincpu;
41   required_device<gfxdecode_device> m_gfxdecode;
42   required_device<decospr_device> m_sprgen;
43
4438   /* memory pointers */
4539   required_shared_ptr<UINT16> m_bg_videoram;
4640   required_shared_ptr<UINT16> m_fg_videoram;
4741   required_shared_ptr<UINT16> m_spriteram;
42   optional_device<decospr_device> m_sprgen;
4843
4944   /* video-related */
5045   tilemap_t   *m_bg_layer;
r243148r243149
119114   virtual void video_start();
120115   UINT32 screen_update_silvmil(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
121116   void tumblepb_gfx1_rearrange();
117   required_device<cpu_device> m_maincpu;
118   required_device<gfxdecode_device> m_gfxdecode;
122119};
123120
124121
r243148r243149
283280
284281void silvmil_state::machine_start()
285282{
286   save_item(NAME(m_silvmil_tilebank));
287   save_item(NAME(m_whichbank));
288283}
289284
290285void silvmil_state::machine_reset()
r243148r243149
432427   tumblepb_gfx1_rearrange();
433428}
434429
435GAME( 1995, silvmil, 0, silvmil, silvmil, silvmil_state, silvmil, ROT270, "Para", "Silver Millennium", GAME_SUPPORTS_SAVE )
430GAME( 1995, silvmil, 0, silvmil, silvmil, silvmil_state, silvmil, ROT270, "Para", "Silver Millennium", 0 )
trunk/src/mame/machine/315-5838_317-0229_comp.h
r243148r243149
5353
5454   // Doa
5555   int m_protstate;
56   int m_protpos;
5657   int m_prot_a;
5758   UINT8 m_protram[256];
5859};
trunk/src/mame/machine/naomibd.h
r243148r243149
22#define _NAOMIBD_H_
33
44#include "machine/naomig1.h"
5#include "machine/naomicrypt.h"
56
67#define MCFG_NAOMI_BOARD_ADD(_tag, type, _eeprom_tag, _actel_tag, _irq_cb)    \
78   MCFG_NAOMI_G1_ADD(_tag, type, _irq_cb)                        \
trunk/src/mame/machine/naomicrypt.c
r0r243149
1
2/* Sega 'M1' type encryption ( using an Actel A54SX32 )
3
4 see naomim1.c for Naomi hokup details
5
6 The keys here are totally arbitrary and have nothing to do with the real keys.
7
8 used by
9 Naomi
10 Hikaru
11
12
13
14 */
15
16
17#include "emu.h"
18#include "naomicrypt.h"
19
20struct game_keys
21{
22   const char *name;             /* game driver name */
23   const UINT32 key;
24
25};
26
27static const struct game_keys keys_table[] =
28{
29   // name             key              gameid #         year
30// M1
31   { "tduno2",          0x2f6f0f8d }, // 840-0022    2000
32   { "qmegamis",        0x96489bcd }, // 840-0030    2000
33   { "gram2000",        0x3f5c807f }, // 840-0039    2000
34   { "vtenis2c",        0x43472d2d }, // 840-0084    2001
35   { "shootopl",        0xa77cf3a0 }, // 840-0098    2002
36   { "vf4evoct",        0xcdb05b1e }, // 840-0106    2002
37   { "shootpl",         0xcde98d9d }, // 840-0128    2002
38   { "shootplm",        0xcde98d9d }, // 840-0136    2002
39   { "kick4csh",        0xc9570882 }, // 840-0140    2004
40   { "mtkob2",          0x3892fb3a }, // 840-0150    2003
41   { "mvsc2",           0x7c6e8bc1 }, // 841-0007-02 2000
42//   sgnascar  (Hikaru)
43   { NULL, 0 }    // end of table
44};
45
46
47UINT32 get_naomi_key(running_machine &machine)
48{
49   const char *gamename = machine.system().name;
50   const struct game_keys *k = &keys_table[0];
51
52   while (k->name)
53   {
54      if (strcmp(k->name, gamename) == 0)
55      {
56         // we have a proper key so return it
57         return k->key;
58      }
59      ++k;
60   }
61
62   printf("get_naomi_key : KEY NOT FOUND\n");
63
64   return 0;
65}
trunk/src/mame/machine/naomicrypt.h
r0r243149
1/* naomicrypt.h */
2
3// use internal M1 key tables, or external files (0 = external files)
4#define USE_NAOMICRYPT 0
5
6UINT32 get_naomi_key(running_machine &machine);
7
8#define _NAOMI_M1_KEYFILE(name,hash) \
9   ROM_REGION( 4, "rom_key", 0 ) \
10   ROM_LOAD( name, 0, 4, hash )
11
12
13#define _NAOMI_M1_KEYFILE_UNUSED \
14   ROM_REGION( 4, "rom_key", ROMREGION_ERASE00 ) \
15
trunk/src/mame/machine/naomim1.c
r243148r243149
1313naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1414   : naomi_board(mconfig, NAOMI_M1_BOARD, "Sega NAOMI M1 Board", tag, owner, clock, "naomi_m1_board", __FILE__)
1515{
16   key_tag = 0;
1617}
1718
19void naomi_m1_board::static_set_tags(device_t &device, const char *_key_tag)
20{
21   naomi_m1_board &dev = downcast<naomi_m1_board &>(device);
22   dev.key_tag = _key_tag;
23}
24
1825READ16_MEMBER(naomi_m1_board::actel_id_r)
1926{
2027   if (rombdid_tag && memregion(rombdid_tag) != NULL)
r243148r243149
3037{
3138   naomi_board::device_start();
3239
33   astring skey = parameter("key");
34   if(skey)
35      key = strtoll(skey.cstr(), 0, 16);
36   else
37   {
38      logerror("%s: Warning: key not provided\n", tag());
39      key = 0;
40   }
41
40#if USE_NAOMICRYPT
41   key = get_naomi_key(machine());
42#else
43   const UINT8 *key_data = memregion(key_tag)->base();
44   key = (key_data[0] << 24) | (key_data[1] << 16) | (key_data[2] << 8) | key_data[3];
45#endif
4246   buffer = auto_alloc_array(machine(), UINT8, BUFFER_SIZE);
4347
4448   save_pointer(NAME(buffer), BUFFER_SIZE);
trunk/src/mame/machine/naomim1.h
r243148r243149
33
44#include "naomibd.h"
55
6#define MCFG_NAOMI_M1_BOARD_ADD(_tag, _eeprom_tag, _actel_tag, _irq_cb) \
7   MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M1_BOARD, _eeprom_tag, _actel_tag, _irq_cb)
6#define MCFG_NAOMI_M1_BOARD_ADD(_tag, _key_tag, _eeprom_tag, _actel_tag, _irq_cb) \
7   MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M1_BOARD, _eeprom_tag, _actel_tag, _irq_cb) \
8   naomi_m1_board::static_set_tags(*device, _key_tag);
89
910class naomi_m1_board : public naomi_board
1011{
1112public:
1213   naomi_m1_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
1314
15   static void static_set_tags(device_t &device, const char *_key_tag);
16
1417   virtual DECLARE_ADDRESS_MAP(submap, 16);
1518
1619   DECLARE_READ16_MEMBER(actel_id_r);
r243148r243149
2528
2629private:
2730   enum { BUFFER_SIZE = 32768 };
31
32   const char *key_tag;
2833   UINT32 key;
2934
3035   UINT8 *buffer;
trunk/src/mame/machine/ng_memcard.h
r243148r243149
3636
3737   virtual iodevice_t image_type() const { return IO_MEMCARD; }
3838
39   virtual bool is_readable()  const { return 1; }
40   virtual bool is_writeable() const { return 1; }
41   virtual bool is_creatable() const { return 1; }
42   virtual bool must_be_loaded() const { return 0; }
43   virtual bool is_reset_on_load() const { return 0; }
39   virtual bool is_readable()  const { return true; }
40   virtual bool is_writeable() const { return true; }
41   virtual bool is_creatable() const { return true; }
42   virtual bool must_be_loaded() const { return false; }
43   virtual bool is_reset_on_load() const { return false; }
4444   virtual const char *file_extensions() const { return "neo"; }
4545   virtual const option_guide *create_option_guide() const { return NULL; }
4646
trunk/src/mame/mame.lst
r243148r243149
32313231sf2mdtb         // bootleg
32323232sf2b            // bootleg
32333233cworld2j        // 11/06/1992 (c) 1992 (Japan)
3234cworld2ja       // 11/06/1992 (c) 1992 (Japan)
32353234varth           // 14/07/1992 (c) 1992 (World)
32363235varthr1         // 12/06/1992 (c) 1992 (World)
32373236varthu          // 12/06/1992 (c) 1992 (USA)
trunk/src/mame/mame.mak
r243148r243149
17211721   $(DRIVERS)/monacogp.o \
17221722   $(DRIVERS)/naomi.o $(MACHINE)/dc.o $(VIDEO)/powervr2.o $(MACHINE)/naomi.o \
17231723   $(MACHINE)/naomig1.o $(MACHINE)/naomibd.o $(MACHINE)/naomirom.o $(MACHINE)/naomigd.o \
1724   $(MACHINE)/naomim1.o $(MACHINE)/naomim2.o $(MACHINE)/naomim4.o \
1724   $(MACHINE)/naomicrypt.o $(MACHINE)/naomim1.o $(MACHINE)/naomim2.o $(MACHINE)/naomim4.o \
17251725   $(MACHINE)/315-5881_crypt.o \
17261726   $(MACHINE)/awboard.o \
17271727   $(MACHINE)/mie.o $(MACHINE)/maple-dc.o $(MACHINE)/mapledev.o $(MACHINE)/dc-ctrl.o $(MACHINE)/jvs13551.o \
trunk/src/mame/video/cps1.c
r243148r243149
15311531   {"varthu",      CPS_B_04,     mapper_VA63B },   /* CPSB test has been patched out (60=0008) register is also written to, possibly leftover from development */
15321532   {"varthj",      CPS_B_21_BT5, mapper_VA22B },   /* CPSB test has been patched out (72=0001) register is also written to, possibly leftover from development */
15331533   {"cworld2j",    CPS_B_21_BT6, mapper_Q522B,  0x36, 0, 0x34 },   /* (ports 36, 34 probably leftover input code from another game) */
1534   {"cworld2ja",   CPS_B_21_DEF, mapper_Q522B }, // patched set, no battery, could be desuicided
15351534   {"wof",         CPS_B_21_QS1, mapper_TK263B },
15361535   {"wofr1",       CPS_B_21_DEF, mapper_TK263B },  // patched set coming from a desuicided board?
15371536   {"wofa",        CPS_B_21_DEF, mapper_TK263B },  // patched set coming from a desuicided board?
trunk/src/mess/drivers/banctec.c
r243148r243149
1// license:MAME|GPL2+
2// copyright-holders:Felipe Sanches
3/***************************************************************************
4  This driver covers only the Operator Panel of the BancTec 91690 Document Processor equipment
5
6  Author: Felipe Sanches <juca@members.fsf.org>
7
8  Maintainence Manual: <https://garoa.net.br/w/images/PAINEL_BANCTEC_91690.PDF>
9*/
10
11#include "emu.h"
12#include "cpu/mcs51/mcs51.h"
13#include "cpu/m6805/m6805.h"
14#include "includes/banctec.h"
15#include "video/mc6845.h"
16
17static ADDRESS_MAP_START( banctec_mem , AS_PROGRAM, 8, banctec_state )
18   AM_RANGE(0x0000, 0x07ff) AM_ROM
19   AM_RANGE(0x0800, 0xffff) AM_RAM /* Probably wrong. Must be verified on pcb! */
20ADDRESS_MAP_END
21
22static ADDRESS_MAP_START( banctec_mcu_mem , AS_PROGRAM, 8, banctec_state )
23   AM_RANGE(0x0000, 0x1fff) AM_ROM
24   AM_RANGE(0x2000, 0x7fff) AM_RAM /* Probably wrong. Must be verified on pcb! */
25   AM_RANGE(0x8000, 0xffff) AM_RAM AM_SHARE("videoram") /* Probably wrong. Must be verified on pcb! */
26ADDRESS_MAP_END
27
28void banctec_state::machine_reset()
29{
30}
31
32
33/****************************
34* Video/Character functions *
35****************************/
36
37TILE_GET_INFO_MEMBER(banctec_state::get_bg_tile_info)
38{
39   UINT8 *videoram = m_videoram;
40   int code = videoram[tile_index];
41   int color = 1;
42
43   SET_TILE_INFO_MEMBER(0, code, color, 0);
44}
45
46void banctec_state::video_start()
47{
48   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(banctec_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 40, 25);
49}
50
51UINT32 banctec_state::screen_update_banctec(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
52{
53   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
54
55   return 0;
56}
57
58/* ROCKWELL 6545 - Transparent Memory Addressing */
59
60MC6845_ON_UPDATE_ADDR_CHANGED(banctec_state::crtc_addr)
61{
62  /* What is this function meant to do ? */
63}
64
65/******************************
66* Graphics Decode Information *
67******************************/
68
69const gfx_layout banctec_gfx_layout =
70{
71   8, 8,               /* 8x8 characters */
72   256,                /* 256 characters */
73   1,                  /* 1 bits per pixel */
74   {0},                /* no bitplanes; 1 bit per pixel */
75   {0, 1, 2, 3, 4, 5, 6, 7},
76   {0 * 256*8, 1 * 256*8, 2 * 256*8, 3 * 256*8, 4 * 256*8, 5 * 256*8, 6 * 256*8, 7 * 256*8},
77   8                 /* size of one char */
78};
79
80static GFXDECODE_START( banctec )
81         GFXDECODE_ENTRY( "gfx", 0x00000, banctec_gfx_layout, 0, 2 )
82GFXDECODE_END
83
84static MACHINE_CONFIG_START( banctec, banctec_state )
85   /* basic machine hardware */
86
87   MCFG_CPU_ADD("maincpu", I80C31, XTAL_11_0592MHz)
88   MCFG_CPU_PROGRAM_MAP(banctec_mem)
89
90   MCFG_CPU_ADD("mcu", M6805, 4000000)     /* Actual MCU is a Motorola 6803 and the clock frequency is still unknown */
91   MCFG_CPU_PROGRAM_MAP(banctec_mcu_mem)
92
93// The video signal is generated by a R6545EAP character generator chip
94// The U20 EPROM holds the image data for the character set.
95
96   // video hardware
97   MCFG_SCREEN_ADD("screen", RASTER)
98   MCFG_SCREEN_REFRESH_RATE(60)
99   MCFG_SCREEN_SIZE((52+1)*8, (31+1)*8)
100   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 25*8-1)
101   MCFG_SCREEN_UPDATE_DRIVER(banctec_state, screen_update_banctec)
102   MCFG_SCREEN_PALETTE("palette")
103
104   MCFG_GFXDECODE_ADD("gfxdecode", "palette", banctec)
105   MCFG_PALETTE_ADD("palette", 2)
106//   MCFG_PALETTE_INIT_OWNER(banctec_state, banctec)
107
108   MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_20MHz) /* (?) */
109   MCFG_MC6845_SHOW_BORDER_AREA(false)
110   MCFG_MC6845_CHAR_WIDTH(8)
111   MCFG_MC6845_ADDR_CHANGED_CB(banctec_state, crtc_addr)
112
113MACHINE_CONFIG_END
114
115ROM_START(banctec)
116   ROM_REGION(0x800,"maincpu",0)
117   ROM_LOAD("banctec_eseries_panel_opnl.u20", 0x000, 0x800, CRC(c2ab9c06) SHA1(a296589034f656790ad5ffbce028dd846a40cf03))
118
119   ROM_REGION(0x2000,"mcu",0)
120   ROM_LOAD("banctec_eseries_panel.u8", 0x0000, 0x2000, CRC(f3335e0a) SHA1(5ca45fdcb7ef45a65c28c79abfa9ebb7a8a06619))
121
122   ROM_REGION(0x1000,"gfx",0)
123   ROM_LOAD("banctec_eseries_panel.u20", 0x0000, 0x1000, CRC(5b6ecec9) SHA1(35aff8f965bce77205e3a43d71e39097585091a7))
124ROM_END
125
126/***************************************************************************
127
128  Game driver(s)
129
130***************************************************************************/
131
132/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT     INIT    MONITOR COMPANY   FULLNAME */
133CONS( 1989, banctec, 0,        0,      banctec, 0, driver_device, 0,       "DALE Electronics",  "BancTec ESeries Panel", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/drivers/nes.c
r243148r243149
4848   // 0x8000-0xffff -> HIGH HANDLER defined on a pcb base
4949ADDRESS_MAP_END
5050
51
52static INPUT_PORTS_START( nes_pads12 )
53   PORT_START("PAD1")
54   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 A") PORT_PLAYER(1)  PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
55   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 B") PORT_PLAYER(1)  PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
56   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)                     PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
57   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)                      PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
58   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)                PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
59   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)              PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
60   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)              PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
61   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
62
63   PORT_START("PAD2")
64   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 A") PORT_PLAYER(2)  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
65   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 B") PORT_PLAYER(2)  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
66   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2)                     PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
67   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2)                      PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
68   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)                PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
69   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)              PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
70   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)              PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
71   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
72INPUT_PORTS_END
73
74static INPUT_PORTS_START( nes_pads34 )
75   PORT_START("PAD3")
76   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 A") PORT_PLAYER(3)  PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
77   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 B") PORT_PLAYER(3)  PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
78   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(3)                     PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
79   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(3)                      PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
80   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3)                PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
81   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)              PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
82   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)              PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
83   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)             PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
84
85   PORT_START("PAD4")
86   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 A") PORT_PLAYER(4)  PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
87   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 B") PORT_PLAYER(4)  PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
88   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(4)                     PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
89   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(4)                      PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
90   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4)                PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
91   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)              PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
92   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)              PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
93   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)             PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
94INPUT_PORTS_END
95
96
97static INPUT_PORTS_START( nes_powerpad )
98// difference between the two sides is that we mirror the key mapping to match the real pad layout!
99   PORT_START("POWERPAD1")
100// side A layout
101   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Top1")  PORT_CODE(KEYCODE_Y) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
102   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )                                                  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
103   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Mid1")  PORT_CODE(KEYCODE_J) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
104   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )                                                  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
105   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Mid2")  PORT_CODE(KEYCODE_H) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
106   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Low1")  PORT_CODE(KEYCODE_N) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
107   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Low2")  PORT_CODE(KEYCODE_B) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
108   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Mid3")  PORT_CODE(KEYCODE_G) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
109// side B layout
110   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 2")     PORT_CODE(KEYCODE_T) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
111   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 1")     PORT_CODE(KEYCODE_R) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
112   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 5")     PORT_CODE(KEYCODE_F) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
113   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 9")     PORT_CODE(KEYCODE_V) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
114   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 6")     PORT_CODE(KEYCODE_G) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
115   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 10")    PORT_CODE(KEYCODE_B) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
116   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 11")    PORT_CODE(KEYCODE_N) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
117   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 7")     PORT_CODE(KEYCODE_H) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
118   PORT_START("POWERPAD2")
119// side A layout
120   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )                                                  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
121   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Top2")  PORT_CODE(KEYCODE_T) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
122   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )                                                  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
123   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad Mid4")  PORT_CODE(KEYCODE_F) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
124   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )                                                  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0050)
125// side B layout
126   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 4")     PORT_CODE(KEYCODE_U) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
127   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 3")     PORT_CODE(KEYCODE_Y) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
128   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 12")    PORT_CODE(KEYCODE_M) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
129   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PowerPad 8")     PORT_CODE(KEYCODE_J) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
130   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )                                                  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0060)
131INPUT_PORTS_END
132
133static INPUT_PORTS_START( nes_zapper1 )
134   PORT_START("ZAPPER1_X")
135   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
136   PORT_START("ZAPPER1_Y")
137   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
138   PORT_START("ZAPPER1_T")
139   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P1 Lightgun Trigger") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
140INPUT_PORTS_END
141
142static INPUT_PORTS_START( nes_zapper2 )
143   PORT_START("ZAPPER2_X")
144   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
145   PORT_START("ZAPPER2_Y")
146   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
147   PORT_START("ZAPPER2_T")
148   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("P2 Lightgun Trigger") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
149INPUT_PORTS_END
150
151static INPUT_PORTS_START( nes_paddle )
152   PORT_START("PADDLE")
153   PORT_BIT( 0xff, 0x7f, IPT_PADDLE) PORT_SENSITIVITY(25) PORT_KEYDELTA(25) PORT_CENTERDELTA(0) PORT_MINMAX(0x62,0xf2) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0040)
154   PORT_START("PADDLE_BUTTON")
155   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Paddle button") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0040)
156INPUT_PORTS_END
157
51158static INPUT_PORTS_START( nes )
52   // input devices go through slot options
159   PORT_INCLUDE( nes_pads12 )
160   PORT_INCLUDE( nes_pads34 )
161   PORT_INCLUDE( nes_powerpad )
162   PORT_INCLUDE( nes_zapper1 )
163   PORT_INCLUDE( nes_zapper2 )
164   PORT_INCLUDE( nes_paddle )
165
166   PORT_START("CTRLSEL")
167   PORT_CONFNAME( 0x000f, 0x0001, "P1 Controller")
168   PORT_CONFSETTING(  0x0000, "Unconnected" )
169   PORT_CONFSETTING(  0x0001, "Gamepad" )
170   PORT_CONFSETTING(  0x0002, "Zapper" )
171   PORT_CONFNAME( 0x00f0, 0x0010, "P2 Controller")
172   PORT_CONFSETTING(  0x0000, "Unconnected" )
173   PORT_CONFSETTING(  0x0010, "Gamepad" )
174   PORT_CONFSETTING(  0x0020, "Zapper" )
175   PORT_CONFSETTING(  0x0040, "Arkanoid paddle" )
176   PORT_CONFSETTING(  0x0050, "Power Pad (Side A layout)" )
177   PORT_CONFSETTING(  0x0060, "Power Pad (Side B layout)" )
178   PORT_CONFNAME( 0x0f00, 0x0000, "P3 Controller")
179   PORT_CONFSETTING(  0x0000, "Unconnected" )
180   PORT_CONFSETTING(  0x0100, "Gamepad" )
181   PORT_CONFNAME( 0xf000, 0x0000, "P4 Controller")
182   PORT_CONFSETTING(  0x0000, "Unconnected" )
183   PORT_CONFSETTING(  0x1000, "Gamepad" )
184
53185   PORT_START("CONFIG")
54186   PORT_CONFNAME( 0x01, 0x00, "Draw Top/Bottom 8 Lines")
55187   PORT_CONFSETTING(    0x01, DEF_STR(No) )
r243148r243149
59191   PORT_CONFSETTING(    0x00, DEF_STR(Yes) )
60192INPUT_PORTS_END
61193
194
195static INPUT_PORTS_START( fc_pads12 )
196   PORT_START("PAD1")
197   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 A") PORT_PLAYER(1)  PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
198   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 B") PORT_PLAYER(1)  PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
199   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)                     PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
200   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)                      PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
201   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)                PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
202   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)              PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
203   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)              PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
204   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0001)
205
206   PORT_START("PAD2")
207   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 A") PORT_PLAYER(2)  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
208   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 B") PORT_PLAYER(2)  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
209   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2)                     PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
210   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2)                      PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
211   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)                PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
212   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)              PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
213   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)              PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
214   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0010)
215   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 A") PORT_PLAYER(2)  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
216   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P2 B") PORT_PLAYER(2)  PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
217   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Microphone") PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
218   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )                                    PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
219   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)                PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
220   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)              PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
221   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)              PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
222   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x00f0)
223INPUT_PORTS_END
224
225static INPUT_PORTS_START( fc_pads34 )
226   PORT_START("PAD3")
227   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P3 A") PORT_PLAYER(3)  PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
228   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P3 B") PORT_PLAYER(3)  PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
229   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(3)                     PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
230   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(3)                      PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
231   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3)                PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
232   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)              PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
233   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)              PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
234   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)             PORT_CONDITION("CTRLSEL", 0x0f00, EQUALS, 0x0100)
235
236   PORT_START("PAD4")
237   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P4 A") PORT_PLAYER(4)  PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
238   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P4 B") PORT_PLAYER(4)  PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
239   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(4)                     PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
240   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(4)                      PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
241   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4)                PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
242   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)              PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
243   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)              PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
244   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)             PORT_CONDITION("CTRLSEL", 0xf000, EQUALS, 0x1000)
245INPUT_PORTS_END
246
247static INPUT_PORTS_START( fc_lightgun )
248   PORT_START("ZAPPER2_X")
249   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x01)
250   PORT_START("ZAPPER2_Y")
251   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x01)
252   PORT_START("ZAPPER2_T")
253   PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Lightgun Trigger") PORT_PLAYER(2) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x01)
254INPUT_PORTS_END
255
256static INPUT_PORTS_START( fc_paddle )
257   PORT_START("PADDLE")
258   PORT_BIT( 0xff, 0x7f, IPT_PADDLE) PORT_SENSITIVITY(25) PORT_KEYDELTA(25) PORT_CENTERDELTA(0) PORT_MINMAX(0x62,0xf2) PORT_PLAYER(2) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x04)
259   PORT_START("PADDLE_BUTTON")
260   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Paddle button") PORT_PLAYER(2) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x04)
261INPUT_PORTS_END
262
263static INPUT_PORTS_START( fc_cclimb )
264   PORT_START("CC_LEFT")
265   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
266   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
267   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
268   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)              PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
269   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_PLAYER(1)    PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
270   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1)  PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
271   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_PLAYER(1)  PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
272   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, EQUALS, 0x0002)
273
274   PORT_START("CC_RIGHT")
275   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
276   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
277   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
278   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)             PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
279   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_PLAYER(1)   PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
280   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
281   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
282   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_PLAYER(1)PORT_CONDITION("CTRLSEL", 0x00f0, EQUALS, 0x0020)
283INPUT_PORTS_END
284
285static INPUT_PORTS_START( fc_keyboard )
286   PORT_START("FCKEY0")
287   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
288   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)           PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
289   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE)    PORT_CHAR('[')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
290   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']')      PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
291   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana")                                PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
292   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT)                        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
293   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2)    PORT_CHAR('\\') PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
294   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE)   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
295
296   PORT_START("FCKEY1")
297   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
298   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
299   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')      PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
300   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';')      PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
301   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_')                               PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
302   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/')                               PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
303   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')      PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
304   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS)    PORT_CHAR('^')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
305
306   PORT_START("FCKEY2")
307   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
308   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
309   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
310   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
311   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP)  PORT_CHAR('.')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
312   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
313   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
314   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
315
316   PORT_START("FCKEY3")
317   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
318   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
319   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
320   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
321   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
322   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
323   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
324   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
325
326   PORT_START("FCKEY4")
327   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
328   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
329   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
330   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
331   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
332   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
333   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
334   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
335
336   PORT_START("FCKEY5")
337   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
338   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
339   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
340   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
341   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
342   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
343   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
344   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
345
346   PORT_START("FCKEY6")
347   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
348   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
349   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
350   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
351   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
352   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
353   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
354   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
355
356   PORT_START("FCKEY7")
357   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))           PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
358   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC))         PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
359   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')                          PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
360   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL)      PORT_CHAR(UCHAR_SHIFT_2)    PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
361   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT)        PORT_CHAR(UCHAR_SHIFT_1)    PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
362   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT)        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
363   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')              PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
364   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2')              PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
365
366   PORT_START("FCKEY8")
367   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr")                                 PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
368   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP)    PORT_CHAR(UCHAR_MAMEKEY(UP))        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
369   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))     PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
370   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
371   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
372   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE)     PORT_CHAR(' ')      PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
373   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)          PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
374   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x02)
375
376INPUT_PORTS_END
377
378static INPUT_PORTS_START( subor_keyboard )
379   PORT_START("SUBKEY0")
380   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
381   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
382   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
383   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
384   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
385   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
386   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
387   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
388
389   PORT_START("SUBKEY1")
390   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
391   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
392   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
393   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
394   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
395   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
396   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
397   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
398
399   PORT_START("SUBKEY2")
400   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
401   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)                PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
402   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT")                                            PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
403   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
404   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
405   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR")                                       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
406   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
407   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
408
409   PORT_START("SUBKEY3")
410   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
411   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
412   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
413   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')          PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
414   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
415   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
416   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
417   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP)  PORT_CHAR('.')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
418
419   PORT_START("SUBKEY4")
420   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE)    PORT_CHAR(']')          PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
421   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)               PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
422   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
423   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
424   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))       PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
425   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')          PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
426   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')         PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
427   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
428
429   PORT_START("SUBKEY5")
430   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
431   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
432   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
433   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB)   PORT_CHAR('\t') PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
434   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))         PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
435   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
436   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
437   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL)      PORT_CHAR(UCHAR_SHIFT_2)        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
438
439   PORT_START("SUBKEY6")
440   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
441   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
442   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
443   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
444   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
445   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
446   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
447   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
448
449   PORT_START("SUBKEY7")
450   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
451   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
452   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
453   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
454   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
455   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P)     PORT_CHAR('P')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
456   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS)    PORT_CHAR('=')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
457   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT)    PORT_CHAR(UCHAR_SHIFT_1)    PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
458
459   PORT_START("SUBKEY8")
460   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
461   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
462   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
463   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
464   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
465   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
466   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
467   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
468
469   PORT_START("SUBKEY9")
470   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
471
472   PORT_START("SUBKEY10")
473   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU")   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
474   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
475   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
476   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11)       PORT_CHAR(UCHAR_MAMEKEY(F11))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
477   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12)       PORT_CHAR(UCHAR_MAMEKEY(F12))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
478   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
479   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
480   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
481
482   PORT_START("SUBKEY11")
483   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD)PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
484   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD)  PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
485   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK)  PORT_CHAR(UCHAR_MAMEKEY(ASTERISK))  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
486   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))     PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
487   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))         PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
488   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))     PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
489   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD)PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD))  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
490   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK)   PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))   PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
491
492   PORT_START("SUBKEY12")
493   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')                  PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
494   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
495   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE")                                           PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
496   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2")                                          PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
497   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))           PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
498   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
499   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)         PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
500   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x03)
501
502INPUT_PORTS_END
503
504static INPUT_PORTS_START( mahjong_panel )
505   PORT_START("MAH0")
506   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
507
508   PORT_START("MAH1")
509   PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
510   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_N ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
511   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_M ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
512   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_L ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
513   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_K ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
514   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_J ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
515   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_I ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
516
517   PORT_START("MAH2")
518   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_H ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
519   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_G ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
520   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_F ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
521   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_E ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
522   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_D ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
523   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_C ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
524   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_B ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
525   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_A ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
526
527   PORT_START("MAH3")
528   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
529   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_RON ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
530   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_REACH ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
531   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_CHI ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
532   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_PON ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
533   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_KAN ) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
534   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("P1 Mahjong Select") PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
535   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Mahjong Start") PORT_CONDITION("EXP", 0x0f, EQUALS, 0x07)
536INPUT_PORTS_END
537
538// these are read differently than the powerpad inputs, but we share the tags, to reduce
539static INPUT_PORTS_START( fc_ftrainer )
540// difference between the two sides is that we mirror the key mapping to match the real pad layout!
541   PORT_START("FT_COL0")
542// side A layout
543   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )                                                        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
544   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Mid1")  PORT_CODE(KEYCODE_J) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
545   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )                                                        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
546// side B layout
547   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 12")    PORT_CODE(KEYCODE_M) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
548   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 8")     PORT_CODE(KEYCODE_J) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
549   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 4")     PORT_CODE(KEYCODE_U) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
550
551   PORT_START("FT_COL1")
552// side A layout
553   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Low1")  PORT_CODE(KEYCODE_N) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
554   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Mid2")  PORT_CODE(KEYCODE_H) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
555   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Top1")  PORT_CODE(KEYCODE_Y) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
556// side B layout
557   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 11")    PORT_CODE(KEYCODE_N) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
558   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 7")     PORT_CODE(KEYCODE_H) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
559   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 3")     PORT_CODE(KEYCODE_Y) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
560
561   PORT_START("FT_COL2")
562// side A layout
563   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Low2")  PORT_CODE(KEYCODE_B) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
564   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Mid3")  PORT_CODE(KEYCODE_G) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
565   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Top2")  PORT_CODE(KEYCODE_T) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
566// side B layout
567   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 10")    PORT_CODE(KEYCODE_B) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
568   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 6")     PORT_CODE(KEYCODE_G) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
569   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 2")     PORT_CODE(KEYCODE_T) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
570
571   PORT_START("FT_COL3")
572// side A layout
573   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )                                                        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
574   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer Mid4")  PORT_CODE(KEYCODE_F) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
575   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )                                                        PORT_CONDITION("EXP", 0x0f, EQUALS, 0x05)
576// side B layout
577   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 9")     PORT_CODE(KEYCODE_V) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
578   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 5")     PORT_CODE(KEYCODE_F) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
579   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Family Trainer 1")     PORT_CODE(KEYCODE_R) PORT_CONDITION("EXP", 0x0f, EQUALS, 0x06)
580INPUT_PORTS_END
581
582
583
62584static INPUT_PORTS_START( famicom )
63   // input devices go through slot options
585   PORT_INCLUDE( fc_pads12 )
586   PORT_INCLUDE( fc_pads34 )
587   PORT_INCLUDE( fc_lightgun )
588   // FIXME: was it possible to attache two paddles in a Famicom (as the Arkanoid 2 box suggests)?!? investigate...
589   PORT_INCLUDE( fc_paddle )
590   // Crazy Climber is not really a separate controller, but a couple of small sticks to be
591   // put on top of d-pads of the regular controllers. Users should then control the game
592   // by using both controllers, turned 90 degrees, as a couple of dual sticks as in the arcade
593   PORT_INCLUDE( fc_cclimb )
594   PORT_INCLUDE( fc_keyboard )
595   PORT_INCLUDE( subor_keyboard )
596   PORT_INCLUDE( mahjong_panel )
597   PORT_INCLUDE( fc_ftrainer )
598
599   PORT_START("CTRLSEL")
600   PORT_CONFNAME( 0x000f, 0x0001, "P1 Controller")
601   PORT_CONFSETTING(  0x0000, "Unconnected" )
602   PORT_CONFSETTING(  0x0001, "Gamepad" )
603   PORT_CONFSETTING(  0x0002, "Crazy Climber pad (Left)" )
604   PORT_CONFNAME( 0x00f0, 0x0010, "P2 Controller")
605   PORT_CONFSETTING(  0x0000, "Unconnected" )
606   PORT_CONFSETTING(  0x0010, "Gamepad" )
607   PORT_CONFSETTING(  0x0020, "Crazy Climber pad (Right)" )
608   PORT_CONFSETTING(  0x00f0, "Gamepad (Older Version)" )
609   PORT_CONFNAME( 0x0f00, 0x0000, "P3 Controller") PORT_CONDITION("EXP", 0x0f, EQUALS, 0x08)
610   PORT_CONFSETTING(  0x0000, "Unconnected" )
611   PORT_CONFSETTING(  0x0100, "Gamepad" )
612   PORT_CONFNAME( 0xf000, 0x0000, "P4 Controller") PORT_CONDITION("EXP", 0x0f, EQUALS, 0x08)
613   PORT_CONFSETTING(  0x0000, "Unconnected" )
614   PORT_CONFSETTING(  0x1000, "Gamepad" )
615
616   PORT_START("EXP")
617   PORT_CONFNAME( 0x0f, 0x00, "Expansion Port")
618   PORT_CONFSETTING(  0x00, "(Empty)" )
619   PORT_CONFSETTING(  0x01, "Light Gun" )
620   PORT_CONFSETTING(  0x02, "FC Keyboard" )
621   PORT_CONFSETTING(  0x03, "Subor Keyboard" )
622   PORT_CONFSETTING(  0x04, "Arkanoid paddle" )
623   PORT_CONFSETTING(  0x05, "Family Trainer (Side A)" )
624   PORT_CONFSETTING(  0x06, "Family Trainer (Side B)" )
625   PORT_CONFSETTING(  0x07, "Mahjong Panel" )
626   PORT_CONFSETTING(  0x08, "Hori Twin Adapter" )
627
64628   PORT_START("CONFIG")
65629   PORT_CONFNAME( 0x01, 0x00, "Draw Top/Bottom 8 Lines")
66630   PORT_CONFSETTING(    0x01, DEF_STR(No) )
r243148r243149
70634   PORT_CONFSETTING(    0x00, DEF_STR(Yes) )
71635
72636   PORT_START("FLIPDISK") /* fake key */
73   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Change Disk Side") PORT_CODE(KEYCODE_SPACE)
637   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Change Disk Side")
74638INPUT_PORTS_END
75639
76640
r243148r243149
110674   MCFG_NES_APU_CPU("maincpu")
111675   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.90)
112676
113   MCFG_NES_CONTROL_PORT_ADD("ctrl1", nes_control_port1_devices, "joypad")
114   MCFG_NESCTRL_BRIGHTPIXEL_CB(nes_state, bright_pixel)
115   MCFG_NES_CONTROL_PORT_ADD("ctrl2", nes_control_port2_devices, "joypad")
116   MCFG_NESCTRL_BRIGHTPIXEL_CB(nes_state, bright_pixel)
117
118677   MCFG_NES_CARTRIDGE_ADD("nes_slot", nes_cart, NULL)
119678   MCFG_SOFTWARE_LIST_ADD("cart_list", "nes")
120679   MCFG_SOFTWARE_LIST_ADD("ade_list", "nes_ade")         // Camerica/Codemasters Aladdin Deck Enhancer mini-carts
r243148r243149
170729MACHINE_CONFIG_END
171730
172731static MACHINE_CONFIG_DERIVED( famicom, nes )
173   MCFG_DEVICE_REMOVE("ctrl1")
174   MCFG_DEVICE_REMOVE("ctrl2")
175   MCFG_NES_CONTROL_PORT_ADD("ctrl1", fc_control_port1_devices, "joypad")
176   MCFG_NES_CONTROL_PORT_ADD("ctrl2", fc_control_port2_devices, "joypad")
177   MCFG_FC_EXPANSION_PORT_ADD("exp", fc_expansion_devices, NULL)
178   MCFG_NESCTRL_BRIGHTPIXEL_CB(nes_state, bright_pixel)
732   MCFG_CASSETTE_ADD( "tape" )
733   MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
734   MCFG_CASSETTE_INTERFACE("fc_cass")
179735
180736   MCFG_SOFTWARE_LIST_ADD("flop_list", "famicom_flop")
181737   MCFG_SOFTWARE_LIST_ADD("cass_list", "famicom_cass")
r243148r243149
213769MACHINE_START_MEMBER( nes_state, fds )
214770{
215771   m_ciram = auto_alloc_array(machine(), UINT8, 0x800);
772   setup_ioports();
216773   setup_disk(m_disk);
217   
218   // register saves
219   save_item(NAME(m_last_frame_flip));
220   save_pointer(NAME(m_ciram), 0x800);
774   state_register();
221775}
222776
223777MACHINE_RESET_MEMBER( nes_state, fds )
r243148r243149
227781
228782   // the rest is the same as for nes/famicom/dendy
229783   m_maincpu->reset();
784
785   memset(m_pad_latch, 0, sizeof(m_pad_latch));
786   memset(m_zapper_latch, 0, sizeof(m_zapper_latch));
787   m_paddle_latch = 0;
788   m_paddle_btn_latch = 0;
230789}
231790
232791static MACHINE_CONFIG_DERIVED( fds, famicom )
233792   MCFG_MACHINE_START_OVERRIDE( nes_state, fds )
234793   MCFG_MACHINE_RESET_OVERRIDE( nes_state, fds )
794   MCFG_DEVICE_REMOVE("tape")
235795
236796   MCFG_DEVICE_REMOVE("nes_slot")
237797   MCFG_DEVICE_ADD("disk", NES_DISKSYS, 0)
r243148r243149
267827
268828   // the rest is the same as for nes/famicom/dendy
269829   m_maincpu->reset();
830
831   memset(m_pad_latch, 0, sizeof(m_pad_latch));
832   memset(m_zapper_latch, 0, sizeof(m_zapper_latch));
833   m_paddle_latch = 0;
834   m_paddle_btn_latch = 0;
270835}
271836
272837static MACHINE_CONFIG_DERIVED( famitwin, famicom )
trunk/src/mess/includes/banctec.h
r243148r243149
1/*****************************************************************************
2 *
3 * includes/banctec.h
4 *
5 ****************************************************************************/
6
7#ifndef BANCTEC_H_
8#define BANCTEC_H_
9
10#include "video/mc6845.h"
11
12class banctec_state : public driver_device
13{
14public:
15   banctec_state(const machine_config &mconfig, device_type type, const char *tag)
16      : driver_device(mconfig, type, tag),
17      m_maincpu(*this, "maincpu"),
18      m_gfxdecode(*this, "gfxdecode"),
19      m_videoram(*this, "videoram") { }
20
21   DECLARE_READ8_MEMBER(banctec_read);
22   DECLARE_WRITE8_MEMBER(banctec_write);
23   TILE_GET_INFO_MEMBER(get_bg_tile_info);
24   MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
25   virtual void machine_reset();
26   virtual void video_start();
27   UINT32 screen_update_banctec(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
28
29   required_device<cpu_device> m_maincpu;
30   required_device<gfxdecode_device> m_gfxdecode;
31   required_shared_ptr<UINT8> m_videoram;
32
33   tilemap_t *m_bg_tilemap;
34};
35
36#endif /* BANCTEC_H_ */
trunk/src/mess/includes/nes.h
r243148r243149
1313#include "video/ppu2c0x.h"
1414#include "bus/nes/nes_slot.h"
1515#include "bus/nes/nes_carts.h"
16#include "bus/nes_ctrl/ctrl.h"
1716#include "sound/nes_apu.h"
17#include "imagedev/cassette.h"
1818
1919/***************************************************************************
2020    CONSTANTS
r243148r243149
3030    TYPE DEFINITIONS
3131***************************************************************************/
3232
33struct nes_input
34{
35   UINT32 shift;
36   UINT32 i0, i1, i2;
37};
38
3339/*PPU fast banking constants and structures */
3440
3541#define CHRROM 0
r243148r243149
5157class nes_state : public driver_device
5258{
5359public:
60   enum
61   {
62      TIMER_ZAPPER_TICK,
63      TIMER_LIGHTGUN_TICK
64   };
65
5466   nes_state(const machine_config &mconfig, device_type type, const char *tag)
5567      : driver_device(mconfig, type, tag),
5668         m_maincpu(*this, "maincpu"),
5769         m_ppu(*this, "ppu"),
5870         m_sound(*this, "nessound"),
59         m_ctrl1(*this, "ctrl1"),
60         m_ctrl2(*this, "ctrl2"),
61         m_exp(*this, "exp"),
6271         m_cartslot(*this, "nes_slot"),
63         m_disk(*this, "disk")
72         m_disk(*this, "disk"),
73         m_cassette(*this, "tape")
6474      { }
6575
6676   /* video-related */
6777   int m_last_frame_flip;
6878
6979   /* misc */
80   ioport_port       *m_io_ctrlsel;
81   ioport_port       *m_io_fckey[9];
82   ioport_port       *m_io_subkey[13];
83   ioport_port       *m_io_pad[4];
84   ioport_port       *m_io_powerpad[2];
85   ioport_port       *m_io_mahjong[4];
86   ioport_port       *m_io_ftrainer[4];
87   ioport_port       *m_io_cc_left;
88   ioport_port       *m_io_cc_right;
89   ioport_port       *m_io_zapper1_t;
90   ioport_port       *m_io_zapper1_x;
91   ioport_port       *m_io_zapper1_y;
92   ioport_port       *m_io_zapper2_t;
93   ioport_port       *m_io_zapper2_x;
94   ioport_port       *m_io_zapper2_y;
95   ioport_port       *m_io_paddle;
96   ioport_port       *m_io_paddle_btn;
97   ioport_port       *m_io_exp;
7098   ioport_port       *m_io_disksel;
7199
72100   UINT8      *m_vram;
r243148r243149
75103   required_device<cpu_device> m_maincpu;
76104   required_device<ppu2c0x_device> m_ppu;
77105   required_device<nesapu_device> m_sound;
78   required_device<nes_control_port_device> m_ctrl1;
79   required_device<nes_control_port_device> m_ctrl2;
80   optional_device<nes_control_port_device> m_exp;
81106   optional_device<nes_cart_slot_device> m_cartslot;
82107   optional_device<nes_disksys_device> m_disk;
108   optional_device<cassette_image_device> m_cassette;
83109
84110   int nes_ppu_vidaccess(int address, int data);
85111   void ppu_nmi(int *ppu_regs);
r243148r243149
87113   DECLARE_READ8_MEMBER(nes_in0_r);
88114   DECLARE_READ8_MEMBER(nes_in1_r);
89115   DECLARE_WRITE8_MEMBER(nes_in0_w);
116   DECLARE_WRITE8_MEMBER(nes_in1_w);
90117   DECLARE_READ8_MEMBER(fc_in0_r);
91118   DECLARE_READ8_MEMBER(fc_in1_r);
92119   DECLARE_WRITE8_MEMBER(fc_in0_w);
r243148r243149
100127   DECLARE_READ8_MEMBER(psg_4015_r);
101128   DECLARE_WRITE8_MEMBER(psg_4015_w);
102129   DECLARE_WRITE8_MEMBER(psg_4017_w);
103   NESCTRL_BRIGHTPIXEL_CB(bright_pixel);
130   void state_register();
131   void setup_ioports();
104132
105133   DECLARE_DRIVER_INIT(famicom);
106134
r243148r243149
111139   DECLARE_MACHINE_RESET(famitwin);
112140   void setup_disk(nes_disksys_device *slot);
113141
142   // input related
143   UINT32 m_pad_latch[4];
144   UINT8 m_zapper_latch[2][3];
145   UINT8 m_paddle_latch, m_paddle_btn_latch;
146   UINT8 m_mjpanel_latch;
147   UINT8 m_fck_scan, m_fck_mode;
148   UINT8 m_mic_obstruct;
149   UINT8 m_powerpad_latch[2];
150   UINT8 m_ftrainer_scan;
151
152protected:
153   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
154
114155private:
115156   memory_bank       *m_prg_bank_mem[5];
116157};
trunk/src/mess/machine/nes.c
r243148r243149
77 ****************************************************************************/
88
99#include "emu.h"
10#include "crsshair.h"
1011#include "cpu/m6502/m6502.h"
1112#include "includes/nes.h"
13#include "imagedev/flopdrv.h"
1214
1315/***************************************************************************
16    CONSTANTS
17***************************************************************************/
18
19/* Set to dump info about the inputs to the errorlog */
20#define LOG_JOY     0
21
22/* Set to generate prg & chr files when the cart is loaded */
23#define SPLIT_PRG   0
24#define SPLIT_CHR   0
25
26/***************************************************************************
1427    FUNCTIONS
1528***************************************************************************/
1629
r243148r243149
3144      m_cartslot->pcb_reset();
3245
3346   m_maincpu->reset();
47
48   memset(m_pad_latch, 0, sizeof(m_pad_latch));
49   memset(m_zapper_latch, 0, sizeof(m_zapper_latch));
50   m_paddle_latch = 0;
51   m_paddle_btn_latch = 0;
3452}
3553
3654//-------------------------------------------------
3755//  machine_start
3856//-------------------------------------------------
3957
58void nes_state::state_register()
59{
60   save_item(NAME(m_last_frame_flip));
61
62   save_pointer(NAME(m_ciram), 0x800);
63
64   save_item(NAME(m_pad_latch));
65   save_item(NAME(m_zapper_latch));
66   save_item(NAME(m_paddle_latch));
67   save_item(NAME(m_paddle_btn_latch));
68   save_item(NAME(m_mjpanel_latch));
69   save_item(NAME(m_fck_scan));
70   save_item(NAME(m_fck_mode));
71   save_item(NAME(m_mic_obstruct));
72   save_item(NAME(m_powerpad_latch));
73   save_item(NAME(m_ftrainer_scan));
74}
75
76void nes_state::setup_ioports()
77{
78   for (int i = 0; i < 9; i++)
79   {
80      char str[7];
81      sprintf(str, "FCKEY%i", i);
82      m_io_fckey[i] = ioport(str);
83   }
84   for (int i = 0; i < 13; i++)
85   {
86      char str[9];
87      sprintf(str, "SUBKEY%i", i);
88      m_io_subkey[i] = ioport(str);
89   }
90   for (int i = 0; i < 4; i++)
91   {
92      char str[8];
93      sprintf(str, "PAD%i", i + 1);
94      m_io_pad[i] = ioport(str);
95      sprintf(str, "MAH%i", i);
96      m_io_mahjong[i] = ioport(str);
97      sprintf(str, "FT_COL%i", i);
98      m_io_ftrainer[i] = ioport(str);
99   }
100
101   m_io_ctrlsel        = ioport("CTRLSEL");
102   m_io_exp            = ioport("EXP");
103   m_io_paddle         = ioport("PADDLE");
104   m_io_paddle_btn     = ioport("PADDLE_BUTTON");
105   m_io_cc_left        = ioport("CC_LEFT");
106   m_io_cc_right       = ioport("CC_RIGHT");
107   m_io_zapper1_t      = ioport("ZAPPER1_T");
108   m_io_zapper1_x      = ioport("ZAPPER1_X");
109   m_io_zapper1_y      = ioport("ZAPPER1_Y");
110   m_io_zapper2_t      = ioport("ZAPPER2_T");
111   m_io_zapper2_x      = ioport("ZAPPER2_X");
112   m_io_zapper2_y      = ioport("ZAPPER2_Y");
113   m_io_powerpad[0]    = ioport("POWERPAD1");
114   m_io_powerpad[1]    = ioport("POWERPAD2");
115   m_io_disksel        = ioport("FLIPDISK");
116}
117
40118void nes_state::machine_start()
41119{
42120   address_space &space = m_maincpu->space(AS_PROGRAM);
r243148r243149
48126   m_ciram = auto_alloc_array(machine(), UINT8, 0x800);
49127   // other pointers got set in the loading routine, because they 'belong' to the cart itself
50128
51   m_io_disksel = ioport("FLIPDISK");
129   setup_ioports();
52130
53131   if (m_cartslot && m_cartslot->m_cart)
54132   {
r243148r243149
100178      m_cartslot->m_cart->pcb_reg_postload(machine());
101179   }
102180
103   // register saves
104   save_item(NAME(m_last_frame_flip));
105   save_pointer(NAME(m_ciram), 0x800);
181   state_register();
106182}
107183
108184
r243148r243149
112188
113189READ8_MEMBER(nes_state::nes_in0_r)
114190{
191   int cfg = m_io_ctrlsel->read();
192
193   // Some games expect bit 6 to be set because the last entry on the data bus shows up
194   // in the unused upper 3 bits, so typically a read from $4016 leaves 0x40 there.
115195   UINT8 ret = 0x40;
116   ret |= m_ctrl1->read_bit0();
117   ret |= m_ctrl1->read_bit34();
196   ret |= (m_pad_latch[0] & 0x01);
197
198   // shift
199   m_pad_latch[0] >>= 1;
200
201   // zapper
202   if ((cfg & 0x000f) == 0x0002)
203   {
204      int x = m_zapper_latch[0][1];  // x-position
205      int y = m_zapper_latch[0][2];  // y-position
206      UINT32 pix, color_base;
207
208      // get the pixel at the gun position
209      pix = m_ppu->get_pixel(x, y);
210
211      // get the color base from the ppu
212      color_base = m_ppu->get_colorbase();
213
214      // check if the cursor is over a bright pixel
215      if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
216         (pix == color_base + 0x33) || (pix == color_base + 0x34))
217         ret &= ~0x08; // sprite hit
218      else
219         ret |= 0x08;  // no sprite hit
220
221      // light gun trigger
222      ret |= (m_zapper_latch[0][0] << 4);
223   }
224
225   if (LOG_JOY)
226      logerror("joy 0 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
227
118228   return ret;
119229}
120230
121231READ8_MEMBER(nes_state::nes_in1_r)
122232{
233   int cfg = m_io_ctrlsel->read();
234
235   // Some games expect bit 6 to be set because the last entry on the data bus shows up
236   // in the unused upper 3 bits, so typically a read from $4017 leaves 0x40 there.
123237   UINT8 ret = 0x40;
124   ret |= m_ctrl2->read_bit0();
125   ret |= m_ctrl2->read_bit34();
238   ret |= (m_pad_latch[1] & 0x01);
239
240   // shift
241   m_pad_latch[1] >>= 1;
242
243   // zapper
244   if ((cfg & 0x00f0) == 0x0020)
245   {
246      int x = m_zapper_latch[1][1];  // x-position
247      int y = m_zapper_latch[1][2];  // y-position
248      UINT32 pix, color_base;
249
250      // get the pixel at the gun position
251      pix = m_ppu->get_pixel(x, y);
252
253      // get the color base from the ppu
254      color_base = m_ppu->get_colorbase();
255
256      // check if the cursor is over a bright pixel
257      if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
258         (pix == color_base + 0x33) || (pix == color_base + 0x34))
259         ret &= ~0x08; // sprite hit
260      else
261         ret |= 0x08;  // no sprite hit
262
263      // light gun trigger
264      ret |= (m_zapper_latch[1][0] << 4);
265   }
266
267   // arkanoid paddle
268   if ((cfg & 0x00f0) == 0x0040)
269   {
270      ret |= (m_paddle_btn_latch << 3);   // button
271      ret |= ((m_paddle_latch & 0x80) >> 3);      // paddle data
272      m_paddle_latch <<= 1;
273      m_paddle_latch &= 0xff;
274   }
275
276   // powerpad
277   if ((cfg & 0x00f0) == 0x0050 || (cfg & 0x00f0) == 0x0060)
278   {
279      ret |= ((m_powerpad_latch[0] & 0x01) << 3);
280      ret |= ((m_powerpad_latch[1] & 0x01) << 4);
281      m_powerpad_latch[0] >>= 1;
282      m_powerpad_latch[1] >>= 1;
283   }
284
285   if (LOG_JOY)
286      logerror("joy 1 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
287
126288   return ret;
127289}
128290
129291WRITE8_MEMBER(nes_state::nes_in0_w)
130292{
131   m_ctrl1->write(data);
132   m_ctrl2->write(data);
293   int cfg = m_io_ctrlsel->read();
294
295   if (LOG_JOY)
296      logerror("joy write, val: %02x, pc: %04x\n", data, space.device().safe_pc());
297
298   // Check if lightgun has been chosen as input: if so, enable crosshair
299   timer_set(attotime::zero, TIMER_ZAPPER_TICK);
300
301   if (data & 0x01)
302      return;
303
304   // Toggling bit 0 high then low resets controllers
305   m_pad_latch[0] = 0;
306   m_pad_latch[1] = 0;
307   m_zapper_latch[0][0] = 0;
308   m_zapper_latch[0][1] = 0;
309   m_zapper_latch[0][2] = 0;
310   m_zapper_latch[1][0] = 0;
311   m_zapper_latch[1][1] = 0;
312   m_zapper_latch[1][2] = 0;
313   m_paddle_btn_latch = 0;
314   m_paddle_latch = 0;
315   m_powerpad_latch[0] = 0;
316   m_powerpad_latch[1] = 0;
317
318   // P1 inputs
319   switch (cfg & 0x000f)
320   {
321      case 0x01:  // pad 1
322         m_pad_latch[0] = m_io_pad[0]->read();
323         break;
324
325      case 0x02:  // zapper (secondary)
326         m_zapper_latch[0][0] = m_io_zapper1_t->read();
327         m_zapper_latch[0][1] = m_io_zapper1_x->read();
328         m_zapper_latch[0][2] = m_io_zapper1_y->read();
329         break;
330   }
331
332   // P2 inputs
333   switch ((cfg & 0x00f0) >> 4)
334   {
335      case 0x01:  // pad 2
336         m_pad_latch[1] = m_io_pad[1]->read();
337         break;
338
339      case 0x02:  // zapper (primary) - most games expect pad in port1 & zapper in port2
340         m_zapper_latch[1][0] = m_io_zapper2_t->read();
341         m_zapper_latch[1][1] = m_io_zapper2_x->read();
342         m_zapper_latch[1][2] = m_io_zapper2_y->read();
343         break;
344
345      case 0x04:  // arkanoid paddle
346         m_paddle_btn_latch = m_io_paddle_btn->read();
347         m_paddle_latch = (UINT8) (m_io_paddle->read() ^ 0xff);
348         break;
349
350      case 0x05:  // power pad
351      case 0x06:  // power pad
352         m_powerpad_latch[0] = m_io_powerpad[0]->read();
353         m_powerpad_latch[1] = m_io_powerpad[1]->read() | 0xf0;
354         break;
355   }
356
357   // P3 & P4 inputs in NES Four Score are read serially with P1 & P2
358   // P3 inputs
359   if ((cfg & 0x0f00))
360      m_pad_latch[0] |= ((m_io_pad[2]->read() << 8) | (0x08 << 16));    // pad 3 + signature
361
362   // P4 inputs
363   if ((cfg & 0xf000))
364      m_pad_latch[1] |= ((m_io_pad[3]->read() << 8) | (0x04 << 16));    // pad 4 + signature
133365}
134366
135367
368WRITE8_MEMBER(nes_state::nes_in1_w)
369{
370}
371
372
136373READ8_MEMBER(nes_state::fc_in0_r)
137374{
375   int cfg = m_io_ctrlsel->read();
376   int exp = m_io_exp->read();
377
378   // Some games expect bit 6 to be set because the last entry on the data bus shows up
379   // in the unused upper 3 bits, so typically a read from $4016 leaves 0x40 there.
138380   UINT8 ret = 0x40;
139   // bit 0 to controller port
140   ret |= m_ctrl1->read_bit0();
381   ret |= (m_pad_latch[0] & 0x01);
141382
142   // expansion port bits (in the original FC, P2 controller was hooked to these lines
143   // too, so in principle some homebrew hardware modification could use the same
144   // connection with P1 controller too)
145   ret |= m_ctrl1->read_exp(0);
146   ret |= m_ctrl2->read_exp(0);
383   // shift
384   m_pad_latch[0] >>= 1;
147385
148   // at the same time, we might have a standard joypad connected to the expansion port which
149   // shall be read as P3 (this is needed here to avoid implementing the expansion port as a
150   // different device compared to the standard control port... it might be changed later)
151   ret |= (m_exp->read_bit0() << 1);
152   // finally, read the expansion port as expected
153   ret |= m_exp->read_exp(0);
386   // microphone bit
387   if ((cfg & 0x00f0) == 0x00f0)
388      ret |= m_mic_obstruct;  //bit2!
389
390   // EXP input
391   switch (exp & 0x0f)
392   {
393      case 0x02:  // FC Keyboard: tape input
394         if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)
395         {
396            double level = m_cassette->input();
397            if (level < 0)
398               ret |= 0x00;
399            else
400               ret |= 0x02;
401         }
402         break;
403
404      case 0x04:  // Arkanoid paddle
405         ret |= (m_paddle_btn_latch << 1);   // button
406         break;
407
408      case 0x07:  // Mahjong Panel
409         ret |= ((m_mjpanel_latch & 0x01) << 1);
410         m_mjpanel_latch >>= 1;
411         break;
412
413      case 0x08:  // 'multitap' p3
414         ret |= ((m_pad_latch[2] & 0x01) << 1);
415         m_pad_latch[2] >>= 1;
416         break;
417   }
418
419   if (LOG_JOY)
420      logerror("joy 0 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
421
154422   return ret;
155423}
156424
157425READ8_MEMBER(nes_state::fc_in1_r)
158426{
427   int exp = m_io_exp->read();
428
429   // Some games expect bit 6 to be set because the last entry on the data bus shows up
430   // in the unused upper 3 bits, so typically a read from $4017 leaves 0x40 there.
159431   UINT8 ret = 0x40;
160   // bit 0 to controller port
161   ret |= m_ctrl2->read_bit0();
432   ret |= (m_pad_latch[1] & 0x01);
162433
163   // expansion port bits (in the original FC, P2 controller was hooked to these lines
164   // too, so in principle some homebrew hardware modification could use the same
165   // connection with P1 controller too)
166   ret |= m_ctrl1->read_exp(1);
167   ret |= m_ctrl2->read_exp(1);
434   // shift
435   m_pad_latch[1] >>= 1;
168436
169   // finally, read the expansion port as expected (standard pad cannot be hooked as P4, so
170   // no read_bit0 here)
171   ret |= m_exp->read_exp(1);
437
438   // EXP input
439   switch (exp & 0x0f)
440   {
441      case 0x01:  // Lightgun
442         {
443            int x = m_zapper_latch[0][1];  // x-position
444            int y = m_zapper_latch[0][2];  // y-position
445            UINT32 pix, color_base;
446
447            // get the pixel at the gun position
448            pix = m_ppu->get_pixel(x, y);
449
450            // get the color base from the ppu
451            color_base = m_ppu->get_colorbase();
452
453            // check if the cursor is over a bright pixel
454            if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
455               (pix == color_base + 0x33) || (pix == color_base + 0x34))
456               ret &= ~0x08; // sprite hit
457            else
458               ret |= 0x08;  // no sprite hit
459
460            // light gun trigger
461            ret |= (m_zapper_latch[0][0] << 4);
462         }
463         break;
464
465      case 0x02:  // FC Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
466         if (m_fck_scan < 9)
467            ret |= ~(((m_io_fckey[m_fck_scan]->read() >> (m_fck_mode * 4)) & 0x0f) << 1) & 0x1e;
468         else
469            ret |= 0x1e;
470         break;
471
472      case 0x03:  // Subor Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
473         if (m_fck_scan < 12)
474            ret |= ~(((m_io_subkey[m_fck_scan]->read() >> (m_fck_mode * 4)) & 0x0f) << 1) & 0x1e;
475         else
476            ret |= 0x1e;
477         break;
478
479      case 0x04:  // Arkanoid paddle
480         ret |= ((m_paddle_latch & 0x80) >> 6);      // paddle data
481         m_paddle_latch <<= 1;
482         m_paddle_latch &= 0xff;
483         break;
484
485      case 0x05:  // family trainer
486      case 0x06:  // family trainer
487         if (!BIT(m_ftrainer_scan, 0))
488         {
489            // read low line: buttons 9,10,11,12
490            for (int i = 0; i < 4; i++)
491               ret |= ((m_io_ftrainer[i]->read() & 0x01) << (1 + i));
492         }
493         else if (!BIT(m_ftrainer_scan, 1))
494         {
495            // read mid line: buttons 5,6,7,8
496            for (int i = 0; i < 4; i++)
497               ret |= ((m_io_ftrainer[i]->read() & 0x02) << (1 + i));
498         }
499         else if (!BIT(m_ftrainer_scan, 2))
500         {
501            // read high line: buttons 1,2,3,4
502            for (int i = 0; i < 4; i++)
503               ret |= ((m_io_ftrainer[i]->read() & 0x04) << (1 + i));
504         }
505         break;
506
507      case 0x07:  // Mahjong Panel
508         ret |= ((m_mjpanel_latch & 0x01) << 1);
509         m_mjpanel_latch >>= 1;
510         break;
511
512      case 0x08:  // 'multitap' p4
513         ret |= ((m_pad_latch[3] & 0x01) << 1);
514         m_pad_latch[3] >>= 1;
515         break;
516   }
517
518   if (LOG_JOY)
519      logerror("joy 1 read, val: %02x, pc: %04x\n", ret, space.device().safe_pc());
520
172521   return ret;
173522}
174523
175524WRITE8_MEMBER(nes_state::fc_in0_w)
176525{
177   m_ctrl1->write(data);
178   m_ctrl2->write(data);
179   m_exp->write(data);
526   int cfg = m_io_ctrlsel->read();
527   int exp = m_io_exp->read();
528
529   if (LOG_JOY)
530      logerror("joy write, val: %02x, pc: %04x\n", data, space.device().safe_pc());
531
532   // Check if lightgun has been chosen as input: if so, enable crosshair
533   timer_set(attotime::zero, TIMER_LIGHTGUN_TICK);
534
535   // keyboards
536   if ((exp & 0x0f) == 0x02 || (exp & 0x0f) == 0x03)
537   {
538      // tape output (not fully tested)
539      if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_RECORD)
540         m_cassette->output(((data & 0x07) == 0x07) ? +1.0 : -1.0);
541
542      if (BIT(data, 2))   // keyboard active
543      {
544         int lines = ((exp & 0x0f) == 0x02) ? 9 : 12;
545         UINT8 out = BIT(data, 1);   // scan
546
547         if (m_fck_mode && !out && ++m_fck_scan > lines)
548            m_fck_scan = 0;
549
550         m_fck_mode = out;   // access lower or upper 4 bits
551
552         if (BIT(data, 0))   // reset
553            m_fck_scan = 0;
554      }
555   }
556
557   // family trainer
558   if ((exp & 0x0f) == 0x05 || (exp & 0x0f) == 0x06)
559   {
560      // select raw to scan
561      m_ftrainer_scan = data & 0x07;
562   }
563
564   if (data & 0x01)
565      return;
566
567   // Toggling bit 0 high then low resets controllers
568   m_pad_latch[0] = 0;
569   m_pad_latch[1] = 0;
570   m_pad_latch[2] = 0;
571   m_pad_latch[3] = 0;
572   m_zapper_latch[0][0] = 0;
573   m_zapper_latch[0][1] = 0;
574   m_zapper_latch[0][2] = 0;
575   m_paddle_btn_latch = 0;
576   m_paddle_latch = 0;
577   m_mjpanel_latch = 0;
578   m_mic_obstruct = 0;
579
580   // P1 inputs
581   switch (cfg & 0x000f)
582   {
583      case 0x01:  // pad 1
584         m_pad_latch[0] = m_io_pad[0]->read();
585         break;
586
587      case 0x02:  // crazy climber (left stick)
588         m_pad_latch[0] = m_io_cc_left->read();
589         break;
590   }
591
592   // P2 inputs
593   switch ((cfg & 0x00f0) >> 4)
594   {
595      case 0x01:  // pad 2
596         m_pad_latch[1] = m_io_pad[1]->read();
597         break;
598
599      case 0x02:  // crazy climber (right stick)
600         m_pad_latch[1] = m_io_cc_right->read();
601         break;
602
603      case 0x0f:  // pad 2 old style with microphone instead of START/SELECT keys
604         // we only emulate obstruction of mic (when you blow or talk into it)
605         m_mic_obstruct = m_io_pad[1]->read() & 0x04;
606         m_pad_latch[1] = (m_io_pad[1]->read() & ~0x04);
607         break;
608   }
609
610   // P3 & P4 inputs in Famicom (e.g. through Hori Twin Adapter or Hori 4 Players Adapter)
611   // are read in parallel with P1 & P2 (just using diff bits)
612   // P3 inputs
613   if ((exp & 0x0f) == 8 && (cfg & 0x0f00) == 0x0100)
614      m_pad_latch[2] = m_io_pad[2]->read();     // pad 3
615
616   // P4 inputs
617   if ((exp & 0x0f) == 8 && (cfg & 0xf000) == 0x1000)
618      m_pad_latch[3] = m_io_pad[3]->read();     // pad 4
619
620
621   // EXP input
622   switch (exp & 0x0f)
623   {
624      case 0x01:  // Lightgun
625         m_zapper_latch[0][0] = m_io_zapper2_t->read();
626         m_zapper_latch[0][1] = m_io_zapper2_x->read();
627         m_zapper_latch[0][2] = m_io_zapper2_y->read();
628         break;
629
630      case 0x02:  // FC Keyboard
631      case 0x03:  // Subor Keyboard
632         // these are scanned differently than other devices:
633         // writes to $4016 with bit2 set always update the
634         // line counter and writing bit0 set resets the counter
635         break;
636
637      case 0x04:  // Arkanoid paddle
638         m_paddle_btn_latch = m_io_paddle_btn->read();
639         m_paddle_latch = (UINT8) (m_io_paddle->read() ^ 0xff);
640         break;
641
642      case 0x05:  // family trainer
643      case 0x06:  // family trainer
644         // these are scanned differently than other devices:
645         // bit0-bit2 of writes to $4016 select the row to read
646         // from from the mat input "columns"
647         break;
648
649
650      case 0x07:  // Mahjong Panel
651         if (data & 0xf8)
652            logerror("Error: Mahjong panel read with mux data %02x\n", (data & 0xfe));
653         else
654            m_mjpanel_latch = m_io_mahjong[(data & 0xfe) >> 1]->read();
655         break;
656   }
657
180658}
181659
182660
661void nes_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
662{
663   switch (id)
664   {
665      case TIMER_ZAPPER_TICK:
666         if ((m_io_ctrlsel->read() & 0x000f) == 0x0002)
667         {
668            /* enable lightpen crosshair */
669            crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_ALL);
670         }
671         else
672         {
673            /* disable lightpen crosshair */
674            crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_NONE);
675         }
676
677         if ((m_io_ctrlsel->read() & 0x00f0) == 0x0020)
678         {
679            /* enable lightpen crosshair */
680            crosshair_set_screen(machine(), 1, CROSSHAIR_SCREEN_ALL);
681         }
682         else
683         {
684            /* disable lightpen crosshair */
685            crosshair_set_screen(machine(), 1, CROSSHAIR_SCREEN_NONE);
686         }
687         break;
688      case TIMER_LIGHTGUN_TICK:
689         if ((m_io_exp->read() & 0x0f) == 0x01)
690         {
691            /* enable lightpen crosshair */
692            crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_ALL);
693         }
694         else
695         {
696            /* disable lightpen crosshair */
697            crosshair_set_screen(machine(), 0, CROSSHAIR_SCREEN_NONE);
698         }
699         break;
700      default:
701         assert_always(FALSE, "Unknown id in nes_state::device_timer");
702   }
703}
704
705
183706DRIVER_INIT_MEMBER(nes_state,famicom)
184707{
185708   // setup alt input handlers for additional FC input devices
r243148r243149
188711   space.install_write_handler(0x4016, 0x4016, write8_delegate(FUNC(nes_state::fc_in0_w), this));
189712   space.install_read_handler(0x4017, 0x4017, read8_delegate(FUNC(nes_state::fc_in1_r), this));
190713}
191
192NESCTRL_BRIGHTPIXEL_CB(nes_state::bright_pixel)
193{
194   // get the pixel at the gun position
195   UINT32 pix = m_ppu->get_pixel(x, y);
196   
197   // get the color base from the ppu
198   UINT32 color_base = m_ppu->get_colorbase();
199   
200   // check if the cursor is over a bright pixel
201   if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
202      (pix == color_base + 0x33) || (pix == color_base + 0x34))
203      return true;
204   else
205      return false;
206}
trunk/src/mess/mess.lst
r243148r243149
5454jaguar  // Atari Jaguar
5555jaguarcd  // Atari Jaguar CD
5656
57//BancTec
58banctec // BancTec ESeries panel
59
6057// Nintendo
6158nes       // Nintendo Entertainment System
6259nespal    // Nintendo Entertainment System PAL
trunk/src/mess/mess.mak
r243148r243149
614614BUSES += MSX_SLOT
615615BUSES += NEOGEO
616616BUSES += NES
617BUSES += NES_CTRL
618617BUSES += NUBUS
619618BUSES += O2
620619BUSES += ORICEXT
r243148r243149
679678   $(MESSOBJ)/att.a \
680679   $(MESSOBJ)/bally.a \
681680   $(MESSOBJ)/bandai.a \
682   $(MESSOBJ)/banctec.a \
683681   $(MESSOBJ)/be.a \
684682   $(MESSOBJ)/bnpo.a \
685683   $(MESSOBJ)/bondwell.a \
r243148r243149
10431041$(MESSOBJ)/bally.a:             \
10441042   $(MESS_DRIVERS)/astrocde.o  \
10451043
1046$(MESSOBJ)/banctec.a:            \
1047   $(MESS_DRIVERS)/banctec.o    \
1048
10491044$(MESSOBJ)/bandai.a:            \
10501045   $(MESS_DRIVERS)/sv8000.o    \
10511046   $(MESS_DRIVERS)/rx78.o      \


Previous 199869 Revisions Next


© 1997-2024 The MAME Team