src/mess/drivers/nes.c
| r12652 | r12653 | |
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | static INPUT_PORTS_START( nes_controllers ) |
| 59 | | PORT_START("CTRLSEL") /* Select Controller Type */ |
| 60 | | PORT_CONFNAME( 0x000f, 0x0001, "P1 Controller") |
| 61 | | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 62 | | PORT_CONFSETTING( 0x0001, "Gamepad" ) |
| 63 | | PORT_CONFSETTING( 0x0002, "Zapper" ) |
| 64 | | PORT_CONFSETTING( 0x0006, "Crazy Climber pad" ) |
| 65 | | PORT_CONFNAME( 0x00f0, 0x0010, "P2 Controller") |
| 66 | | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 67 | | PORT_CONFSETTING( 0x0010, "Gamepad" ) |
| 68 | | PORT_CONFSETTING( 0x0030, "Zapper" ) |
| 69 | | PORT_CONFSETTING( 0x0040, "Arkanoid paddle" ) |
| 70 | | // PORT_CONFSETTING( 0x0050, "Family Trainer" ) |
| 71 | | PORT_CONFNAME( 0x0f00, 0x0000, "P3 Controller") |
| 72 | | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 73 | | PORT_CONFSETTING( 0x0100, "Gamepad" ) |
| 74 | | PORT_CONFNAME( 0xf000, 0x0000, "P4 Controller") |
| 75 | | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 76 | | PORT_CONFSETTING( 0x1000, "Gamepad" ) |
| 77 | | |
| 78 | 59 | PORT_START("PAD1") /* Joypad 1 */ |
| 79 | 60 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 A") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) |
| 80 | 61 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 B") PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0001) |
| r12652 | r12653 | |
| 154 | 135 | |
| 155 | 136 | INPUT_PORTS_END |
| 156 | 137 | |
| 157 | | static INPUT_PORTS_START( nes ) |
| 158 | | PORT_INCLUDE( nes_controllers ) |
| 159 | | |
| 160 | | PORT_START("CONFIG") /* configuration */ |
| 161 | | PORT_CONFNAME( 0x01, 0x00, "Draw Top/Bottom 8 Lines") |
| 162 | | PORT_CONFSETTING( 0x01, DEF_STR(No) ) |
| 163 | | PORT_CONFSETTING( 0x00, DEF_STR(Yes) ) |
| 164 | | PORT_CONFNAME( 0x02, 0x00, "Enforce 8 Sprites/line") |
| 165 | | PORT_CONFSETTING( 0x02, DEF_STR(No) ) |
| 166 | | PORT_CONFSETTING( 0x00, DEF_STR(Yes) ) |
| 167 | | INPUT_PORTS_END |
| 168 | | |
| 169 | | static INPUT_PORTS_START( famicom ) |
| 170 | | PORT_INCLUDE( nes_controllers ) |
| 171 | | |
| 172 | | PORT_START("FLIPDISK") /* fake keys */ |
| 173 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Change Disk Side") |
| 174 | | INPUT_PORTS_END |
| 175 | | |
| 176 | 138 | static INPUT_PORTS_START( fc_keyboard ) |
| 177 | 139 | PORT_START("FCKEY0") |
| 178 | 140 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0008) |
| r12652 | r12653 | |
| 335 | 297 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 336 | 298 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 337 | 299 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 338 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 300 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 339 | 301 | |
| 340 | 302 | PORT_START("SUBKEY7") |
| 341 | 303 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| r12652 | r12653 | |
| 361 | 323 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 362 | 324 | |
| 363 | 325 | PORT_START("SUBKEY10") |
| 364 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU") |
| 326 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU") PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 365 | 327 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 366 | 328 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| 367 | 329 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_CONDITION("CTRLSEL", 0x000f, PORTCOND_EQUALS, 0x0009) |
| r12652 | r12653 | |
| 392 | 354 | |
| 393 | 355 | INPUT_PORTS_END |
| 394 | 356 | |
| 395 | | static INPUT_PORTS_START( famikey ) |
| 396 | | PORT_INCLUDE( famicom ) |
| 357 | static INPUT_PORTS_START( nes ) |
| 358 | PORT_INCLUDE( nes_controllers ) |
| 359 | |
| 360 | PORT_START("CTRLSEL") /* Select Controller Type */ |
| 361 | PORT_CONFNAME( 0x000f, 0x0001, "P1 Controller") |
| 362 | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 363 | PORT_CONFSETTING( 0x0001, "Gamepad" ) |
| 364 | PORT_CONFSETTING( 0x0002, "Zapper" ) |
| 365 | PORT_CONFSETTING( 0x0006, "Crazy Climber pad" ) |
| 366 | PORT_CONFNAME( 0x00f0, 0x0010, "P2 Controller") |
| 367 | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 368 | PORT_CONFSETTING( 0x0010, "Gamepad" ) |
| 369 | PORT_CONFSETTING( 0x0030, "Zapper" ) |
| 370 | PORT_CONFSETTING( 0x0040, "Arkanoid paddle" ) |
| 371 | // PORT_CONFSETTING( 0x0050, "Family Trainer" ) |
| 372 | PORT_CONFNAME( 0x0f00, 0x0000, "P3 Controller") |
| 373 | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 374 | PORT_CONFSETTING( 0x0100, "Gamepad" ) |
| 375 | PORT_CONFNAME( 0xf000, 0x0000, "P4 Controller") |
| 376 | PORT_CONFSETTING( 0x0000, "Unconnected" ) |
| 377 | PORT_CONFSETTING( 0x1000, "Gamepad" ) |
| 378 | |
| 379 | PORT_START("CONFIG") /* configuration */ |
| 380 | PORT_CONFNAME( 0x01, 0x00, "Draw Top/Bottom 8 Lines") |
| 381 | PORT_CONFSETTING( 0x01, DEF_STR(No) ) |
| 382 | PORT_CONFSETTING( 0x00, DEF_STR(Yes) ) |
| 383 | PORT_CONFNAME( 0x02, 0x00, "Enforce 8 Sprites/line") |
| 384 | PORT_CONFSETTING( 0x02, DEF_STR(No) ) |
| 385 | PORT_CONFSETTING( 0x00, DEF_STR(Yes) ) |
| 386 | INPUT_PORTS_END |
| 387 | |
| 388 | static INPUT_PORTS_START( famicom ) |
| 389 | PORT_INCLUDE( nes ) |
| 397 | 390 | PORT_INCLUDE( fc_keyboard ) |
| 398 | 391 | PORT_INCLUDE( subor_keyboard ) |
| 399 | 392 | |
| r12652 | r12653 | |
| 406 | 399 | PORT_CONFSETTING( 0x0008, "FC Keyboard" ) |
| 407 | 400 | PORT_CONFSETTING( 0x0009, "Subor Keyboard" ) |
| 408 | 401 | |
| 402 | PORT_START("FLIPDISK") /* fake keys */ |
| 403 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Change Disk Side") |
| 409 | 404 | INPUT_PORTS_END |
| 410 | 405 | |
| 406 | |
| 411 | 407 | #ifdef UNUSED_FUNCTION |
| 412 | 408 | /* This layout is not changed at runtime */ |
| 413 | 409 | gfx_layout nes_vram_charlayout = |
| r12652 | r12653 | |
| 576 | 572 | ROM_REGION( 0x800, "gfx3", ROMREGION_ERASE00 ) /* CI RAM */ |
| 577 | 573 | ROM_END |
| 578 | 574 | |
| 579 | | #define rom_fami_key rom_famicom |
| 580 | | |
| 581 | 575 | ROM_START( famitwin ) |
| 582 | 576 | ROM_REGION( 0x10000, "maincpu", 0 ) /* Main RAM + program banks */ |
| 583 | 577 | ROM_LOAD_OPTIONAL( "disksyst.rom", 0xe000, 0x2000, CRC(4df24a6c) SHA1(e4e41472c454f928e53eb10e0509bf7d1146ecc1) ) |
| r12652 | r12653 | |
| 629 | 623 | CONS( 1985, nes, 0, 0, nes, nes, 0, "Nintendo", "Nintendo Entertainment System / Famicom (NTSC)", GAME_IMPERFECT_GRAPHICS ) |
| 630 | 624 | CONS( 1987, nespal, nes, 0, nespal, nes, 0, "Nintendo", "Nintendo Entertainment System (PAL)", GAME_IMPERFECT_GRAPHICS ) |
| 631 | 625 | CONS( 1983, famicom, nes, 0, famicom, famicom, famicom, "Nintendo", "Famicom (w/ Disk System add-on)", GAME_IMPERFECT_GRAPHICS ) |
| 632 | | CONS( 1983, fami_key, nes, 0, famicom, famikey, famicom, "Nintendo", "Famicom (w/ Disk System add-on + Keyboard add-on)", GAME_IMPERFECT_GRAPHICS ) |
| 633 | 626 | CONS( 1986, famitwin, nes, 0, famicom, famicom, famicom, "Sharp", "Famicom Twin", GAME_IMPERFECT_GRAPHICS ) |
| 634 | 627 | CONS( 198?, m82, nes, 0, nes, nes, 0, "Nintendo", "M82 Display Unit", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) |
| 635 | 628 | CONS( 1996, drpcjr, nes, 0, famicom, famicom, famicom, "Bung", "Doctor PC Jr", GAME_IMPERFECT_GRAPHICS ) |