Previous 199869 Revisions Next

r36738 Saturday 28th March, 2015 at 10:03:37 UTC by Miodrag Milanović
Merge branch 'master' of https://github.com/mamedev/mame
[src/mame/drivers]thepit.c
[src/mame/includes]thepit.h
[src/mame/video]thepit.c
[src/mess/drivers]mpf1.c

trunk/src/mame/drivers/thepit.c
r245249r245250
170170#define VBEND               (16)
171171#define VBSTART             (224+16)
172172
173void thepit_state::machine_start()
174{
175   save_item(NAME(m_nmi_mask));
176}
173177
174READ8_MEMBER(thepit_state::thepit_colorram_r)
178READ8_MEMBER(thepit_state::intrepid_colorram_mirror_r)
175179{
176180   return m_colorram[offset];
177181}
178182
179WRITE8_MEMBER(thepit_state::thepit_sound_enable_w)
183WRITE8_MEMBER(thepit_state::sound_enable_w)
180184{
181185   machine().sound().system_enable(data);
182186}
r245249r245250
190194static ADDRESS_MAP_START( thepit_main_map, AS_PROGRAM, 8, thepit_state )
191195   AM_RANGE(0x0000, 0x4fff) AM_ROM
192196   AM_RANGE(0x8000, 0x87ff) AM_RAM
193   AM_RANGE(0x8800, 0x8bff) AM_MIRROR(0x0400) AM_RAM_WRITE(thepit_colorram_w) AM_SHARE("colorram")
194   AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM_WRITE(thepit_videoram_w) AM_SHARE("videoram")
197   AM_RANGE(0x8800, 0x8bff) AM_MIRROR(0x0400) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
198   AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
195199   AM_RANGE(0x9800, 0x983f) AM_MIRROR(0x0700) AM_RAM AM_SHARE("attributesram")
196200   AM_RANGE(0x9840, 0x985f) AM_RAM AM_SHARE("spriteram")
197201   AM_RANGE(0x9860, 0x98ff) AM_RAM
198   AM_RANGE(0xa000, 0xa000) AM_READ(thepit_input_port_0_r) AM_WRITENOP // Not hooked up according to the schematics
202   AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) AM_WRITENOP // Not hooked up according to the schematics
199203   AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1")
200204   AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") AM_WRITE(nmi_mask_w)
201205   AM_RANGE(0xb001, 0xb001) AM_WRITENOP // Unused, but initialized
202206   AM_RANGE(0xb002, 0xb002) AM_WRITENOP // coin_lockout_w
203   AM_RANGE(0xb003, 0xb003) AM_WRITE(thepit_sound_enable_w)
207   AM_RANGE(0xb003, 0xb003) AM_WRITE(sound_enable_w)
204208   AM_RANGE(0xb004, 0xb005) AM_WRITENOP // Unused, but initialized
205   AM_RANGE(0xb006, 0xb006) AM_WRITE(thepit_flip_screen_x_w)
206   AM_RANGE(0xb007, 0xb007) AM_WRITE(thepit_flip_screen_y_w)
209   AM_RANGE(0xb006, 0xb006) AM_WRITE(flip_screen_x_w)
210   AM_RANGE(0xb007, 0xb007) AM_WRITE(flip_screen_y_w)
207211   AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w)
208212ADDRESS_MAP_END
209213
210214static ADDRESS_MAP_START( desertdan_main_map, AS_PROGRAM, 8, thepit_state )
211215   AM_RANGE(0x0000, 0x7fff) AM_ROM
212216   AM_RANGE(0x8000, 0x87ff) AM_RAM
213   AM_RANGE(0x8800, 0x8bff) AM_MIRROR(0x0400) AM_RAM_WRITE(thepit_colorram_w) AM_SHARE("colorram")
214   AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM_WRITE(thepit_videoram_w) AM_SHARE("videoram")
217   AM_RANGE(0x8800, 0x8bff) AM_MIRROR(0x0400) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
218   AM_RANGE(0x9000, 0x93ff) AM_MIRROR(0x0400) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
215219   AM_RANGE(0x9800, 0x983f) AM_MIRROR(0x0700) AM_RAM AM_SHARE("attributesram")
216220   AM_RANGE(0x9840, 0x985f) AM_RAM AM_SHARE("spriteram")
217221   AM_RANGE(0x9860, 0x98ff) AM_RAM
218   AM_RANGE(0xa000, 0xa000) AM_READ(thepit_input_port_0_r) AM_WRITENOP // Not hooked up according to the schematics
222   AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r) AM_WRITENOP // Not hooked up according to the schematics
219223   AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1")
220224   AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") AM_WRITE(nmi_mask_w)
221225   AM_RANGE(0xb001, 0xb001) AM_WRITENOP // Unused, but initialized
222226   AM_RANGE(0xb002, 0xb002) AM_WRITENOP // coin_lockout_w
223   AM_RANGE(0xb003, 0xb003) AM_WRITE(thepit_sound_enable_w)
227   AM_RANGE(0xb003, 0xb003) AM_WRITE(sound_enable_w)
224228   AM_RANGE(0xb004, 0xb005) AM_WRITENOP // Unused, but initialized
225   AM_RANGE(0xb006, 0xb006) AM_WRITE(thepit_flip_screen_x_w)
226   AM_RANGE(0xb007, 0xb007) AM_WRITE(thepit_flip_screen_y_w)
229   AM_RANGE(0xb006, 0xb006) AM_WRITE(flip_screen_x_w)
230   AM_RANGE(0xb007, 0xb007) AM_WRITE(flip_screen_y_w)
227231   AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w)
228232ADDRESS_MAP_END
229233
230234static ADDRESS_MAP_START( intrepid_main_map, AS_PROGRAM, 8, thepit_state )
231235   AM_RANGE(0x0000, 0x7fff) AM_ROM
232236   AM_RANGE(0x8000, 0x87ff) AM_RAM
233   AM_RANGE(0x8c00, 0x8fff) AM_READ(thepit_colorram_r) AM_WRITE(thepit_colorram_w) /* mirror for intrepi2 */
234   AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(thepit_videoram_w) AM_SHARE("videoram")
235   AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(thepit_colorram_w) AM_SHARE("colorram")
237   AM_RANGE(0x8c00, 0x8fff) AM_READ(intrepid_colorram_mirror_r) AM_WRITE(colorram_w) /* mirror for intrepi2 */
238   AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
239   AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
236240   AM_RANGE(0x9800, 0x983f) AM_MIRROR(0x0700) AM_RAM AM_SHARE("attributesram")
237241   AM_RANGE(0x9840, 0x985f) AM_RAM AM_SHARE("spriteram")
238242   AM_RANGE(0x9860, 0x98ff) AM_RAM
239   AM_RANGE(0xa000, 0xa000) AM_READ(thepit_input_port_0_r)
243   AM_RANGE(0xa000, 0xa000) AM_READ(input_port_0_r)
240244   AM_RANGE(0xa800, 0xa800) AM_READ_PORT("IN1")
241245   AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") AM_WRITE(nmi_mask_w)
242246   AM_RANGE(0xb001, 0xb001) AM_WRITENOP // Unused, but initialized
243247   AM_RANGE(0xb002, 0xb002) AM_WRITENOP // coin_lockout_w
244   AM_RANGE(0xb003, 0xb003) AM_WRITE(thepit_sound_enable_w)
248   AM_RANGE(0xb003, 0xb003) AM_WRITE(sound_enable_w)
245249   AM_RANGE(0xb004, 0xb004) AM_WRITENOP // Unused, but initialized
246250   AM_RANGE(0xb005, 0xb005) AM_WRITE(intrepid_graphics_bank_w)
247   AM_RANGE(0xb006, 0xb006) AM_WRITE(thepit_flip_screen_x_w)
248   AM_RANGE(0xb007, 0xb007) AM_WRITE(thepit_flip_screen_y_w)
251   AM_RANGE(0xb006, 0xb006) AM_WRITE(flip_screen_x_w)
252   AM_RANGE(0xb007, 0xb007) AM_WRITE(flip_screen_y_w)
249253   AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w)
250254ADDRESS_MAP_END
251255
r245249r245250
266270ADDRESS_MAP_END
267271
268272
269#define IN0_REAL\
273static INPUT_PORTS_START( in0_real)
270274   PORT_START("IN0")\
271   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY\
272   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY\
273   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY\
274   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY\
275   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )\
276   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )\
277   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\
275   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
276   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
277   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
278   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
279   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
280   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
281   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
278282   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
283INPUT_PORTS_END
279284
280
281#define IN2_FAKE\
285static INPUT_PORTS_START( in2_fake )
282286   PORT_START("IN2")\
283   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL\
284   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL\
285   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL\
286   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL\
287   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL\
288   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )\
289   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )\
287   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
288   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
289   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
290   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
291   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
292   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
293   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
290294   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
295INPUT_PORTS_END
291296
292
293297static INPUT_PORTS_START( thepit )
294   IN0_REAL
298   PORT_INCLUDE(in0_real)
295299
296300   PORT_START("IN1")
297301   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
r245249r245250
330334
331335   /* Since the real inputs are multiplexed, we used this fake port
332336      to read the 2nd player controls when the screen is flipped */
333   IN2_FAKE
337   PORT_INCLUDE(in2_fake)
334338INPUT_PORTS_END
335339
336340
337341static INPUT_PORTS_START( desertdn )
338   IN0_REAL
342   PORT_INCLUDE(in0_real)
339343
340344   PORT_START("IN1")
341345   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
r245249r245250
373377
374378   /* Since the real inputs are multiplexed, we used this fake port
375379      to read the 2nd player controls when the screen is flipped */
376   IN2_FAKE
380   PORT_INCLUDE(in2_fake)
377381INPUT_PORTS_END
378382
379383
380384static INPUT_PORTS_START( roundup )
381   IN0_REAL
385   PORT_INCLUDE(in0_real)
382386
383387   PORT_START("IN1")
384388   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
r245249r245250
416420
417421   /* Since the real inputs are multiplexed, we used this fake port
418422      to read the 2nd player controls when the screen is flipped */
419   IN2_FAKE
423   PORT_INCLUDE(in2_fake)
420424INPUT_PORTS_END
421425
422426
r245249r245250
431435
432436
433437static INPUT_PORTS_START( intrepid )
434   IN0_REAL
438   PORT_INCLUDE(in0_real)
435439   /* The bit at 0x80 in IN0 Starts a timer, which, after it runs down, doesn't seem to do anything. See $0105 */
436440
437441   PORT_START("IN1")
r245249r245250
471475
472476   /* Since the real inputs are multiplexed, we used this fake port
473477      to read the 2nd player controls when the screen is flipped */
474   IN2_FAKE
478   PORT_INCLUDE(in2_fake)
475479INPUT_PORTS_END
476480
477481
478482static INPUT_PORTS_START( dockman )
479   IN0_REAL
483   PORT_INCLUDE(in0_real)
480484
481485   PORT_START("IN1")
482486   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
r245249r245250
514518
515519   /* Since the real inputs are multiplexed, we used this fake port
516520      to read the 2nd player controls when the screen is flipped */
517   IN2_FAKE
521   PORT_INCLUDE(in2_fake)
518522INPUT_PORTS_END
519523
520524
521525static INPUT_PORTS_START( suprmous )
522   IN0_REAL
526   PORT_INCLUDE(in0_real)
523527
524528   PORT_START("IN1")
525529   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
r245249r245250
558562
559563   /* Since the real inputs are multiplexed, we used this fake port
560564      to read the 2nd player controls when the screen is flipped */
561   IN2_FAKE
565   PORT_INCLUDE(in2_fake)
562566INPUT_PORTS_END
563567
564568
r245249r245250
626630INPUT_PORTS_END
627631
628632
629static const gfx_layout thepit_charlayout =
633static const gfx_layout charlayout =
630634{
631635   8,8,
632636   256,
r245249r245250
638642};
639643
640644
641static const gfx_layout thepit_spritelayout =
645static const gfx_layout spritelayout =
642646{
643647   16,16,
644648   64,
r245249r245250
675679
676680
677681static GFXDECODE_START( thepit )
678   GFXDECODE_ENTRY( "gfx1", 0, thepit_charlayout,   0, 8 )
679   GFXDECODE_ENTRY( "gfx1", 0, thepit_spritelayout, 0, 8 )
682   GFXDECODE_ENTRY( "gfx1", 0, charlayout,   0, 8 )
683   GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0, 8 )
680684GFXDECODE_END
681685
682686static GFXDECODE_START( intrepid )
683   GFXDECODE_ENTRY( "gfx1", 0x0000, thepit_charlayout,   0, 8 )
684   GFXDECODE_ENTRY( "gfx1", 0x0000, thepit_spritelayout, 0, 8 )
685   GFXDECODE_ENTRY( "gfx1", 0x0800, thepit_charlayout,   0, 8 )
686   GFXDECODE_ENTRY( "gfx1", 0x0800, thepit_spritelayout, 0, 8 )
687   GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout,   0, 8 )
688   GFXDECODE_ENTRY( "gfx1", 0x0000, spritelayout, 0, 8 )
689   GFXDECODE_ENTRY( "gfx1", 0x0800, charlayout,   0, 8 )
690   GFXDECODE_ENTRY( "gfx1", 0x0800, spritelayout, 0, 8 )
687691GFXDECODE_END
688692
689693static GFXDECODE_START( suprmous )
r245249r245250
717721
718722   MCFG_SCREEN_ADD("screen", RASTER)
719723   MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
720   MCFG_SCREEN_UPDATE_DRIVER(thepit_state, screen_update_thepit)
724   MCFG_SCREEN_UPDATE_DRIVER(thepit_state, screen_update)
721725   MCFG_SCREEN_PALETTE("palette")
722726
723727   /* sound hardware */
r245249r245250
12461250{
12471251   // Set-up the weirdest questions read ever done
12481252   m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0x4fff, read8_delegate(FUNC(thepit_state::rtriv_question_r),this));
1253   
1254   save_item(NAME(m_question_address));
1255   save_item(NAME(m_question_rom));
1256   save_item(NAME(m_remap_address));
12491257}
12501258
12511259
1252GAME( 1981, roundup,  0,        thepit,   roundup,  driver_device, 0,     ROT90, "Taito Corporation (Amenip/Centuri license)",  "Round-Up", 0 )
1253GAME( 1981, fitter,   roundup,  thepit,   fitter,   driver_device, 0,     ROT90, "Taito Corporation",                           "Fitter", 0 )
1254GAME( 1981, fitterbl, roundup,  thepit,   fitter,   driver_device, 0,     ROT90, "bootleg",                                     "Fitter (bootleg of Round-Up)", 0 )
1255GAME( 1981, ttfitter, roundup,  thepit,   fitter,   driver_device, 0,     ROT90, "Taito Corporation",                           "T.T. Fitter (Japan)", 0 )
1260GAME( 1981, roundup,  0,        thepit,   roundup,  driver_device, 0,     ROT90, "Taito Corporation (Amenip/Centuri license)",  "Round-Up", GAME_SUPPORTS_SAVE )
1261GAME( 1981, fitter,   roundup,  thepit,   fitter,   driver_device, 0,     ROT90, "Taito Corporation",                           "Fitter", GAME_SUPPORTS_SAVE )
1262GAME( 1981, fitterbl, roundup,  thepit,   fitter,   driver_device, 0,     ROT90, "bootleg",                                     "Fitter (bootleg of Round-Up)", GAME_SUPPORTS_SAVE )
1263GAME( 1981, ttfitter, roundup,  thepit,   fitter,   driver_device, 0,     ROT90, "Taito Corporation",                           "T.T. Fitter (Japan)", GAME_SUPPORTS_SAVE )
12561264
1257GAME( 1982, thepit,   0,        thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics",                           "The Pit", 0 ) // AW == Andy Walker
1258GAME( 1982, thepitu1, thepit,   thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics (Centuri license)",         "The Pit (US set 1)", 0 )
1259GAME( 1982, thepitu2, thepit,   thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics (Centuri license)",         "The Pit (US set 2)", 0 ) // Bally PCB
1260GAME( 1982, thepitj,  thepit,   thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics (Taito license)",           "The Pit (Japan)", 0 )
1265GAME( 1982, thepit,   0,        thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics",                           "The Pit", GAME_SUPPORTS_SAVE ) // AW == Andy Walker
1266GAME( 1982, thepitu1, thepit,   thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics (Centuri license)",         "The Pit (US set 1)", GAME_SUPPORTS_SAVE )
1267GAME( 1982, thepitu2, thepit,   thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics (Centuri license)",         "The Pit (US set 2)", GAME_SUPPORTS_SAVE ) // Bally PCB
1268GAME( 1982, thepitj,  thepit,   thepit,   thepit,   driver_device, 0,     ROT90, "Zilec Electronics (Taito license)",           "The Pit (Japan)", GAME_SUPPORTS_SAVE )
12611269
1262GAME( 1982, dockman,  0,        intrepid, dockman,  driver_device, 0,     ROT90, "Taito Corporation",                           "Dock Man", 0 )
1263GAME( 1982, portman,  dockman,  intrepid, dockman,  driver_device, 0,     ROT90, "Taito Corporation (Nova Games Ltd. license)", "Port Man", 0 )
1270GAME( 1982, dockman,  0,        intrepid, dockman,  driver_device, 0,     ROT90, "Taito Corporation",                           "Dock Man", GAME_SUPPORTS_SAVE )
1271GAME( 1982, portman,  dockman,  intrepid, dockman,  driver_device, 0,     ROT90, "Taito Corporation (Nova Games Ltd. license)", "Port Man", GAME_SUPPORTS_SAVE )
12641272
1265GAME( 1982, suprmous, 0,        suprmous, suprmous, driver_device, 0,     ROT90, "Taito Corporation",                           "Super Mouse", 0 )
1266GAME( 1982, funnymou, suprmous, suprmous, suprmous, driver_device, 0,     ROT90, "Taito Corporation (Chuo Co. Ltd license)",    "Funny Mouse (Japan)", 0 ) // Taito PCB
1273GAME( 1982, suprmous, 0,        suprmous, suprmous, driver_device, 0,     ROT90, "Taito Corporation",                           "Super Mouse", GAME_SUPPORTS_SAVE )
1274GAME( 1982, funnymou, suprmous, suprmous, suprmous, driver_device, 0,     ROT90, "Taito Corporation (Chuo Co. Ltd license)",    "Funny Mouse (Japan)", GAME_SUPPORTS_SAVE ) // Taito PCB
12671275
1268GAME( 1982, machomou, 0,        suprmous, suprmous, driver_device, 0,     ROT90, "Techstar",                                    "Macho Mouse", 0 )
1276GAME( 1982, machomou, 0,        suprmous, suprmous, driver_device, 0,     ROT90, "Techstar",                                    "Macho Mouse", GAME_SUPPORTS_SAVE )
12691277
1270GAME( 1982, desertdn, 0,        desertdn, desertdn, driver_device, 0,     ROT0,  "Video Optics",                                "Desert Dan", 0 )
1278GAME( 1982, desertdn, 0,        desertdn, desertdn, driver_device, 0,     ROT0,  "Video Optics",                                "Desert Dan", GAME_SUPPORTS_SAVE )
12711279
1272GAME( 1983, intrepid, 0,        intrepid, intrepid, driver_device, 0,     ROT90, "Nova Games Ltd.",                             "Intrepid (set 1)", 0 )
1273GAME( 1983, intrepid2,intrepid, intrepid, intrepid, driver_device, 0,     ROT90, "Nova Games Ltd.",                             "Intrepid (set 2)", 0 )
1274GAME( 1984, intrepidb,intrepid, intrepid, intrepid, driver_device, 0,     ROT90, "bootleg (Elsys)",                             "Intrepid (Elsys bootleg, set 1)", 0 )
1275GAME( 1984, intrepidb3,intrepid,intrepid, intrepid, driver_device, 0,     ROT90, "bootleg (Elsys)",                             "Intrepid (Elsys bootleg, set 2)", 0 )
1276GAME( 1984, intrepidb2,intrepid,intrepid, intrepid, driver_device, 0,     ROT90, "bootleg (Loris)",                             "Intrepid (Loris bootleg)", 0 )
1280GAME( 1983, intrepid, 0,        intrepid, intrepid, driver_device, 0,     ROT90, "Nova Games Ltd.",                             "Intrepid (set 1)", GAME_SUPPORTS_SAVE )
1281GAME( 1983, intrepid2,intrepid, intrepid, intrepid, driver_device, 0,     ROT90, "Nova Games Ltd.",                             "Intrepid (set 2)", GAME_SUPPORTS_SAVE )
1282GAME( 1984, intrepidb,intrepid, intrepid, intrepid, driver_device, 0,     ROT90, "bootleg (Elsys)",                             "Intrepid (Elsys bootleg, set 1)", GAME_SUPPORTS_SAVE )
1283GAME( 1984, intrepidb3,intrepid,intrepid, intrepid, driver_device, 0,     ROT90, "bootleg (Elsys)",                             "Intrepid (Elsys bootleg, set 2)", GAME_SUPPORTS_SAVE )
1284GAME( 1984, intrepidb2,intrepid,intrepid, intrepid, driver_device, 0,     ROT90, "bootleg (Loris)",                             "Intrepid (Loris bootleg)", GAME_SUPPORTS_SAVE )
12771285
1278GAME( 1984, zaryavos, 0,        intrepid, intrepid, driver_device, 0,     ROT90, "Nova Games of Canada",                        "Zarya Vostoka", GAME_NOT_WORKING )
1286GAME( 1984, zaryavos, 0,        intrepid, intrepid, driver_device, 0,     ROT90, "Nova Games of Canada",                        "Zarya Vostoka", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
12791287
1280GAME( 198?, rtriv,    0,        intrepid, rtriv,    thepit_state,  rtriv, ROT90, "Romar",                                       "Romar Triv", GAME_WRONG_COLORS )
1288GAME( 198?, rtriv,    0,        intrepid, rtriv,    thepit_state,  rtriv, ROT90, "Romar",                                       "Romar Triv", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
trunk/src/mame/includes/thepit.h
r245249r245250
2020   required_shared_ptr<UINT8> m_attributesram;
2121   required_shared_ptr<UINT8> m_spriteram;
2222
23   int m_question_address;
24   int m_question_rom;
25   int m_remap_address[16];
2623   UINT8 m_graphics_bank;
27   UINT8 m_flip_screen_x;
28   UINT8 m_flip_screen_y;
24   UINT8 m_flip_x;
25   UINT8 m_flip_y;
2926   tilemap_t *m_solid_tilemap;
3027   tilemap_t *m_tilemap;
3128   UINT8 *m_dummy_tile;
3229   UINT8 m_nmi_mask;
33   DECLARE_READ8_MEMBER(thepit_colorram_r);
34   DECLARE_WRITE8_MEMBER(thepit_sound_enable_w);
30
31   int m_question_address;
32   int m_question_rom;
33   int m_remap_address[16];
34
35   DECLARE_WRITE8_MEMBER(sound_enable_w);
3536   DECLARE_WRITE8_MEMBER(nmi_mask_w);
37   DECLARE_WRITE8_MEMBER(videoram_w);
38   DECLARE_WRITE8_MEMBER(colorram_w);
39   DECLARE_WRITE8_MEMBER(flip_screen_x_w);
40   DECLARE_WRITE8_MEMBER(flip_screen_y_w);
41   DECLARE_READ8_MEMBER(input_port_0_r);
42   
43   DECLARE_READ8_MEMBER(intrepid_colorram_mirror_r);
44   DECLARE_WRITE8_MEMBER(intrepid_graphics_bank_w);
45   
3646   DECLARE_READ8_MEMBER(rtriv_question_r);
37   DECLARE_WRITE8_MEMBER(thepit_videoram_w);
38   DECLARE_WRITE8_MEMBER(thepit_colorram_w);
39   DECLARE_WRITE8_MEMBER(thepit_flip_screen_x_w);
40   DECLARE_WRITE8_MEMBER(thepit_flip_screen_y_w);
41   DECLARE_WRITE8_MEMBER(intrepid_graphics_bank_w);
42   DECLARE_READ8_MEMBER(thepit_input_port_0_r);
43   DECLARE_DRIVER_INIT(rtriv);
47
4448   TILE_GET_INFO_MEMBER(solid_get_tile_info);
4549   TILE_GET_INFO_MEMBER(get_tile_info);
50
51   DECLARE_DRIVER_INIT(rtriv);
52   virtual void machine_start();
4653   virtual void video_start();
4754   DECLARE_PALETTE_INIT(thepit);
4855   DECLARE_PALETTE_INIT(suprmous);
49   UINT32 screen_update_thepit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
56
57   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5058   UINT32 screen_update_desertdan(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
59   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_to_draw);
60   
5161   INTERRUPT_GEN_MEMBER(vblank_irq);
52   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_to_draw);
5362};
trunk/src/mame/video/thepit.c
r245249r245250
11/***************************************************************************
22
3  video.c
3  thepit.c
44
55  Functions to emulate the video hardware of the machine.
66
r245249r245250
136136   m_dummy_tile = auto_alloc_array_clear(machine(), UINT8, 8*8);
137137
138138   m_graphics_bank = 0;    /* only used in intrepid */
139   
140   save_item(NAME(m_graphics_bank));
141   save_item(NAME(m_flip_x));
142   save_item(NAME(m_flip_y));
139143}
140144
141145
r245249r245250
146150 *
147151 *************************************/
148152
149WRITE8_MEMBER(thepit_state::thepit_videoram_w)
153WRITE8_MEMBER(thepit_state::videoram_w)
150154{
151155   m_videoram[offset] = data;
152156   m_tilemap->mark_tile_dirty(offset);
153157}
154158
155159
156WRITE8_MEMBER(thepit_state::thepit_colorram_w)
160WRITE8_MEMBER(thepit_state::colorram_w)
157161{
158162   m_colorram[offset] = data;
159163   m_tilemap->mark_tile_dirty(offset);
r245249r245250
161165}
162166
163167
164WRITE8_MEMBER(thepit_state::thepit_flip_screen_x_w)
168WRITE8_MEMBER(thepit_state::flip_screen_x_w)
165169{
166170   int flip;
167171
168   m_flip_screen_x = data & 0x01;
172   m_flip_x = data & 0x01;
169173
170   flip = m_flip_screen_x ? TILEMAP_FLIPX : 0;
171   if (m_flip_screen_y)
174   flip = m_flip_x ? TILEMAP_FLIPX : 0;
175   if (m_flip_y)
172176      flip |= TILEMAP_FLIPY ;
173177
174178   m_tilemap->set_flip(flip);
r245249r245250
177181}
178182
179183
180WRITE8_MEMBER(thepit_state::thepit_flip_screen_y_w)
184WRITE8_MEMBER(thepit_state::flip_screen_y_w)
181185{
182186   int flip;
183187
184   m_flip_screen_y = data & 0x01;
188   m_flip_y = data & 0x01;
185189
186   flip = m_flip_screen_x ? TILEMAP_FLIPX : 0;
187   if (m_flip_screen_y)
190   flip = m_flip_x ? TILEMAP_FLIPX : 0;
191   if (m_flip_y)
188192      flip |= TILEMAP_FLIPY ;
189193
190194   m_tilemap->set_flip(flip);
r245249r245250
204208}
205209
206210
207READ8_MEMBER(thepit_state::thepit_input_port_0_r)
211READ8_MEMBER(thepit_state::input_port_0_r)
208212{
209213   /* Read either the real or the fake input ports depending on the
210214      horizontal flip switch. (This is how the real PCB does it) */
211   if (m_flip_screen_x)
215   if (m_flip_x)
212216   {
213217      return ioport("IN2")->read();
214218   }
r245249r245250
245249         flipx = m_spriteram[offs + 1] & 0x40;
246250         flipy = m_spriteram[offs + 1] & 0x80;
247251
248         if (m_flip_screen_y)
252         if (m_flip_y)
249253         {
250254            y = 240 - y;
251255            flipy = !flipy;
252256         }
253257
254         if (m_flip_screen_x)
258         if (m_flip_x)
255259         {
256260            x = 242 - x;
257261            flipx = !flipx;
r245249r245250
277281}
278282
279283
280UINT32 thepit_state::screen_update_thepit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
284UINT32 thepit_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
281285{
282286   const rectangle spritevisiblearea(2*8+1, 32*8-1, 2*8, 30*8-1);
283287   const rectangle spritevisibleareaflipx(0*8, 30*8-2, 2*8, 30*8-1);
r245249r245250
286290
287291   for (offs = 0; offs < 32; offs++)
288292   {
289      int xshift = m_flip_screen_x ? 128 : 0;
290      int yshift = m_flip_screen_y ? -8 : 0;
293      int xshift = m_flip_x ? 128 : 0;
294      int yshift = m_flip_y ? -8 : 0;
291295
292296      m_tilemap->set_scrollx(offs, xshift);
293297      m_solid_tilemap->set_scrollx(offs, xshift);
r245249r245250
301305   m_tilemap->draw(screen, bitmap, cliprect, 0, 0);
302306
303307   /* low priority sprites */
304   draw_sprites(bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 0);
308   draw_sprites(bitmap, m_flip_x ? spritevisibleareaflipx : spritevisiblearea, 0);
305309
306310   /* high priority tiles */
307311   m_solid_tilemap->draw(screen, bitmap, cliprect, 1, 1);
308312
309313   /* high priority sprites */
310   draw_sprites(bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 1);
314   draw_sprites(bitmap, m_flip_x ? spritevisibleareaflipx : spritevisiblearea, 1);
311315
312316   return 0;
313317}
r245249r245250
320324
321325   for (offs = 0; offs < 32; offs++)
322326   {
323      int xshift = m_flip_screen_x ? 128 : 0;
324      int yshift = m_flip_screen_y ? -8 : 0;
327      int xshift = m_flip_x ? 128 : 0;
328      int yshift = m_flip_y ? -8 : 0;
325329
326330      m_tilemap->set_scrollx(offs, xshift);
327331      m_solid_tilemap->set_scrollx(offs, xshift);
r245249r245250
337341
338342   /* low priority sprites */
339343   m_graphics_bank = 1;
340   draw_sprites(bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 0);
344   draw_sprites(bitmap, m_flip_y ? spritevisibleareaflipx : spritevisiblearea, 0);
341345
342346   /* high priority tiles */ // not sure about this, draws a white block over the title logo sprite, looks like it should be behind?
343347   m_graphics_bank = 0;
r245249r245250
345349
346350   /* high priority sprites */
347351   m_graphics_bank = 1;
348   draw_sprites(bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 1);
352   draw_sprites(bitmap, m_flip_y ? spritevisibleareaflipx : spritevisiblearea, 1);
349353
350354   return 0;
351355}
trunk/src/mess/drivers/mpf1.c
r245249r245250
3333   ADDRESS_MAP_UNMAP_HIGH
3434   AM_RANGE(0x0000, 0x0fff) AM_ROM
3535   AM_RANGE(0x1800, 0x1fff) AM_RAM
36   AM_RANGE(0x2000, 0x2fff) AM_ROM
3736ADDRESS_MAP_END
3837
3938static ADDRESS_MAP_START( mpf1b_map, AS_PROGRAM, 8, mpf1_state )
r245249r245250
438437      }
439438   }
440439
441   return 0;
440   return address;
442441}
443442
444443DRIVER_INIT_MEMBER(mpf1_state,mpf1)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team