trunk/src/mame/drivers/snowbros.c
| r243531 | r243532 | |
| 450 | 450 | } |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | | void snowbros_state::sb3_play_sound (okim6295_device *oki, int data) |
| 453 | void snowbros_state::sb3_play_sound (int data) |
| 454 | 454 | { |
| 455 | | int status = oki->read_status(); |
| 455 | int status = m_oki->read_status(); |
| 456 | 456 | |
| 457 | 457 | if ((status&0x01)==0x00) |
| 458 | 458 | { |
| 459 | | oki->write_command(0x80|data); |
| 460 | | oki->write_command(0x00|0x12); |
| 459 | m_oki->write_command(0x80|data); |
| 460 | m_oki->write_command(0x00|0x12); |
| 461 | 461 | } |
| 462 | 462 | else if ((status&0x02)==0x00) |
| 463 | 463 | { |
| 464 | | oki->write_command(0x80|data); |
| 465 | | oki->write_command(0x00|0x22); |
| 464 | m_oki->write_command(0x80|data); |
| 465 | m_oki->write_command(0x00|0x22); |
| 466 | 466 | } |
| 467 | 467 | else if ((status&0x04)==0x00) |
| 468 | 468 | { |
| 469 | | oki->write_command(0x80|data); |
| 470 | | oki->write_command(0x00|0x42); |
| 469 | m_oki->write_command(0x80|data); |
| 470 | m_oki->write_command(0x00|0x42); |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | |
| r243531 | r243532 | |
| 486 | 486 | |
| 487 | 487 | if (data <= 0x21) |
| 488 | 488 | { |
| 489 | | sb3_play_sound(m_oki, data); |
| 489 | sb3_play_sound(data); |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | 492 | if (data>=0x22 && data<=0x31) |
| r243531 | r243532 | |
| 496 | 496 | |
| 497 | 497 | if ((data>=0x30) && (data<=0x51)) |
| 498 | 498 | { |
| 499 | | sb3_play_sound(m_oki, data-0x30); |
| 499 | sb3_play_sound(data-0x30); |
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | if (data>=0x52 && data<=0x5f) |
| r243531 | r243532 | |
| 2853 | 2853 | buffer[i] = src[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,3,4,1,2,0)]; |
| 2854 | 2854 | memcpy(src,buffer,len); |
| 2855 | 2855 | } |
| 2856 | |
| 2857 | save_item(NAME(m_sb3_music_is_playing)); |
| 2858 | save_item(NAME(m_sb3_music)); |
| 2856 | 2859 | } |
| 2857 | 2860 | |
| 2858 | 2861 | READ16_MEMBER(snowbros_state::_3in1_read) |
| r243531 | r243532 | |
| 2913 | 2916 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x500006, 0x500007, read16_delegate(FUNC(snowbros_state::toto_read),this)); |
| 2914 | 2917 | } |
| 2915 | 2918 | |
| 2919 | DRIVER_INIT_MEMBER(snowbros_state, hyperpac) |
| 2920 | { |
| 2921 | save_item(NAME(m_semicom_prot_offset)); |
| 2922 | } |
| 2916 | 2923 | |
| 2917 | 2924 | |
| 2918 | | GAME( 1990, snowbros, 0, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 1)", 0 ) |
| 2919 | | GAME( 1990, snowbrosa, snowbros, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 2)", 0 ) |
| 2920 | | GAME( 1990, snowbrosb, snowbros, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 3)", 0 ) |
| 2921 | | GAME( 1990, snowbrosc, snowbros, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 4)", 0 ) |
| 2922 | | GAME( 1990, snowbrosj, snowbros, snowbros, snowbroj, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (Japan)", 0 ) |
| 2923 | | GAME( 1990, snowbrosd, snowbros, snowbros, snowbroj, driver_device, 0, ROT0, "Toaplan (Dooyong license)", "Snow Bros. - Nick & Tom (Dooyong license)", 0 ) |
| 2924 | | GAME( 1990, wintbob, snowbros, wintbob, snowbros, driver_device, 0, ROT0, "bootleg (Sakowa Project Korea)", "The Winter Bobble (bootleg of Snow Bros.)", 0 ) |
| 2925 | | GAME( 1990, snowbroswb,snowbros, wintbob, snowbros, driver_device, 0, ROT0, "bootleg", "Snow Bros. - Nick & Tom (The Winter Bobble hardware bootleg)", 0 ) // this was probably unhacked back from the more common Winter Bobble to make it look more original |
| 2925 | GAME( 1990, snowbros, 0, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 1)", GAME_SUPPORTS_SAVE ) |
| 2926 | GAME( 1990, snowbrosa, snowbros, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 2)", GAME_SUPPORTS_SAVE ) |
| 2927 | GAME( 1990, snowbrosb, snowbros, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 3)", GAME_SUPPORTS_SAVE ) |
| 2928 | GAME( 1990, snowbrosc, snowbros, snowbros, snowbros, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (set 4)", GAME_SUPPORTS_SAVE ) |
| 2929 | GAME( 1990, snowbrosj, snowbros, snowbros, snowbroj, driver_device, 0, ROT0, "Toaplan", "Snow Bros. - Nick & Tom (Japan)", GAME_SUPPORTS_SAVE ) |
| 2930 | GAME( 1990, snowbrosd, snowbros, snowbros, snowbroj, driver_device, 0, ROT0, "Toaplan (Dooyong license)", "Snow Bros. - Nick & Tom (Dooyong license)", GAME_SUPPORTS_SAVE ) |
| 2931 | GAME( 1990, wintbob, snowbros, wintbob, snowbros, driver_device, 0, ROT0, "bootleg (Sakowa Project Korea)", "The Winter Bobble (bootleg of Snow Bros.)", GAME_SUPPORTS_SAVE ) |
| 2932 | GAME( 1990, snowbroswb,snowbros, wintbob, snowbros, driver_device, 0, ROT0, "bootleg", "Snow Bros. - Nick & Tom (The Winter Bobble hardware bootleg)", GAME_SUPPORTS_SAVE ) // this was probably unhacked back from the more common Winter Bobble to make it look more original |
| 2926 | 2933 | |
| 2927 | | GAME( 1996, toto, 0, snowbros, snowbros, snowbros_state, toto, ROT0, "SoftClub", "Come Back Toto", 0 ) // modified from 'snowbros' code |
| 2934 | GAME( 1996, toto, 0, snowbros, snowbros, snowbros_state, toto, ROT0, "SoftClub", "Come Back Toto", GAME_SUPPORTS_SAVE ) // modified from 'snowbros' code |
| 2928 | 2935 | |
| 2929 | 2936 | // none of the games below are on genuine SnowBros hardware, but they clone the functionality of it. |
| 2930 | 2937 | |
| 2931 | 2938 | // SemiCom / Jeil titles are protected, a dumb MCU copies code into RAM at startup, some also check for a specific return value from an address on startup. |
| 2932 | | GAME( 1993, finalttr, 0, finalttr, finalttr, driver_device, 0, ROT0, "Jeil Computer System", "Final Tetris", 0 ) |
| 2933 | | GAME( 1995, hyperpac, 0, semicom_mcu, hyperpac, driver_device, 0, ROT0, "SemiCom", "Hyper Pacman", 0 ) |
| 2934 | | GAME( 1995, hyperpacb,hyperpac, semicom, hyperpac, driver_device, 0, ROT0, "bootleg", "Hyper Pacman (bootleg)", 0 ) |
| 2935 | | GAME( 1996, cookbib2, 0, semiprot, cookbib2, snowbros_state, cookbib2, ROT0, "SemiCom", "Cookie & Bibi 2", 0 ) |
| 2936 | | GAME( 1996, toppyrap, 0, semiprot, toppyrap, driver_device, 0, ROT0, "SemiCom", "Toppy & Rappy", 0 ) |
| 2937 | | GAME( 1997, cookbib3, 0, semiprot, cookbib3, snowbros_state, cookbib3, ROT0, "SemiCom", "Cookie & Bibi 3", 0 ) |
| 2938 | | GAME( 1997, 3in1semi, 0, semiprot, moremore, snowbros_state, 3in1semi, ROT0, "SemiCom", "XESS - The New Revolution (SemiCom 3-in-1)", 0 ) |
| 2939 | | GAME( 1997, twinkle, 0, semiprot, twinkle, driver_device, 0, ROT0, "SemiCom", "Twinkle", 0 ) |
| 2940 | | GAME( 1997, pzlbreak, 0, semiprot, pzlbreak, snowbros_state, pzlbreak, ROT0, "SemiCom", "Puzzle Break", 0 ) |
| 2941 | | GAME( 1999, moremore, 0, semiprot, moremore, snowbros_state, moremorp, ROT0, "SemiCom / Exit", "More More", 0 ) |
| 2942 | | GAME( 1999, moremorp, 0, semiprot, moremore, snowbros_state, moremorp, ROT0, "SemiCom / Exit", "More More Plus", 0 ) |
| 2943 | | GAME( 1997, suhosong, 0, semiprot, suhosong, driver_device, 0, ROT0, "SemiCom", "Su Ho Seong", 0 ) |
| 2939 | GAME( 1993, finalttr, 0, finalttr, finalttr, driver_device, 0, ROT0, "Jeil Computer System", "Final Tetris", GAME_SUPPORTS_SAVE ) |
| 2940 | GAME( 1995, hyperpac, 0, semicom_mcu, hyperpac, snowbros_state, hyperpac, ROT0, "SemiCom", "Hyper Pacman", GAME_SUPPORTS_SAVE ) |
| 2941 | GAME( 1995, hyperpacb,hyperpac, semicom, hyperpac, driver_device, 0, ROT0, "bootleg", "Hyper Pacman (bootleg)", GAME_SUPPORTS_SAVE ) |
| 2942 | GAME( 1996, cookbib2, 0, semiprot, cookbib2, snowbros_state, cookbib2, ROT0, "SemiCom", "Cookie & Bibi 2", GAME_SUPPORTS_SAVE ) |
| 2943 | GAME( 1996, toppyrap, 0, semiprot, toppyrap, driver_device, 0, ROT0, "SemiCom", "Toppy & Rappy", GAME_SUPPORTS_SAVE ) |
| 2944 | GAME( 1997, cookbib3, 0, semiprot, cookbib3, snowbros_state, cookbib3, ROT0, "SemiCom", "Cookie & Bibi 3", GAME_SUPPORTS_SAVE ) |
| 2945 | GAME( 1997, 3in1semi, 0, semiprot, moremore, snowbros_state, 3in1semi, ROT0, "SemiCom", "XESS - The New Revolution (SemiCom 3-in-1)", GAME_SUPPORTS_SAVE ) |
| 2946 | GAME( 1997, twinkle, 0, semiprot, twinkle, driver_device, 0, ROT0, "SemiCom", "Twinkle", GAME_SUPPORTS_SAVE ) |
| 2947 | GAME( 1997, pzlbreak, 0, semiprot, pzlbreak, snowbros_state, pzlbreak, ROT0, "SemiCom", "Puzzle Break", GAME_SUPPORTS_SAVE ) |
| 2948 | GAME( 1999, moremore, 0, semiprot, moremore, snowbros_state, moremorp, ROT0, "SemiCom / Exit", "More More", GAME_SUPPORTS_SAVE ) |
| 2949 | GAME( 1999, moremorp, 0, semiprot, moremore, snowbros_state, moremorp, ROT0, "SemiCom / Exit", "More More Plus", GAME_SUPPORTS_SAVE ) |
| 2950 | GAME( 1997, suhosong, 0, semiprot, suhosong, driver_device, 0, ROT0, "SemiCom", "Su Ho Seong", GAME_SUPPORTS_SAVE ) |
| 2944 | 2951 | // This is very similar to the SemiCom titles, but unprotected. |
| 2945 | | GAME( 2002, 4in1boot, 0, _4in1, 4in1boot, snowbros_state, 4in1boot, ROT0, "K1 Soft", "Puzzle King (PacMan 2, Tetris, HyperMan 2, Snow Bros.)" , 0) |
| 2952 | GAME( 2002, 4in1boot, 0, _4in1, 4in1boot, snowbros_state, 4in1boot, ROT0, "K1 Soft", "Puzzle King (PacMan 2, Tetris, HyperMan 2, Snow Bros.)" , GAME_SUPPORTS_SAVE ) |
| 2946 | 2953 | |
| 2947 | | GAME( 1995, honeydol, 0, honeydol, honeydol, driver_device, 0, ROT0, "Barko Corp.", "Honey Dolls", 0 ) // based on snowbros code.. |
| 2954 | GAME( 1995, honeydol, 0, honeydol, honeydol, driver_device, 0, ROT0, "Barko Corp.", "Honey Dolls", GAME_SUPPORTS_SAVE ) // based on snowbros code.. |
| 2948 | 2955 | |
| 2949 | | GAME( 1995, twinadv, 0, twinadv, twinadv, driver_device, 0, ROT0, "Barko Corp.", "Twin Adventure (World)", 0 ) |
| 2950 | | GAME( 1995, twinadvk, twinadv, twinadv, twinadv, driver_device, 0, ROT0, "Barko Corp.", "Twin Adventure (Korea)", 0 ) |
| 2956 | GAME( 1995, twinadv, 0, twinadv, twinadv, driver_device, 0, ROT0, "Barko Corp.", "Twin Adventure (World)", GAME_SUPPORTS_SAVE ) |
| 2957 | GAME( 1995, twinadvk, twinadv, twinadv, twinadv, driver_device, 0, ROT0, "Barko Corp.", "Twin Adventure (Korea)", GAME_SUPPORTS_SAVE ) |
| 2951 | 2958 | |
| 2952 | 2959 | // The Korean games database shows an earlier version of this called Ball Boy with a different title screen to the version of Ball Boy we have |
| 2953 | 2960 | // http://mamedev.emulab.it/undumped/images/Ballboy.jpg |
| 2954 | 2961 | // it is possible this 'ball boy' is the original bootleg, with snwobro3 being a hack of that, and the ballboy set we have a further hack of that |
| 2955 | 2962 | // there is also a later 2004 version with 3 player support |
| 2956 | 2963 | // these use an MCU to drive the sound |
| 2957 | | GAME( 2002, snowbro3, 0, snowbro3, snowbroj, snowbros_state, snowbro3, ROT0, "Syrmex", "Snow Brothers 3 - Magical Adventure", GAME_IMPERFECT_SOUND ) // hacked from SnowBros code but released as an original game |
| 2958 | | GAME( 2003, ballboy, snowbro3, snowbro3, snowbroj, snowbros_state, snowbro3, ROT0, "bootleg", "Ball Boy", GAME_IMPERFECT_SOUND ) |
| 2964 | GAME( 2002, snowbro3, 0, snowbro3, snowbroj, snowbros_state, snowbro3, ROT0, "Syrmex", "Snow Brothers 3 - Magical Adventure", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // hacked from SnowBros code but released as an original game |
| 2965 | GAME( 2003, ballboy, snowbro3, snowbro3, snowbroj, snowbros_state, snowbro3, ROT0, "bootleg", "Ball Boy", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |