trunk/src/mame/drivers/tsamurai.c
| r244856 | r244857 | |
| 13 | 13 | character column scroll feature that I have added. Its used to scroll in |
| 14 | 14 | the "660" logo on the title screen at the beginning. Not sure if Samurai |
| 15 | 15 | at al use it but it's likely their boards have the feature. Extra banking |
| 16 | | of the forground is done using an extra register. A bit in the background |
| 16 | of the foreground is done using an extra register. A bit in the background |
| 17 | 17 | video RAM selects the additional background character space. |
| 18 | 18 | |
| 19 | 19 | The sound board is similar. There are 3 CPU's instead of the 2 of Samurai. |
| r244856 | r244857 | |
| 41 | 41 | #include "includes/tsamurai.h" |
| 42 | 42 | |
| 43 | 43 | |
| 44 | void tsamurai_state::machine_start() |
| 45 | { |
| 46 | save_item(NAME(m_nmi_enabled)); |
| 47 | } |
| 48 | |
| 49 | MACHINE_START_MEMBER(tsamurai_state, tsamurai) |
| 50 | { |
| 51 | save_item(NAME(m_sound_command1)); |
| 52 | save_item(NAME(m_sound_command2)); |
| 53 | machine_start(); |
| 54 | } |
| 55 | |
| 56 | MACHINE_START_MEMBER(tsamurai_state, m660) |
| 57 | { |
| 58 | MACHINE_START_CALL_MEMBER(tsamurai); |
| 59 | save_item(NAME(m_sound_command3)); |
| 60 | } |
| 61 | |
| 62 | MACHINE_START_MEMBER(tsamurai_state, vsgongf) |
| 63 | { |
| 64 | save_item(NAME(m_vsgongf_sound_nmi_enabled)); |
| 65 | machine_start(); |
| 66 | } |
| 67 | |
| 44 | 68 | WRITE8_MEMBER(tsamurai_state::nmi_enable_w) |
| 45 | 69 | { |
| 46 | 70 | m_nmi_enabled = data; |
| 47 | 71 | } |
| 48 | 72 | |
| 49 | | INTERRUPT_GEN_MEMBER(tsamurai_state::samurai_interrupt) |
| 73 | INTERRUPT_GEN_MEMBER(tsamurai_state::interrupt) |
| 50 | 74 | { |
| 51 | 75 | if (m_nmi_enabled) device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 52 | 76 | } |
| 53 | 77 | |
| 54 | | READ8_MEMBER(tsamurai_state::unknown_d803_r) |
| 78 | READ8_MEMBER(tsamurai_state::tsamurai_unknown_d803_r) |
| 55 | 79 | { |
| 56 | 80 | return 0x6b; |
| 57 | 81 | } |
| 58 | 82 | |
| 59 | | READ8_MEMBER(tsamurai_state::unknown_d803_m660_r) |
| 83 | READ8_MEMBER(tsamurai_state::m660_unknown_d803_r) |
| 60 | 84 | { |
| 61 | 85 | return 0x53; // this is what the bootleg patches in. |
| 62 | 86 | } |
| r244856 | r244857 | |
| 88 | 112 | m_audio2->set_input_line(0, HOLD_LINE ); |
| 89 | 113 | } |
| 90 | 114 | |
| 91 | | WRITE8_MEMBER(tsamurai_state::sound_command3_w) |
| 115 | WRITE8_MEMBER(tsamurai_state::m660_sound_command3_w) |
| 92 | 116 | { |
| 93 | 117 | m_sound_command3 = data; |
| 94 | 118 | m_audio3->set_input_line(0, HOLD_LINE ); |
| r244856 | r244857 | |
| 99 | 123 | flip_screen_set(data); |
| 100 | 124 | } |
| 101 | 125 | |
| 102 | | WRITE8_MEMBER(tsamurai_state::tsamurai_coin_counter_w) |
| 126 | WRITE8_MEMBER(tsamurai_state::coincounter_w) |
| 103 | 127 | { |
| 104 | 128 | coin_counter_w(machine(), offset,data); |
| 105 | 129 | } |
| r244856 | r244857 | |
| 110 | 134 | AM_RANGE(0xc000, 0xcfff) AM_RAM |
| 111 | 135 | |
| 112 | 136 | /* protection? - there are writes as well...*/ |
| 113 | | AM_RANGE(0xd803, 0xd803) AM_READ(unknown_d803_r) |
| 137 | AM_RANGE(0xd803, 0xd803) AM_READ(tsamurai_unknown_d803_r) |
| 114 | 138 | AM_RANGE(0xd806, 0xd806) AM_READ(unknown_d806_r) |
| 115 | 139 | AM_RANGE(0xd900, 0xd900) AM_READ(unknown_d900_r) |
| 116 | 140 | AM_RANGE(0xd938, 0xd938) AM_READ(unknown_d938_r) |
| 117 | 141 | |
| 118 | | AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(tsamurai_fg_videoram_w) AM_SHARE("videoram") |
| 119 | | AM_RANGE(0xe400, 0xe43f) AM_RAM_WRITE(tsamurai_fg_colorram_w) AM_SHARE("colorram") |
| 142 | AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(fg_videoram_w) AM_SHARE("videoram") |
| 143 | AM_RANGE(0xe400, 0xe43f) AM_RAM_WRITE(fg_colorram_w) AM_SHARE("colorram") |
| 120 | 144 | AM_RANGE(0xe440, 0xe7ff) AM_RAM |
| 121 | | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(tsamurai_bg_videoram_w) AM_SHARE("bg_videoram") |
| 145 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(bg_videoram_w) AM_SHARE("bg_videoram") |
| 122 | 146 | AM_RANGE(0xf000, 0xf3ff) AM_RAM AM_SHARE("spriteram") |
| 123 | 147 | |
| 124 | 148 | AM_RANGE(0xf400, 0xf400) AM_WRITENOP |
| r244856 | r244857 | |
| 126 | 150 | AM_RANGE(0xf402, 0xf402) AM_WRITE(sound_command2_w) |
| 127 | 151 | |
| 128 | 152 | AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") |
| 129 | | AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") AM_WRITE(tsamurai_bgcolor_w) |
| 130 | | AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") AM_WRITE(tsamurai_scrolly_w) |
| 131 | | AM_RANGE(0xf803, 0xf803) AM_WRITE(tsamurai_scrollx_w) |
| 153 | AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") AM_WRITE(bgcolor_w) |
| 154 | AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") AM_WRITE(scrolly_w) |
| 155 | AM_RANGE(0xf803, 0xf803) AM_WRITE(scrollx_w) |
| 132 | 156 | AM_RANGE(0xf804, 0xf804) AM_READ_PORT("DSW1") |
| 133 | 157 | AM_RANGE(0xf805, 0xf805) AM_READ_PORT("DSW2") |
| 134 | 158 | |
| 135 | 159 | AM_RANGE(0xfc00, 0xfc00) AM_WRITE(flip_screen_w) |
| 136 | 160 | AM_RANGE(0xfc01, 0xfc01) AM_WRITE(nmi_enable_w) |
| 137 | | AM_RANGE(0xfc02, 0xfc02) AM_WRITE(tsamurai_textbank1_w) |
| 138 | | AM_RANGE(0xfc03, 0xfc04) AM_WRITE(tsamurai_coin_counter_w) |
| 161 | AM_RANGE(0xfc02, 0xfc02) AM_WRITE(textbank1_w) |
| 162 | AM_RANGE(0xfc03, 0xfc04) AM_WRITE(coincounter_w) |
| 139 | 163 | ADDRESS_MAP_END |
| 140 | 164 | |
| 141 | 165 | static ADDRESS_MAP_START( m660_map, AS_PROGRAM, 8, tsamurai_state ) |
| r244856 | r244857 | |
| 143 | 167 | AM_RANGE(0xc000, 0xcfff) AM_RAM |
| 144 | 168 | |
| 145 | 169 | /* protection? - there are writes as well...*/ |
| 146 | | AM_RANGE(0xd803, 0xd803) AM_READ(unknown_d803_m660_r) |
| 170 | AM_RANGE(0xd803, 0xd803) AM_READ(m660_unknown_d803_r) |
| 147 | 171 | AM_RANGE(0xd806, 0xd806) AM_READ(unknown_d806_r) |
| 148 | 172 | AM_RANGE(0xd900, 0xd900) AM_READ(unknown_d900_r) |
| 149 | 173 | AM_RANGE(0xd938, 0xd938) AM_READ(unknown_d938_r) |
| 150 | 174 | |
| 151 | | AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(tsamurai_fg_videoram_w) AM_SHARE("videoram") |
| 152 | | AM_RANGE(0xe400, 0xe43f) AM_RAM_WRITE(tsamurai_fg_colorram_w) AM_SHARE("colorram") |
| 175 | AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(fg_videoram_w) AM_SHARE("videoram") |
| 176 | AM_RANGE(0xe400, 0xe43f) AM_RAM_WRITE(fg_colorram_w) AM_SHARE("colorram") |
| 153 | 177 | AM_RANGE(0xe440, 0xe7ff) AM_RAM |
| 154 | | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(tsamurai_bg_videoram_w) AM_SHARE("bg_videoram") |
| 178 | AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(bg_videoram_w) AM_SHARE("bg_videoram") |
| 155 | 179 | AM_RANGE(0xf000, 0xf3ff) AM_RAM AM_SHARE("spriteram") |
| 156 | 180 | |
| 157 | 181 | AM_RANGE(0xf400, 0xf400) AM_WRITENOP/* This is always written with F401, F402 & F403 data */ |
| 158 | | AM_RANGE(0xf401, 0xf401) AM_WRITE(sound_command3_w) |
| 182 | AM_RANGE(0xf401, 0xf401) AM_WRITE(m660_sound_command3_w) |
| 159 | 183 | AM_RANGE(0xf402, 0xf402) AM_WRITE(sound_command2_w) |
| 160 | 184 | AM_RANGE(0xf403, 0xf403) AM_WRITE(sound_command1_w) |
| 161 | 185 | |
| 162 | 186 | AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") |
| 163 | | AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") AM_WRITE(tsamurai_bgcolor_w) |
| 164 | | AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") AM_WRITE(tsamurai_scrolly_w) |
| 165 | | AM_RANGE(0xf803, 0xf803) AM_WRITE(tsamurai_scrollx_w) |
| 187 | AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") AM_WRITE(bgcolor_w) |
| 188 | AM_RANGE(0xf802, 0xf802) AM_READ_PORT("SYSTEM") AM_WRITE(scrolly_w) |
| 189 | AM_RANGE(0xf803, 0xf803) AM_WRITE(scrollx_w) |
| 166 | 190 | AM_RANGE(0xf804, 0xf804) AM_READ_PORT("DSW1") |
| 167 | 191 | AM_RANGE(0xf805, 0xf805) AM_READ_PORT("DSW2") |
| 168 | 192 | |
| 169 | 193 | AM_RANGE(0xfc00, 0xfc00) AM_WRITE(flip_screen_w) |
| 170 | 194 | AM_RANGE(0xfc01, 0xfc01) AM_WRITE(nmi_enable_w) |
| 171 | | AM_RANGE(0xfc02, 0xfc02) AM_WRITE(tsamurai_textbank1_w) |
| 172 | | AM_RANGE(0xfc03, 0xfc04) AM_WRITE(tsamurai_coin_counter_w) |
| 173 | | AM_RANGE(0xfc07, 0xfc07) AM_WRITE(tsamurai_textbank2_w)/* Mission 660 uses a bit here */ |
| 195 | AM_RANGE(0xfc02, 0xfc02) AM_WRITE(textbank1_w) |
| 196 | AM_RANGE(0xfc03, 0xfc04) AM_WRITE(coincounter_w) |
| 197 | AM_RANGE(0xfc07, 0xfc07) AM_WRITE(m660_textbank2_w)/* Mission 660 uses a bit here */ |
| 174 | 198 | ADDRESS_MAP_END |
| 175 | 199 | |
| 176 | 200 | static ADDRESS_MAP_START( z80_io_map, AS_IO, 8, tsamurai_state ) |
| r244856 | r244857 | |
| 200 | 224 | return m_sound_command2; |
| 201 | 225 | } |
| 202 | 226 | |
| 203 | | READ8_MEMBER(tsamurai_state::sound_command3_r) |
| 227 | READ8_MEMBER(tsamurai_state::m660_sound_command3_r) |
| 204 | 228 | { |
| 205 | 229 | return m_sound_command3; |
| 206 | 230 | } |
| r244856 | r244857 | |
| 248 | 272 | |
| 249 | 273 | static ADDRESS_MAP_START( sound3_m660_map, AS_PROGRAM, 8, tsamurai_state ) |
| 250 | 274 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 251 | | AM_RANGE(0xc000, 0xc000) AM_READ(sound_command3_r) |
| 275 | AM_RANGE(0xc000, 0xc000) AM_READ(m660_sound_command3_r) |
| 252 | 276 | AM_RANGE(0xc001, 0xc001) AM_WRITENOP /* ? - probably clear IRQ */ |
| 253 | 277 | AM_RANGE(0x8000, 0x87ff) AM_RAM |
| 254 | 278 | AM_RANGE(0xfffc, 0xffff) AM_RAM /* CPU writes here - music data */ |
| r244856 | r244857 | |
| 307 | 331 | AM_RANGE(0xa006, 0xa006) AM_READ(vsgongf_a006_r) /* protection */ |
| 308 | 332 | AM_RANGE(0xa100, 0xa100) AM_READ(vsgongf_a100_r) /* protection */ |
| 309 | 333 | AM_RANGE(0xc000, 0xc7ff) AM_RAM /* work ram */ |
| 310 | | AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(tsamurai_fg_videoram_w) AM_SHARE("videoram") |
| 334 | AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(fg_videoram_w) AM_SHARE("videoram") |
| 311 | 335 | AM_RANGE(0xe400, 0xe43f) AM_RAM AM_SHARE("spriteram") |
| 312 | 336 | AM_RANGE(0xe440, 0xe47b) AM_RAM |
| 313 | 337 | AM_RANGE(0xe800, 0xe800) AM_WRITE(vsgongf_sound_command_w) |
| r244856 | r244857 | |
| 324 | 348 | AM_RANGE(0xf803, 0xf803) AM_WRITENOP /* vreg? always 0 */ |
| 325 | 349 | AM_RANGE(0xfc00, 0xfc00) AM_RAM /* vreg? always 0 */ |
| 326 | 350 | AM_RANGE(0xfc01, 0xfc01) AM_WRITE(nmi_enable_w) |
| 327 | | AM_RANGE(0xfc02, 0xfc03) AM_WRITE(tsamurai_coin_counter_w) |
| 328 | | AM_RANGE(0xfc04, 0xfc04) AM_WRITE(tsamurai_textbank1_w) |
| 351 | AM_RANGE(0xfc02, 0xfc03) AM_WRITE(coincounter_w) |
| 352 | AM_RANGE(0xfc04, 0xfc04) AM_WRITE(textbank1_w) |
| 329 | 353 | ADDRESS_MAP_END |
| 330 | 354 | |
| 331 | 355 | static ADDRESS_MAP_START( sound_vsgongf_map, AS_PROGRAM, 8, tsamurai_state ) |
| r244856 | r244857 | |
| 680 | 704 | MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) |
| 681 | 705 | MCFG_CPU_PROGRAM_MAP(main_map) |
| 682 | 706 | MCFG_CPU_IO_MAP(z80_io_map) |
| 683 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, samurai_interrupt) |
| 707 | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, interrupt) |
| 684 | 708 | |
| 685 | 709 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) |
| 686 | 710 | MCFG_CPU_PROGRAM_MAP(sound1_map) |
| 687 | 711 | |
| 688 | 712 | MCFG_CPU_ADD("audio2", Z80, XTAL_24MHz/8) |
| 689 | 713 | MCFG_CPU_PROGRAM_MAP(sound2_map) |
| 714 | |
| 715 | MCFG_MACHINE_START_OVERRIDE(tsamurai_state,tsamurai) |
| 690 | 716 | |
| 691 | 717 | /* video hardware */ |
| 692 | 718 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244856 | r244857 | |
| 694 | 720 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 695 | 721 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 696 | 722 | MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) |
| 697 | | MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update_tsamurai) |
| 723 | MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update) |
| 698 | 724 | MCFG_SCREEN_PALETTE("palette") |
| 699 | 725 | |
| 700 | 726 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", tsamurai) |
| r244856 | r244857 | |
| 720 | 746 | /* basic machine hardware */ |
| 721 | 747 | MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) |
| 722 | 748 | MCFG_CPU_PROGRAM_MAP(vsgongf_map) |
| 723 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, samurai_interrupt) |
| 749 | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, interrupt) |
| 724 | 750 | |
| 725 | 751 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) |
| 726 | 752 | MCFG_CPU_PROGRAM_MAP(sound_vsgongf_map) |
| 727 | 753 | MCFG_CPU_IO_MAP(vsgongf_audio_io_map) |
| 728 | 754 | MCFG_CPU_PERIODIC_INT_DRIVER(tsamurai_state, vsgongf_sound_interrupt, 3*60) |
| 755 | |
| 756 | MCFG_MACHINE_START_OVERRIDE(tsamurai_state,vsgongf) |
| 729 | 757 | |
| 730 | 758 | /* video hardware */ |
| 731 | 759 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244856 | r244857 | |
| 757 | 785 | MCFG_CPU_ADD("maincpu", Z80, XTAL_24MHz/8) |
| 758 | 786 | MCFG_CPU_PROGRAM_MAP(m660_map) |
| 759 | 787 | MCFG_CPU_IO_MAP(z80_m660_io_map) |
| 760 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, samurai_interrupt) |
| 788 | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, interrupt) |
| 761 | 789 | |
| 762 | 790 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_24MHz/8) |
| 763 | 791 | MCFG_CPU_PROGRAM_MAP(sound1_m660_map) |
| r244856 | r244857 | |
| 769 | 797 | MCFG_CPU_PROGRAM_MAP(sound3_m660_map) |
| 770 | 798 | MCFG_CPU_IO_MAP(sound3_m660_io_map) |
| 771 | 799 | MCFG_CPU_VBLANK_INT_DRIVER("screen", tsamurai_state, nmi_line_pulse) |
| 800 | |
| 801 | MCFG_MACHINE_START_OVERRIDE(tsamurai_state,m660) |
| 772 | 802 | |
| 773 | 803 | /* video hardware */ |
| 774 | 804 | MCFG_SCREEN_ADD("screen", RASTER) |
| r244856 | r244857 | |
| 776 | 806 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 777 | 807 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 778 | 808 | MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8) |
| 779 | | MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update_tsamurai) |
| 809 | MCFG_SCREEN_UPDATE_DRIVER(tsamurai_state, screen_update) |
| 780 | 810 | MCFG_SCREEN_PALETTE("palette") |
| 781 | 811 | |
| 782 | 812 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", tsamurai) |
| 783 | 813 | MCFG_PALETTE_ADD_RRRRGGGGBBBB_PROMS("palette", 256) |
| 784 | | MCFG_VIDEO_START_OVERRIDE(tsamurai_state,tsamurai) |
| 814 | MCFG_VIDEO_START_OVERRIDE(tsamurai_state,m660) |
| 785 | 815 | |
| 786 | 816 | /* sound hardware */ |
| 787 | 817 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| r244856 | r244857 | |
| 1232 | 1262 | ROM_LOAD( "clr.6p", 0x200, 0x0100, CRC(0e4fd17a) SHA1(d4e32bd9dd903177af61f77976a25c5db1467bba) ) |
| 1233 | 1263 | ROM_END |
| 1234 | 1264 | |
| 1235 | | GAME( 1984, vsgongf, 0, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko", "VS Gong Fight", GAME_IMPERFECT_COLORS ) |
| 1236 | | GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", GAME_IMPERFECT_COLORS ) |
| 1237 | | GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", GAME_IMPERFECT_COLORS ) |
| 1265 | GAME( 1984, vsgongf, 0, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko", "VS Gong Fight", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| 1266 | GAME( 1984, ringfgt, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 1)", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| 1267 | GAME( 1984, ringfgt2, vsgongf, vsgongf, vsgongf, driver_device, 0, ROT90, "Kaneko (Taito license)", "Ring Fighter (set 2)", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| 1238 | 1268 | |
| 1239 | | GAME( 1985, tsamurai, 0, tsamurai, tsamurai, driver_device, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 1)", 0 ) |
| 1240 | | GAME( 1985, tsamurai2,tsamurai, tsamurai, tsamurai, driver_device, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 2)", 0 ) |
| 1241 | | GAME( 1985, tsamuraih,tsamurai, tsamurai, tsamurai, driver_device, 0, ROT90, "bootleg", "Samurai Nihon-Ichi (bootleg, harder)", 0 ) |
| 1269 | GAME( 1985, tsamurai, 0, tsamurai, tsamurai, driver_device, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 1)", GAME_SUPPORTS_SAVE ) |
| 1270 | GAME( 1985, tsamurai2,tsamurai, tsamurai, tsamurai, driver_device, 0, ROT90, "Kaneko / Taito", "Samurai Nihon-Ichi (set 2)", GAME_SUPPORTS_SAVE ) |
| 1271 | GAME( 1985, tsamuraih,tsamurai, tsamurai, tsamurai, driver_device, 0, ROT90, "bootleg", "Samurai Nihon-Ichi (bootleg, harder)", GAME_SUPPORTS_SAVE ) |
| 1242 | 1272 | |
| 1243 | | GAME( 1985, ladymstr, 0, tsamurai, ladymstr, driver_device, 0, ROT90, "Kaneko / Taito", "Lady Master of Kung Fu", 0 ) |
| 1244 | | GAME( 1985, nunchaku, ladymstr, tsamurai, nunchaku, driver_device, 0, ROT90, "Kaneko / Taito", "Nunchackun", GAME_IMPERFECT_COLORS ) |
| 1273 | GAME( 1985, ladymstr, 0, tsamurai, ladymstr, driver_device, 0, ROT90, "Kaneko / Taito", "Lady Master of Kung Fu", GAME_SUPPORTS_SAVE ) |
| 1274 | GAME( 1985, nunchaku, ladymstr, tsamurai, nunchaku, driver_device, 0, ROT90, "Kaneko / Taito", "Nunchackun", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| 1245 | 1275 | |
| 1246 | | GAME( 1985, yamagchi, 0, tsamurai, yamagchi, driver_device, 0, ROT90, "Kaneko / Taito", "Go Go Mr. Yamaguchi / Yuke Yuke Yamaguchi-kun", GAME_IMPERFECT_COLORS ) |
| 1276 | GAME( 1985, yamagchi, 0, tsamurai, yamagchi, driver_device, 0, ROT90, "Kaneko / Taito", "Go Go Mr. Yamaguchi / Yuke Yuke Yamaguchi-kun", GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) |
| 1247 | 1277 | |
| 1248 | | GAME( 1986, m660, 0, m660, m660, driver_device, 0, ROT90, "Wood Place Inc. (Taito America Corporation license)", "Mission 660 (US)", 0 ) |
| 1249 | | GAME( 1986, m660j, m660, m660, m660, driver_device, 0, ROT90, "Wood Place Inc. (Taito Corporation license)", "Mission 660 (Japan)", 0 ) |
| 1250 | | GAME( 1986, m660b, m660, m660, m660, driver_device, 0, ROT90, "bootleg", "Mission 660 (bootleg)", 0 ) |
| 1251 | | GAME( 1986, alphaxz, m660, m660, m660, driver_device, 0, ROT90, "Ed Co. Ltd. (Wood Place Inc. license)", "The Alphax Z (Japan)", 0 ) |
| 1278 | GAME( 1986, m660, 0, m660, m660, driver_device, 0, ROT90, "Wood Place Inc. (Taito America Corporation license)", "Mission 660 (US)", GAME_SUPPORTS_SAVE ) |
| 1279 | GAME( 1986, m660j, m660, m660, m660, driver_device, 0, ROT90, "Wood Place Inc. (Taito Corporation license)", "Mission 660 (Japan)", GAME_SUPPORTS_SAVE ) |
| 1280 | GAME( 1986, m660b, m660, m660, m660, driver_device, 0, ROT90, "bootleg", "Mission 660 (bootleg)", GAME_SUPPORTS_SAVE ) |
| 1281 | GAME( 1986, alphaxz, m660, m660, m660, driver_device, 0, ROT90, "Ed Co. Ltd. (Wood Place Inc. license)", "The Alphax Z (Japan)", GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/tsamurai.h
| r244856 | r244857 | |
| 3 | 3 | public: |
| 4 | 4 | tsamurai_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 5 | : driver_device(mconfig, type, tag), |
| 6 | | m_videoram(*this, "videoram"), |
| 7 | | m_colorram(*this, "colorram"), |
| 8 | | m_bg_videoram(*this, "bg_videoram"), |
| 9 | | m_spriteram(*this, "spriteram"), |
| 10 | 6 | m_maincpu(*this, "maincpu"), |
| 11 | 7 | m_audiocpu(*this, "audiocpu"), |
| 12 | 8 | m_audio2(*this, "audio2"), |
| 13 | 9 | m_audio3(*this, "audio3"), |
| 14 | 10 | m_gfxdecode(*this, "gfxdecode"), |
| 15 | | m_palette(*this, "palette") { } |
| 11 | m_palette(*this, "palette"), |
| 12 | m_videoram(*this, "videoram"), |
| 13 | m_colorram(*this, "colorram"), |
| 14 | m_bg_videoram(*this, "bg_videoram"), |
| 15 | m_spriteram(*this, "spriteram") { } |
| 16 | 16 | |
| 17 | | int m_nmi_enabled; |
| 18 | | int m_sound_command1; |
| 19 | | int m_sound_command2; |
| 20 | | int m_sound_command3; |
| 21 | | int m_vsgongf_sound_nmi_enabled; |
| 17 | required_device<cpu_device> m_maincpu; |
| 18 | required_device<cpu_device> m_audiocpu; |
| 19 | optional_device<cpu_device> m_audio2; |
| 20 | optional_device<cpu_device> m_audio3; |
| 21 | required_device<gfxdecode_device> m_gfxdecode; |
| 22 | required_device<palette_device> m_palette; |
| 23 | |
| 22 | 24 | required_shared_ptr<UINT8> m_videoram; |
| 23 | 25 | optional_shared_ptr<UINT8> m_colorram; |
| 24 | 26 | optional_shared_ptr<UINT8> m_bg_videoram; |
| 25 | | int m_bgcolor; |
| 26 | | int m_textbank1; |
| 27 | | int m_textbank2; |
| 27 | required_shared_ptr<UINT8> m_spriteram; |
| 28 | |
| 28 | 29 | tilemap_t *m_background; |
| 29 | 30 | tilemap_t *m_foreground; |
| 31 | |
| 32 | //common |
| 30 | 33 | int m_flicker; |
| 34 | int m_textbank1; |
| 35 | int m_nmi_enabled; |
| 36 | |
| 37 | // tsamurai and m660 specific |
| 38 | int m_bgcolor; |
| 39 | int m_sound_command1; |
| 40 | int m_sound_command2; |
| 41 | |
| 42 | //m660 specific |
| 43 | int m_textbank2; |
| 44 | int m_sound_command3; |
| 45 | |
| 46 | //vsgongf specific |
| 47 | int m_vsgongf_sound_nmi_enabled; |
| 31 | 48 | int m_vsgongf_color; |
| 32 | | int m_key_count; |
| 33 | | required_shared_ptr<UINT8> m_spriteram; |
| 49 | int m_key_count; //debug only |
| 50 | |
| 51 | // common |
| 34 | 52 | DECLARE_WRITE8_MEMBER(nmi_enable_w); |
| 35 | | DECLARE_READ8_MEMBER(unknown_d803_r); |
| 36 | | DECLARE_READ8_MEMBER(unknown_d803_m660_r); |
| 53 | DECLARE_WRITE8_MEMBER(coincounter_w); |
| 54 | DECLARE_WRITE8_MEMBER(textbank1_w); |
| 55 | DECLARE_WRITE8_MEMBER(fg_videoram_w); |
| 56 | |
| 57 | // tsamurai and m660 specific |
| 58 | DECLARE_WRITE8_MEMBER(bg_videoram_w); |
| 59 | DECLARE_WRITE8_MEMBER(fg_colorram_w); |
| 60 | DECLARE_WRITE8_MEMBER(flip_screen_w); |
| 61 | DECLARE_WRITE8_MEMBER(scrolly_w); |
| 62 | DECLARE_WRITE8_MEMBER(scrollx_w); |
| 63 | DECLARE_WRITE8_MEMBER(bgcolor_w); |
| 37 | 64 | DECLARE_READ8_MEMBER(unknown_d806_r); |
| 38 | 65 | DECLARE_READ8_MEMBER(unknown_d900_r); |
| 39 | 66 | DECLARE_READ8_MEMBER(unknown_d938_r); |
| 40 | 67 | DECLARE_WRITE8_MEMBER(sound_command1_w); |
| 41 | 68 | DECLARE_WRITE8_MEMBER(sound_command2_w); |
| 42 | | DECLARE_WRITE8_MEMBER(sound_command3_w); |
| 43 | | DECLARE_WRITE8_MEMBER(flip_screen_w); |
| 44 | | DECLARE_WRITE8_MEMBER(tsamurai_coin_counter_w); |
| 45 | 69 | DECLARE_READ8_MEMBER(sound_command1_r); |
| 46 | 70 | DECLARE_READ8_MEMBER(sound_command2_r); |
| 47 | | DECLARE_READ8_MEMBER(sound_command3_r); |
| 71 | |
| 72 | // tsamurai specific |
| 73 | DECLARE_READ8_MEMBER(tsamurai_unknown_d803_r); |
| 74 | |
| 75 | // m660 specific |
| 76 | DECLARE_WRITE8_MEMBER(m660_textbank2_w); |
| 77 | DECLARE_READ8_MEMBER(m660_unknown_d803_r); |
| 78 | DECLARE_WRITE8_MEMBER(m660_sound_command3_w); |
| 79 | DECLARE_READ8_MEMBER(m660_sound_command3_r); |
| 80 | |
| 81 | // vsgongf specific |
| 82 | DECLARE_WRITE8_MEMBER(vsgongf_color_w); |
| 48 | 83 | DECLARE_WRITE8_MEMBER(vsgongf_sound_nmi_enable_w); |
| 49 | 84 | DECLARE_READ8_MEMBER(vsgongf_a006_r); |
| 50 | 85 | DECLARE_READ8_MEMBER(vsgongf_a100_r); |
| 51 | 86 | DECLARE_WRITE8_MEMBER(vsgongf_sound_command_w); |
| 52 | | DECLARE_WRITE8_MEMBER(tsamurai_scrolly_w); |
| 53 | | DECLARE_WRITE8_MEMBER(tsamurai_scrollx_w); |
| 54 | | DECLARE_WRITE8_MEMBER(tsamurai_bgcolor_w); |
| 55 | | DECLARE_WRITE8_MEMBER(tsamurai_textbank1_w); |
| 56 | | DECLARE_WRITE8_MEMBER(tsamurai_textbank2_w); |
| 57 | | DECLARE_WRITE8_MEMBER(tsamurai_bg_videoram_w); |
| 58 | | DECLARE_WRITE8_MEMBER(tsamurai_fg_videoram_w); |
| 59 | | DECLARE_WRITE8_MEMBER(tsamurai_fg_colorram_w); |
| 60 | | DECLARE_WRITE8_MEMBER(vsgongf_color_w); |
| 87 | |
| 61 | 88 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 62 | 89 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 63 | 90 | TILE_GET_INFO_MEMBER(get_vsgongf_tile_info); |
| 91 | |
| 92 | virtual void machine_start(); |
| 93 | DECLARE_MACHINE_START(m660); |
| 94 | DECLARE_MACHINE_START(tsamurai); |
| 95 | DECLARE_MACHINE_START(vsgongf); |
| 96 | virtual void video_start(); |
| 97 | DECLARE_VIDEO_START(m660); |
| 64 | 98 | DECLARE_VIDEO_START(tsamurai); |
| 65 | 99 | DECLARE_VIDEO_START(vsgongf); |
| 66 | | UINT32 screen_update_tsamurai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 100 | |
| 101 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 67 | 102 | UINT32 screen_update_vsgongf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 68 | | INTERRUPT_GEN_MEMBER(samurai_interrupt); |
| 103 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 104 | |
| 105 | INTERRUPT_GEN_MEMBER(interrupt); |
| 69 | 106 | INTERRUPT_GEN_MEMBER(vsgongf_sound_interrupt); |
| 70 | | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 71 | | required_device<cpu_device> m_maincpu; |
| 72 | | required_device<cpu_device> m_audiocpu; |
| 73 | | optional_device<cpu_device> m_audio2; |
| 74 | | optional_device<cpu_device> m_audio3; |
| 75 | | required_device<gfxdecode_device> m_gfxdecode; |
| 76 | | required_device<palette_device> m_palette; |
| 77 | 107 | }; |