trunk/src/mame/drivers/rallyx.c
| r31613 | r31614 | |
| 832 | 832 | |
| 833 | 833 | INTERRUPT_GEN_MEMBER(rallyx_state::rallyx_vblank_irq) |
| 834 | 834 | { |
| 835 | | if(m_main_irq_mask) |
| 835 | if (m_main_irq_mask) |
| 836 | 836 | device.execute().set_input_line(0, ASSERT_LINE); |
| 837 | 837 | } |
| 838 | 838 | |
| 839 | 839 | INTERRUPT_GEN_MEMBER(rallyx_state::jungler_vblank_irq) |
| 840 | 840 | { |
| 841 | | if(m_main_irq_mask) |
| 841 | if (m_main_irq_mask) |
| 842 | 842 | device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 843 | 843 | } |
| 844 | 844 | |
| r31613 | r31614 | |
| 848 | 848 | MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ |
| 849 | 849 | MCFG_CPU_PROGRAM_MAP(rallyx_map) |
| 850 | 850 | MCFG_CPU_IO_MAP(io_map) |
| 851 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", rallyx_state, rallyx_vblank_irq) |
| 851 | MCFG_CPU_VBLANK_INT_DRIVER("screen", rallyx_state, rallyx_vblank_irq) |
| 852 | 852 | |
| 853 | 853 | MCFG_MACHINE_START_OVERRIDE(rallyx_state,rallyx) |
| 854 | 854 | MCFG_MACHINE_RESET_OVERRIDE(rallyx_state,rallyx) |
| r31613 | r31614 | |
| 887 | 887 | /* basic machine hardware */ |
| 888 | 888 | MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/6) /* 3.072 MHz */ |
| 889 | 889 | MCFG_CPU_PROGRAM_MAP(jungler_map) |
| 890 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", rallyx_state, jungler_vblank_irq) |
| 890 | MCFG_CPU_VBLANK_INT_DRIVER("screen", rallyx_state, jungler_vblank_irq) |
| 891 | 891 | |
| 892 | 892 | MCFG_MACHINE_START_OVERRIDE(rallyx_state,rallyx) |
| 893 | 893 | MCFG_MACHINE_RESET_OVERRIDE(rallyx_state,rallyx) |
trunk/src/mame/includes/rallyx.h
| r31613 | r31614 | |
| 84 | 84 | void rallyx_video_start_common( ); |
| 85 | 85 | void plot_star( bitmap_ind16 &bitmap, const rectangle &cliprect, int x, int y, int color ); |
| 86 | 86 | void draw_stars( bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 87 | | void rallyx_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int displacement ); |
| 88 | | void locomotn_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int displacement ); |
| 87 | void rallyx_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 88 | void locomotn_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 89 | 89 | void rallyx_draw_bullets( bitmap_ind16 &bitmap, const rectangle &cliprect, int transpen ); |
| 90 | 90 | void jungler_draw_bullets( bitmap_ind16 &bitmap, const rectangle &cliprect, int transpen ); |
| 91 | 91 | void locomotn_draw_bullets( bitmap_ind16 &bitmap, const rectangle &cliprect, int transpen ); |
trunk/src/mame/video/rallyx.c
| r31613 | r31614 | |
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | |
| 442 | | void rallyx_state::rallyx_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int displacement ) |
| 442 | void rallyx_state::rallyx_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 443 | 443 | { |
| 444 | 444 | UINT8 *spriteram = m_spriteram; |
| 445 | 445 | UINT8 *spriteram_2 = m_spriteram2; |
| r31613 | r31614 | |
| 447 | 447 | |
| 448 | 448 | for (offs = 0x20 - 2; offs >= m_spriteram_base; offs -= 2) |
| 449 | 449 | { |
| 450 | | int sx = spriteram[offs + 1] + ((spriteram_2[offs + 1] & 0x80) << 1) - displacement; |
| 451 | | int sy = 241 - spriteram_2[offs] - displacement; |
| 450 | int sx = spriteram[offs + 1] + ((spriteram_2[offs + 1] & 0x80) << 1); |
| 451 | int sy = 241 - spriteram_2[offs]; |
| 452 | 452 | int color = spriteram_2[offs + 1] & 0x3f; |
| 453 | 453 | int flipx = spriteram[offs] & 1; |
| 454 | 454 | int flipy = spriteram[offs] & 2; |
| 455 | | if (flip_screen()) |
| 456 | | sx -= 2 * displacement; |
| 457 | 455 | |
| 458 | 456 | m_gfxdecode->gfx(1)->prio_transmask(bitmap,cliprect, |
| 459 | 457 | (spriteram[offs] & 0xfc) >> 2, |
| r31613 | r31614 | |
| 465 | 463 | } |
| 466 | 464 | } |
| 467 | 465 | |
| 468 | | void rallyx_state::locomotn_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int displacement ) |
| 466 | void rallyx_state::locomotn_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 469 | 467 | { |
| 470 | 468 | UINT8 *spriteram = m_spriteram; |
| 471 | 469 | UINT8 *spriteram_2 = m_spriteram2; |
| r31613 | r31614 | |
| 474 | 472 | for (offs = 0x20 - 2; offs >= m_spriteram_base; offs -= 2) |
| 475 | 473 | { |
| 476 | 474 | int sx = spriteram[offs + 1] + ((spriteram_2[offs + 1] & 0x80) << 1); |
| 477 | | int sy = 241 - spriteram_2[offs] - displacement; |
| 475 | int sy = 241 - spriteram_2[offs]; |
| 478 | 476 | int color = spriteram_2[offs + 1] & 0x3f; |
| 479 | 477 | int flip = spriteram[offs] & 2; |
| 480 | 478 | |
| r31613 | r31614 | |
| 609 | 607 | m_fg_tilemap->draw(screen, bitmap, fg_clip, 1, 1); |
| 610 | 608 | |
| 611 | 609 | rallyx_draw_bullets(bitmap, cliprect, TRUE); |
| 612 | | rallyx_draw_sprites(screen, bitmap, cliprect, 1); |
| 610 | rallyx_draw_sprites(screen, bitmap, cliprect); |
| 613 | 611 | rallyx_draw_bullets(bitmap, cliprect, FALSE); |
| 614 | 612 | |
| 615 | 613 | return 0; |
| r31613 | r31614 | |
| 643 | 641 | m_fg_tilemap->draw(screen, bitmap, fg_clip, 1, 0); |
| 644 | 642 | |
| 645 | 643 | jungler_draw_bullets(bitmap, cliprect, TRUE); |
| 646 | | rallyx_draw_sprites(screen, bitmap, cliprect, 0); |
| 644 | rallyx_draw_sprites(screen, bitmap, cliprect); |
| 647 | 645 | jungler_draw_bullets(bitmap, cliprect, FALSE); |
| 648 | 646 | |
| 649 | 647 | if (m_stars_enable) |
| r31613 | r31614 | |
| 688 | 686 | m_fg_tilemap->draw(screen, bitmap, fg_clip, 1, 1); |
| 689 | 687 | |
| 690 | 688 | locomotn_draw_bullets(bitmap, cliprect, TRUE); |
| 691 | | locomotn_draw_sprites(screen, bitmap, cliprect, 0); |
| 689 | locomotn_draw_sprites(screen, bitmap, cliprect); |
| 692 | 690 | locomotn_draw_bullets(bitmap, cliprect, FALSE); |
| 693 | 691 | |
| 694 | 692 | if (m_stars_enable) |