trunk/src/mame/drivers/magicfly.c
| r20314 | r20315 | |
| 332 | 332 | titled 'BONNE CHANCE!'. Turning the 4th DIP switch ON, the game switch to English, |
| 333 | 333 | and the title changes to 'GOOD LUCK!' (as the above mentioned games). |
| 334 | 334 | |
| 335 | To enter the test mode, press SERVICE (key 9). You can see an input-test matrix |
| 336 | to test all the valid inputs. Pressing BET (key M) and START (Key 1) simultaneou- |
| 337 | sly, you can find the book-keeping screen. Pressing once again both BET + START, |
| 338 | a little RAM test will start. As soon as it ends, will exit the mode and will be |
| 339 | back to the game.... |
| 335 | 340 | |
| 341 | |
| 336 | 342 | ******************************************************************************* |
| 337 | 343 | |
| 338 | 344 | |
| r20314 | r20315 | |
| 412 | 418 | - Added Bonne Chance!. A French/English poker game prototype of |
| 413 | 419 | the well known 'Golden Poker' and 'Jack Potten Poker'. |
| 414 | 420 | - Worked complete inputs from the scratch. Promoted to working. |
| 421 | - Added proper palette. Now the game seems to get accurate colors. |
| 415 | 422 | - Added some notes. |
| 416 | 423 | |
| 417 | 424 | |
| 418 | 425 | TODO: |
| 419 | 426 | |
| 420 | | - Palette for Bonne Chance!. |
| 421 | 427 | - Simplify the gfx banks to avoid a custom palette. |
| 422 | 428 | - Document the correct pinout. |
| 423 | 429 | - Analyze the PLD. Try to reconstruct the original equations. |
| r20314 | r20315 | |
| 455 | 461 | TILE_GET_INFO_MEMBER(get_magicfly_tile_info); |
| 456 | 462 | TILE_GET_INFO_MEMBER(get_7mezzo_tile_info); |
| 457 | 463 | virtual void video_start(); |
| 458 | | virtual void palette_init(); |
| 464 | DECLARE_PALETTE_INIT(magicfly); |
| 465 | DECLARE_PALETTE_INIT(bchance); |
| 459 | 466 | DECLARE_VIDEO_START(7mezzo); |
| 460 | 467 | UINT32 screen_update_magicfly(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 461 | 468 | }; |
| 462 | 469 | |
| 463 | 470 | |
| 464 | | /************************* |
| 465 | | * Video Hardware * |
| 466 | | *************************/ |
| 471 | /********************************************* |
| 472 | * Video Hardware * |
| 473 | *********************************************/ |
| 467 | 474 | |
| 468 | 475 | |
| 469 | 476 | WRITE8_MEMBER(magicfly_state::magicfly_videoram_w) |
| r20314 | r20315 | |
| 478 | 485 | m_bg_tilemap->mark_tile_dirty(offset); |
| 479 | 486 | } |
| 480 | 487 | |
| 488 | |
| 481 | 489 | TILE_GET_INFO_MEMBER(magicfly_state::get_magicfly_tile_info) |
| 482 | 490 | { |
| 483 | 491 | /* - bits - |
| r20314 | r20315 | |
| 508 | 516 | m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(magicfly_state::get_magicfly_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 29); |
| 509 | 517 | } |
| 510 | 518 | |
| 519 | |
| 511 | 520 | TILE_GET_INFO_MEMBER(magicfly_state::get_7mezzo_tile_info) |
| 512 | 521 | { |
| 513 | 522 | /* - bits - |
| r20314 | r20315 | |
| 538 | 547 | m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(magicfly_state::get_7mezzo_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 29); |
| 539 | 548 | } |
| 540 | 549 | |
| 550 | |
| 541 | 551 | UINT32 magicfly_state::screen_update_magicfly(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 542 | 552 | { |
| 543 | 553 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 544 | 554 | return 0; |
| 545 | 555 | } |
| 546 | 556 | |
| 547 | | void magicfly_state::palette_init() |
| 557 | |
| 558 | PALETTE_INIT_MEMBER(magicfly_state, magicfly) |
| 548 | 559 | { |
| 549 | 560 | int i; |
| 550 | 561 | |
| r20314 | r20315 | |
| 571 | 582 | } |
| 572 | 583 | } |
| 573 | 584 | |
| 585 | PALETTE_INIT_MEMBER(magicfly_state, bchance) |
| 586 | { |
| 587 | int i; |
| 574 | 588 | |
| 575 | | /****************************** |
| 576 | | * R/W Handlers * |
| 577 | | ******************************/ |
| 589 | for (i = 0x00; i < 0x10; i += 0x10) |
| 590 | { |
| 591 | /* 1st gfx bank */ |
| 592 | palette_set_color(machine(), i + 0, MAKE_RGB(0x00, 0x00, 0x00)); |
| 593 | palette_set_color(machine(), i + 2, MAKE_RGB(0x00, 0x00, 0x00)); |
| 594 | palette_set_color(machine(), i + 4, MAKE_RGB(0x00, 0x00, 0x00)); |
| 595 | palette_set_color(machine(), i + 6, MAKE_RGB(0x00, 0x00, 0x00)); |
| 596 | palette_set_color(machine(), i + 8, MAKE_RGB(0x00, 0x00, 0x00)); |
| 597 | palette_set_color(machine(), i + 10, MAKE_RGB(0x00, 0x00, 0x00)); |
| 598 | palette_set_color(machine(), i + 12, MAKE_RGB(0x00, 0x00, 0x00)); |
| 599 | palette_set_color(machine(), i + 14, MAKE_RGB(0x00, 0x00, 0x00)); |
| 578 | 600 | |
| 601 | palette_set_color(machine(), i + 1, MAKE_RGB(0x00, 0x00, 0x00)); |
| 602 | palette_set_color(machine(), i + 3, MAKE_RGB(0xff, 0x00, 0x00)); |
| 603 | palette_set_color(machine(), i + 5, MAKE_RGB(0x00, 0xff, 0x00)); |
| 604 | palette_set_color(machine(), i + 7, MAKE_RGB(0xff, 0xff, 0x00)); |
| 605 | palette_set_color(machine(), i + 9, MAKE_RGB(0x00, 0x00, 0xff)); |
| 606 | palette_set_color(machine(), i + 11, MAKE_RGB(0xff, 0x00, 0xff)); |
| 607 | palette_set_color(machine(), i + 13, MAKE_RGB(0x00, 0xff, 0xff)); |
| 608 | palette_set_color(machine(), i + 15, MAKE_RGB(0xff, 0xff, 0xff)); |
| 609 | } |
| 579 | 610 | |
| 611 | palette_set_color(machine(), 0x08 , MAKE_RGB(0xff, 0xff, 0xff)); // white for the cards back logo background. |
| 612 | palette_set_color(machine(), 0x12 , MAKE_RGB(0x00, 0x00, 0x00)); // black for the cards corners (should be transparent) |
| 613 | } |
| 614 | |
| 615 | |
| 616 | /************************************************** |
| 617 | * R/W Handlers * |
| 618 | **************************************************/ |
| 619 | |
| 620 | |
| 580 | 621 | READ8_MEMBER(magicfly_state::mux_port_r) |
| 581 | 622 | { |
| 582 | 623 | switch( m_input_selector ) |
| r20314 | r20315 | |
| 611 | 652 | } |
| 612 | 653 | |
| 613 | 654 | |
| 614 | | /************************* |
| 615 | | * Memory map information * |
| 616 | | *************************/ |
| 655 | /********************************************* |
| 656 | * Memory map information * |
| 657 | *********************************************/ |
| 617 | 658 | |
| 618 | 659 | static ADDRESS_MAP_START( magicfly_map, AS_PROGRAM, 8, magicfly_state ) |
| 619 | 660 | AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") /* MK48Z02B NVRAM */ |
| r20314 | r20315 | |
| 627 | 668 | ADDRESS_MAP_END |
| 628 | 669 | |
| 629 | 670 | |
| 630 | | /************************* |
| 631 | | * Input ports * |
| 632 | | *************************/ |
| 671 | /********************************************* |
| 672 | * Input ports * |
| 673 | *********************************************/ |
| 633 | 674 | |
| 634 | 675 | static INPUT_PORTS_START( magicfly ) |
| 635 | 676 | /* Multiplexed 4 x 5 bits. |
| r20314 | r20315 | |
| 769 | 810 | R2 0 0 0 0 0 |
| 770 | 811 | R3 0 0 0 0 0 |
| 771 | 812 | R4 0 0 0 0 0 |
| 813 | |
| 814 | R4C1 + R4C5 to exit... |
| 772 | 815 | */ |
| 773 | 816 | PORT_START("IN0-0") |
| 774 | 817 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) // input test R1C1 (coin 1) |
| r20314 | r20315 | |
| 801 | 844 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 802 | 845 | |
| 803 | 846 | PORT_START("IN0-3") |
| 804 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) // input test R4C1 (start/deal) |
| 805 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // input test R4C2 (cancel) |
| 806 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) // input test R4C3 (service/test) |
| 807 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // input test R4C4 (d-up) |
| 847 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") // input test R4C1 (start/deal) |
| 848 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // input test R4C2 (cancel) |
| 849 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) // input test R4C3 (service/test) |
| 850 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // input test R4C4 (d-up) |
| 808 | 851 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 809 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // input test R4C5 (bet) |
| 852 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // input test R4C5 (bet) |
| 810 | 853 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 811 | 854 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 812 | 855 | |
| r20314 | r20315 | |
| 831 | 874 | INPUT_PORTS_END |
| 832 | 875 | |
| 833 | 876 | |
| 834 | | /************************* |
| 835 | | * Graphics Layouts * |
| 836 | | *************************/ |
| 877 | /********************************************* |
| 878 | * Graphics Layouts * |
| 879 | *********************************************/ |
| 837 | 880 | |
| 838 | 881 | static const gfx_layout tilelayout = |
| 839 | 882 | { |
| r20314 | r20315 | |
| 858 | 901 | }; |
| 859 | 902 | |
| 860 | 903 | |
| 861 | | /****************************** |
| 862 | | * Graphics Decode Information * |
| 863 | | ******************************/ |
| 904 | /************************************************** |
| 905 | * Graphics Decode Information * |
| 906 | **************************************************/ |
| 864 | 907 | |
| 865 | 908 | static GFXDECODE_START( magicfly ) |
| 866 | 909 | GFXDECODE_ENTRY( "gfxbnk1", 0, tilelayout, 16, 1 ) |
| r20314 | r20315 | |
| 868 | 911 | GFXDECODE_END |
| 869 | 912 | |
| 870 | 913 | |
| 871 | | /************************ |
| 872 | | * CRTC Interface * |
| 873 | | ************************/ |
| 914 | /******************************************** |
| 915 | * CRTC Interface * |
| 916 | ********************************************/ |
| 874 | 917 | |
| 875 | 918 | static MC6845_INTERFACE( mc6845_intf ) |
| 876 | 919 | { |
| r20314 | r20315 | |
| 888 | 931 | }; |
| 889 | 932 | |
| 890 | 933 | |
| 891 | | /************************* |
| 892 | | * Machine Drivers * |
| 893 | | *************************/ |
| 934 | /********************************************* |
| 935 | * Machine Drivers * |
| 936 | *********************************************/ |
| 894 | 937 | |
| 895 | 938 | static MACHINE_CONFIG_START( magicfly, magicfly_state ) |
| 896 | 939 | |
| r20314 | r20315 | |
| 911 | 954 | |
| 912 | 955 | MCFG_GFXDECODE(magicfly) |
| 913 | 956 | MCFG_PALETTE_LENGTH(32) |
| 957 | MCFG_PALETTE_INIT_OVERRIDE(magicfly_state, magicfly) |
| 914 | 958 | |
| 915 | | |
| 916 | 959 | MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */ |
| 917 | 960 | |
| 918 | 961 | /* sound hardware */ |
| 919 | 962 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 920 | 963 | MCFG_DAC_ADD("dac") |
| 921 | 964 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 965 | |
| 922 | 966 | MACHINE_CONFIG_END |
| 923 | 967 | |
| 968 | |
| 924 | 969 | static MACHINE_CONFIG_DERIVED( 7mezzo, magicfly ) |
| 925 | 970 | |
| 926 | | /* basic machine hardware */ |
| 927 | | |
| 928 | 971 | /* video hardware */ |
| 929 | 972 | MCFG_VIDEO_START_OVERRIDE(magicfly_state,7mezzo) |
| 930 | 973 | |
| 931 | 974 | MACHINE_CONFIG_END |
| 932 | 975 | |
| 933 | 976 | |
| 934 | | /************************* |
| 935 | | * Rom Load * |
| 936 | | *************************/ |
| 977 | static MACHINE_CONFIG_DERIVED( bchance, magicfly ) |
| 937 | 978 | |
| 979 | /* video hardware */ |
| 980 | MCFG_PALETTE_INIT_OVERRIDE(magicfly_state, bchance) |
| 981 | |
| 982 | MACHINE_CONFIG_END |
| 983 | |
| 984 | |
| 985 | /********************************************* |
| 986 | * Rom Load * |
| 987 | *********************************************/ |
| 988 | |
| 938 | 989 | ROM_START( magicfly ) |
| 939 | 990 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 940 | 991 | ROM_LOAD( "magicfly3_3.bin", 0xc000, 0x4000, CRC(c29798d5) SHA1(bf92ac93d650398569b3ab79d01344e74a6d35be) ) |
| r20314 | r20315 | |
| 945 | 996 | ROM_LOAD( "magicfly0.bin", 0x4000, 0x2000, CRC(44e3c9d6) SHA1(677d25360d261bf2400f399b8015eeb529ad405e) ) |
| 946 | 997 | |
| 947 | 998 | ROM_REGION( 0x0800, "gfxbnk0", 0 ) |
| 948 | | // ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */ |
| 949 | 999 | ROM_COPY( "gfx", 0x1800, 0x0000, 0x0800 ) /* chars */ |
| 950 | 1000 | |
| 951 | 1001 | ROM_REGION( 0x1800, "gfxbnk1", 0 ) |
| r20314 | r20315 | |
| 968 | 1018 | ROM_LOAD( "ns0.bin", 0x4000, 0x2000, CRC(e04fb210) SHA1(81e764e296fe387daf8ca67064d5eba2a4fc3c26) ) /* Renamed as ns0.bin regarding pcb location and content */ |
| 969 | 1019 | |
| 970 | 1020 | ROM_REGION( 0x0800, "gfxbnk0", 0 ) |
| 971 | | // ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */ |
| 972 | 1021 | ROM_COPY( "gfx", 0x1800, 0x0000, 0x0800 ) /* chars */ |
| 973 | 1022 | |
| 974 | 1023 | ROM_REGION( 0x1800, "gfxbnk1", 0 ) |
| r20314 | r20315 | |
| 984 | 1033 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 985 | 1034 | ROM_LOAD( "v-pk-4gag.bin", 0xc000, 0x4000, CRC(7c2dd908) SHA1(97b1390fb4c8c838a0d5b78d6904d597a9abe27f) ) |
| 986 | 1035 | |
| 987 | | ROM_REGION( 0x6000, "gfx", 0 ) |
| 988 | | ROM_LOAD( "n-pk-2.bin", 0x0000, 0x2000, BAD_DUMP CRC(462c3dd7) SHA1(fb30d6147e0d607b3fb631d8bdca35e98eccfd2d) ) // from an exhaustive analysis of 25 different bad dumps |
| 1036 | ROM_REGION( 0x6000, "gfx", 0 ) /* ROM n-pk-2.bin was created from an exhaustive analysis of 25 different bad dumps */ |
| 1037 | ROM_LOAD( "n-pk-2.bin", 0x0000, 0x2000, BAD_DUMP CRC(462c3dd7) SHA1(fb30d6147e0d607b3fb631d8bdca35e98eccfd2d) ) |
| 989 | 1038 | ROM_LOAD( "n-pk-1.bin", 0x2000, 0x2000, CRC(e35cebd6) SHA1(b0dd86fd4c06f98e486b04e09808985bfa4f0e9c) ) |
| 990 | 1039 | ROM_LOAD( "n-pk-0.bin", 0x4000, 0x2000, CRC(3c64edc4) SHA1(97b677b7c4999b502ab4b4f70c33b40050843796) ) |
| 991 | 1040 | |
| 992 | 1041 | ROM_REGION( 0x0800, "gfxbnk0", 0 ) |
| 993 | | // ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */ |
| 994 | 1042 | ROM_COPY( "gfx", 0x1800, 0x0000, 0x0800 ) /* chars */ |
| 995 | 1043 | |
| 996 | 1044 | ROM_REGION( 0x1800, "gfxbnk1", 0 ) |
| r20314 | r20315 | |
| 999 | 1047 | ROM_COPY( "gfx", 0x5800, 0x1000, 0x0800 ) /* 3bpp tiles, bitplane 3 */ |
| 1000 | 1048 | |
| 1001 | 1049 | ROM_REGION( 0x0200, "plds", 0 ) |
| 1002 | | ROM_LOAD( "gal16v8-bchance.bin", 0x0000, 0x0104, NO_DUMP ) // protected. |
| 1050 | ROM_LOAD( "gal16v8-bchance.bin", 0x0000, 0x0104, NO_DUMP ) /* protected */ |
| 1003 | 1051 | ROM_END |
| 1004 | 1052 | |
| 1005 | 1053 | |
| 1006 | | /************************* |
| 1007 | | * Game Drivers * |
| 1008 | | *************************/ |
| 1054 | /********************************************* |
| 1055 | * Game Drivers * |
| 1056 | *********************************************/ |
| 1009 | 1057 | |
| 1010 | 1058 | /* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ |
| 1011 | 1059 | GAME( 198?, magicfly, 0, magicfly, magicfly, driver_device, 0, ROT0, "P&A Games", "Magic Fly", 0 ) |
| 1012 | 1060 | GAME( 198?, 7mezzo, 0, 7mezzo, 7mezzo, driver_device, 0, ROT0, "<unknown>", "7 e Mezzo", 0 ) |
| 1013 | | GAME( 198?, bchance, 0, magicfly, bchance, driver_device, 0, ROT0, "<unknown>", "Bonne Chance! (French/English)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_GRAPHICS ) |
| 1061 | GAME( 198?, bchance, 0, bchance, bchance, driver_device, 0, ROT0, "<unknown>", "Bonne Chance! (French/English)", GAME_IMPERFECT_GRAPHICS ) |