Previous 199869 Revisions Next

r20315 Friday 18th January, 2013 at 02:01:23 UTC by Roberto Fresca
Bonne Chance!: Added proper palette. Now the game seems to get accurate colors.
Also added some descriptive notes and instructions for the service mode. [Roberto Fresca]
[src/mame/drivers]magicfly.c

trunk/src/mame/drivers/magicfly.c
r20314r20315
332332    titled 'BONNE CHANCE!'. Turning the 4th DIP switch ON, the game switch to English,
333333   and the title changes to 'GOOD LUCK!' (as the above mentioned games).
334334
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....
335340
341
336342*******************************************************************************
337343
338344
r20314r20315
412418    - Added Bonne Chance!. A French/English poker game prototype of
413419      the well known 'Golden Poker' and 'Jack Potten Poker'.
414420    - Worked complete inputs from the scratch. Promoted to working.
421    - Added proper palette. Now the game seems to get accurate colors.
415422    - Added some notes.
416423
417424
418425    TODO:
419426
420    - Palette for Bonne Chance!.
421427    - Simplify the gfx banks to avoid a custom palette.
422428    - Document the correct pinout.
423429    - Analyze the PLD. Try to reconstruct the original equations.
r20314r20315
455461   TILE_GET_INFO_MEMBER(get_magicfly_tile_info);
456462   TILE_GET_INFO_MEMBER(get_7mezzo_tile_info);
457463   virtual void video_start();
458   virtual void palette_init();
464   DECLARE_PALETTE_INIT(magicfly);
465   DECLARE_PALETTE_INIT(bchance);
459466   DECLARE_VIDEO_START(7mezzo);
460467   UINT32 screen_update_magicfly(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
461468};
462469
463470
464/*************************
465*     Video Hardware     *
466*************************/
471/*********************************************
472*               Video Hardware               *
473*********************************************/
467474
468475
469476WRITE8_MEMBER(magicfly_state::magicfly_videoram_w)
r20314r20315
478485   m_bg_tilemap->mark_tile_dirty(offset);
479486}
480487
488
481489TILE_GET_INFO_MEMBER(magicfly_state::get_magicfly_tile_info)
482490{
483491/*  - bits -
r20314r20315
508516   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);
509517}
510518
519
511520TILE_GET_INFO_MEMBER(magicfly_state::get_7mezzo_tile_info)
512521{
513522/*  - bits -
r20314r20315
538547   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);
539548}
540549
550
541551UINT32 magicfly_state::screen_update_magicfly(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
542552{
543553   m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
544554   return 0;
545555}
546556
547void magicfly_state::palette_init()
557
558PALETTE_INIT_MEMBER(magicfly_state, magicfly)
548559{
549560   int i;
550561
r20314r20315
571582   }
572583}
573584
585PALETTE_INIT_MEMBER(magicfly_state, bchance)
586{
587   int i;
574588
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));
578600
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   }
579610
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
580621READ8_MEMBER(magicfly_state::mux_port_r)
581622{
582623   switch( m_input_selector )
r20314r20315
611652}
612653
613654
614/*************************
615* Memory map information *
616*************************/
655/*********************************************
656*           Memory map information           *
657*********************************************/
617658
618659static ADDRESS_MAP_START( magicfly_map, AS_PROGRAM, 8, magicfly_state )
619660   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram")    /* MK48Z02B NVRAM */
r20314r20315
627668ADDRESS_MAP_END
628669
629670
630/*************************
631*      Input ports       *
632*************************/
671/*********************************************
672*                Input ports                 *
673*********************************************/
633674
634675static INPUT_PORTS_START( magicfly )
635676/*  Multiplexed 4 x 5 bits.
r20314r20315
769810    R2  0  0  0  0  0
770811    R3  0  0  0  0  0
771812    R4  0  0  0  0  0
813
814    R4C1 + R4C5 to exit...
772815*/
773816   PORT_START("IN0-0")
774817   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )                                 // input test R1C1 (coin 1)
r20314r20315
801844   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
802845
803846   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)
808851   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)
810853   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
811854   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
812855
r20314r20315
831874INPUT_PORTS_END
832875
833876
834/*************************
835*    Graphics Layouts    *
836*************************/
877/*********************************************
878*              Graphics Layouts              *
879*********************************************/
837880
838881static const gfx_layout tilelayout =
839882{
r20314r20315
858901};
859902
860903
861/******************************
862* Graphics Decode Information *
863******************************/
904/**************************************************
905*           Graphics Decode Information           *
906**************************************************/
864907
865908static GFXDECODE_START( magicfly )
866909   GFXDECODE_ENTRY( "gfxbnk1", 0, tilelayout, 16, 1 )
r20314r20315
868911GFXDECODE_END
869912
870913
871/************************
872*    CRTC Interface    *
873************************/
914/********************************************
915*              CRTC Interface               *
916********************************************/
874917
875918static MC6845_INTERFACE( mc6845_intf )
876919{
r20314r20315
888931};
889932
890933
891/*************************
892*    Machine Drivers     *
893*************************/
934/*********************************************
935*              Machine Drivers               *
936*********************************************/
894937
895938static MACHINE_CONFIG_START( magicfly, magicfly_state )
896939
r20314r20315
911954
912955   MCFG_GFXDECODE(magicfly)
913956   MCFG_PALETTE_LENGTH(32)
957   MCFG_PALETTE_INIT_OVERRIDE(magicfly_state, magicfly)
914958
915
916959   MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/16, mc6845_intf) /* guess */
917960
918961   /* sound hardware */
919962   MCFG_SPEAKER_STANDARD_MONO("mono")
920963   MCFG_DAC_ADD("dac")
921964   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
965
922966MACHINE_CONFIG_END
923967
968
924969static MACHINE_CONFIG_DERIVED( 7mezzo, magicfly )
925970
926   /* basic machine hardware */
927
928971   /* video hardware */
929972   MCFG_VIDEO_START_OVERRIDE(magicfly_state,7mezzo)
930973
931974MACHINE_CONFIG_END
932975
933976
934/*************************
935*        Rom Load        *
936*************************/
977static MACHINE_CONFIG_DERIVED( bchance, magicfly )
937978
979   /* video hardware */
980   MCFG_PALETTE_INIT_OVERRIDE(magicfly_state, bchance)
981
982MACHINE_CONFIG_END
983
984
985/*********************************************
986*                  Rom Load                  *
987*********************************************/
988
938989ROM_START( magicfly )
939990   ROM_REGION( 0x10000, "maincpu", 0 )
940991   ROM_LOAD( "magicfly3_3.bin",    0xc000, 0x4000, CRC(c29798d5) SHA1(bf92ac93d650398569b3ab79d01344e74a6d35be) )
r20314r20315
945996   ROM_LOAD( "magicfly0.bin",  0x4000, 0x2000, CRC(44e3c9d6) SHA1(677d25360d261bf2400f399b8015eeb529ad405e) )
946997
947998   ROM_REGION( 0x0800, "gfxbnk0", 0 )
948//  ROM_FILL(           0x0000, 0x1000, 0 )         /* filling the R-G bitplanes */
949999   ROM_COPY( "gfx",    0x1800, 0x0000, 0x0800 )    /* chars */
9501000
9511001   ROM_REGION( 0x1800, "gfxbnk1", 0 )
r20314r20315
9681018   ROM_LOAD( "ns0.bin",    0x4000, 0x2000, CRC(e04fb210) SHA1(81e764e296fe387daf8ca67064d5eba2a4fc3c26) )    /* Renamed as ns0.bin regarding pcb location and content */
9691019
9701020   ROM_REGION( 0x0800, "gfxbnk0", 0 )
971//  ROM_FILL(           0x0000, 0x1000, 0 )         /* filling the R-G bitplanes */
9721021   ROM_COPY( "gfx",    0x1800, 0x0000, 0x0800 )    /* chars */
9731022
9741023   ROM_REGION( 0x1800, "gfxbnk1", 0 )
r20314r20315
9841033   ROM_REGION( 0x10000, "maincpu", 0 )
9851034   ROM_LOAD( "v-pk-4gag.bin",   0xc000, 0x4000, CRC(7c2dd908) SHA1(97b1390fb4c8c838a0d5b78d6904d597a9abe27f) )
9861035
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) )
9891038   ROM_LOAD( "n-pk-1.bin",   0x2000, 0x2000, CRC(e35cebd6) SHA1(b0dd86fd4c06f98e486b04e09808985bfa4f0e9c) )
9901039   ROM_LOAD( "n-pk-0.bin",   0x4000, 0x2000, CRC(3c64edc4) SHA1(97b677b7c4999b502ab4b4f70c33b40050843796) )
9911040
9921041   ROM_REGION( 0x0800, "gfxbnk0", 0 )
993//  ROM_FILL(           0x0000, 0x1000, 0 )         /* filling the R-G bitplanes */
9941042   ROM_COPY( "gfx",   0x1800, 0x0000, 0x0800 )   /* chars */
9951043
9961044   ROM_REGION( 0x1800, "gfxbnk1", 0 )
r20314r20315
9991047   ROM_COPY( "gfx",   0x5800, 0x1000, 0x0800 )   /* 3bpp tiles, bitplane 3 */
10001048
10011049   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 */
10031051ROM_END
10041052
10051053
1006/*************************
1007*      Game Drivers      *
1008*************************/
1054/*********************************************
1055*                Game Drivers                *
1056*********************************************/
10091057
10101058/*    YEAR  NAME      PARENT  MACHINE   INPUT     STATE          INIT   ROT    COMPANY      FULLNAME                         FLAGS... */
10111059GAME( 198?, magicfly, 0,      magicfly, magicfly, driver_device, 0,     ROT0, "P&A Games", "Magic Fly",                      0 )
10121060GAME( 198?, 7mezzo,   0,      7mezzo,   7mezzo,   driver_device, 0,     ROT0, "<unknown>", "7 e Mezzo",                      0 )
1013GAME( 198?, bchance,  0,      magicfly, bchance,  driver_device, 0,     ROT0, "<unknown>", "Bonne Chance! (French/English)", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_GRAPHICS )
1061GAME( 198?, bchance,  0,      bchance, bchance,  driver_device, 0,     ROT0, "<unknown>", "Bonne Chance! (French/English)", GAME_IMPERFECT_GRAPHICS )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team