Previous 199869 Revisions Next

r20578 Monday 28th January, 2013 at 09:56:14 UTC by David Haywood
more of the same (nw)
[src/mame/drivers]backfire.c boogwing.c dassault.c rohga.c sshangha.c
[src/mame/includes]boogwing.h cninja.h dassault.h deco32.h lemmings.h rohga.h sshangha.h
[src/mame/video]boogwing.c cninja.c dassault.c deco32.c lemmings.c rohga.c sshangha.c

trunk/src/mame/drivers/backfire.c
r20577r20578
2929      m_mainram(*this, "mainram"),
3030      m_left_priority(*this, "left_priority"),
3131      m_right_priority(*this, "right_priority"),
32      m_sprgen(*this, "spritegen")
32      m_sprgen(*this, "spritegen"),
33      m_sprgen2(*this, "spritegen2")
3334   { }
3435
3536   /* memory pointers */
r20577r20578
3940   required_shared_ptr<UINT32> m_left_priority;
4041   required_shared_ptr<UINT32> m_right_priority;
4142   optional_device<decospr_device> m_sprgen;
43   optional_device<decospr_device> m_sprgen2;
4244
4345   /* video related */
4446   bitmap_ind16  *m_left;
r20577r20578
161163   {
162164      deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 1);
163165      deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2);
164      machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
166      m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
165167   }
166168   else if (m_right_priority[0] == 2)
167169   {
168170      deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2);
169171      deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 4);
170      machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
172      m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
171173   }
172174   else
173175      popmessage( "unknown right priority %08x", m_right_priority[0]);
trunk/src/mame/drivers/rohga.c
r20577r20578
113113#include "sound/2151intf.h"
114114#include "sound/okim6295.h"
115115#include "video/decocomn.h"
116#include "video/decospr.h"
117116
118117READ16_MEMBER(rohga_state::rohga_irq_ack_r)
119118{
trunk/src/mame/drivers/sshangha.c
r20577r20578
5151#include "sound/2203intf.h"
5252#include "sound/okim6295.h"
5353#include "includes/sshangha.h"
54#include "video/decospr.h"
5554#include "video/deco16ic.h"
5655
5756#define SSHANGHA_HACK   0
trunk/src/mame/drivers/dassault.c
r20577r20578
136136#include "sound/okim6295.h"
137137#include "video/deco16ic.h"
138138#include "video/decocomn.h"
139#include "video/decospr.h"
140139
141140/**********************************************************************************/
142141
trunk/src/mame/drivers/boogwing.c
r20577r20578
8888#include "sound/okim6295.h"
8989#include "video/deco16ic.h"
9090#include "video/decocomn.h"
91#include "video/decospr.h"
9291
92
9393static ADDRESS_MAP_START( boogwing_map, AS_PROGRAM, 16, boogwing_state )
9494   AM_RANGE(0x000000, 0x0fffff) AM_ROM
9595   AM_RANGE(0x200000, 0x20ffff) AM_RAM
trunk/src/mame/includes/dassault.h
r20577r20578
88#include "video/deco16ic.h"
99#include "video/decocomn.h"
1010#include "video/bufsprite.h"
11#include "video/decospr.h"
1112
1213class dassault_state : public driver_device
1314{
r20577r20578
2728      m_pf4_rowscroll(*this, "pf4_rowscroll"),
2829      m_ram(*this, "ram"),
2930      m_shared_ram(*this, "shared_ram"),
30      m_ram2(*this, "ram2"){ }
31      m_ram2(*this, "ram2"),
32      m_sprgen1(*this, "spritegen1"),
33      m_sprgen2(*this, "spritegen2")
34   { }
3135
3236   /* devices */
3337   required_device<cpu_device> m_maincpu;
r20577r20578
4751   required_shared_ptr<UINT16> m_shared_ram;
4852   required_shared_ptr<UINT16> m_ram2;
4953
54   optional_device<decospr_device> m_sprgen1;
55   optional_device<decospr_device> m_sprgen2;
56
5057   DECLARE_READ16_MEMBER(dassault_control_r);
5158   DECLARE_WRITE16_MEMBER(dassault_control_w);
5259   DECLARE_READ16_MEMBER(dassault_sub_control_r);
trunk/src/mame/includes/boogwing.h
r20577r20578
88#include "video/deco16ic.h"
99#include "video/decocomn.h"
1010#include "video/bufsprite.h"
11#include "video/decospr.h"
1112
1213class boogwing_state : public driver_device
1314{
r20577r20578
2627      m_pf1_rowscroll(*this, "pf1_rowscroll"),
2728      m_pf2_rowscroll(*this, "pf2_rowscroll"),
2829      m_pf3_rowscroll(*this, "pf3_rowscroll"),
29      m_pf4_rowscroll(*this, "pf4_rowscroll"){ }
30      m_pf4_rowscroll(*this, "pf4_rowscroll"),
31      m_sprgen1(*this, "spritegen1"),
32      m_sprgen2(*this, "spritegen2")
33   { }
3034
3135   /* devices */
3236   required_device<cpu_device> m_maincpu;
r20577r20578
4347   required_shared_ptr<UINT16> m_pf2_rowscroll;
4448   required_shared_ptr<UINT16> m_pf3_rowscroll;
4549   required_shared_ptr<UINT16> m_pf4_rowscroll;
50   required_device<decospr_device> m_sprgen1;
51   required_device<decospr_device> m_sprgen2;
4652
4753   DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
4854   DECLARE_DRIVER_INIT(boogwing);
trunk/src/mame/includes/cninja.h
r20577r20578
2929      m_pf3_rowscroll(*this, "pf3_rowscroll"),
3030      m_pf4_rowscroll(*this, "pf4_rowscroll"),
3131      m_ram(*this, "ram"),
32      m_sprgen(*this, "spritegen")
32      m_sprgen(*this, "spritegen"),
33      m_sprgen1(*this, "spritegen1"),
34      m_sprgen2(*this, "spritegen2")
3335   { }
3436
3537   /* devices */
r20577r20578
4951   required_shared_ptr<UINT16> m_pf4_rowscroll;
5052   optional_shared_ptr<UINT16> m_ram;
5153   optional_device<decospr_device> m_sprgen;
54   optional_device<decospr_device> m_sprgen1;
55   optional_device<decospr_device> m_sprgen2;
5256
5357   /* misc */
5458   int        m_scanline;
trunk/src/mame/includes/sshangha.h
r20577r20578
11#include "video/deco16ic.h"
2#include "video/decospr.h"
23
34class sshangha_state : public driver_device
45{
r20577r20578
1516      m_tile_paletteram2(*this, "tile_palram2"),
1617      m_sprite_paletteram2(*this, "sprite_palram2"),
1718      m_tile_paletteram1(*this, "tile_palram1"),
18      m_prot_data(*this, "prot_data"){ }
19      m_prot_data(*this, "prot_data"),
20      m_sprgen1(*this, "spritegen1"),
21      m_sprgen2(*this, "spritegen2")
22   { }
1923
2024   required_device<deco16ic_device> m_deco_tilegen1;
2125   required_shared_ptr<UINT16> m_spriteram;
r20577r20578
3135   required_shared_ptr<UINT16> m_tile_paletteram1;
3236
3337   optional_shared_ptr<UINT16> m_prot_data;
38
39   optional_device<decospr_device> m_sprgen1;
40   optional_device<decospr_device> m_sprgen2;
41
3442   int m_video_control;
3543
3644
trunk/src/mame/includes/rohga.h
r20577r20578
88#include "video/deco16ic.h"
99#include "video/decocomn.h"
1010#include "video/bufsprite.h"
11#include "video/decospr.h"
1112
1213class rohga_state : public driver_device
1314{
r20577r20578
2627      m_pf1_rowscroll(*this, "pf1_rowscroll"),
2728      m_pf2_rowscroll(*this, "pf2_rowscroll"),
2829      m_pf3_rowscroll(*this, "pf3_rowscroll"),
29      m_pf4_rowscroll(*this, "pf4_rowscroll"){ }
30      m_pf4_rowscroll(*this, "pf4_rowscroll"),
31      m_sprgen1(*this, "spritegen1"),
32      m_sprgen2(*this, "spritegen2")
33   { }
3034
3135   /* devices */
3236   required_device<cpu_device> m_maincpu;
r20577r20578
4549   required_shared_ptr<UINT16> m_pf3_rowscroll;
4650   required_shared_ptr<UINT16> m_pf4_rowscroll;
4751
52   optional_device<decospr_device> m_sprgen1;
53   optional_device<decospr_device> m_sprgen2;
4854
4955   DECLARE_READ16_MEMBER(rohga_irq_ack_r);
5056   DECLARE_WRITE16_MEMBER(wizdfire_irq_ack_w);
trunk/src/mame/includes/lemmings.h
r20577r20578
1414      m_vram_data(*this, "vram_data"),
1515      m_pixel_0_data(*this, "pixel_0_data"),
1616      m_pixel_1_data(*this, "pixel_1_data"),
17      m_sprgen(*this, "spritegen")
17      m_sprgen(*this, "spritegen"),
18      m_sprgen2(*this, "spritegen2")
1819   { }
1920
2021   /* video-related */
r20577r20578
3435   required_shared_ptr<UINT16> m_pixel_0_data;
3536   required_shared_ptr<UINT16> m_pixel_1_data;
3637   optional_device<decospr_device> m_sprgen;
38   optional_device<decospr_device> m_sprgen2;
3739
3840   DECLARE_WRITE16_MEMBER(lemmings_control_w);
3941   DECLARE_READ16_MEMBER(lemmings_trackball_r);
trunk/src/mame/includes/deco32.h
r20577r20578
1616      m_pf3_rowscroll32(*this, "pf3_rowscroll32"),
1717      m_pf4_rowscroll32(*this, "pf4_rowscroll32"),
1818      m_ace_ram(*this, "ace_ram"),
19      m_sprgen(*this, "spritegen")
19      m_sprgen(*this, "spritegen"),
20      m_sprgen1(*this, "spritegen1"),
21      m_sprgen2(*this, "spritegen2")
2022   { }
2123
2224   required_device<cpu_device> m_maincpu;
r20577r20578
3133
3234   optional_shared_ptr<UINT32> m_ace_ram;
3335   optional_device<decospr_device> m_sprgen;
36   optional_device<decospr_device> m_sprgen1;
37   optional_device<decospr_device> m_sprgen2;
3438
3539   int m_raster_enable;
3640   timer_device *m_raster_irq_timer;
trunk/src/mame/video/sshangha.c
r20577r20578
77
88#include "emu.h"
99#include "includes/sshangha.h"
10#include "video/decospr.h"
1110
11
1212/******************************************************************************/
1313
1414WRITE16_MEMBER(sshangha_state::sshangha_video_w)
r20577r20578
2222
2323void sshangha_state::video_start()
2424{
25   machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
26   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
25   m_sprgen1->alloc_sprite_bitmap();
26   m_sprgen2->alloc_sprite_bitmap();
2727}
2828
2929/******************************************************************************/
3030
3131UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
3232{
33   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram, 0x800, true);
33   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram, 0x800, true);
3434
3535   // I'm pretty sure only the original has the 2nd spriteram, used for the Japanese text on the 2nd scene (non-scrolling text) in the intro of the quest (3rd in JPN) mode
3636   if (m_spriteram2 != NULL)
37      machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true);
37      m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true);
3838
3939   machine().tilemap().set_flip_all(flip_screen_x() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
4040
r20577r20578
4545   /* the tilemap 4bpp + 4bpp = 8bpp mixing actually seems external to the tilemap, note video_control is not part of the tilemap chip */
4646   if ((m_video_control&4)==0) {
4747      deco16ic_tilemap_12_combine_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0, 1);
48      machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
48      m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
4949   }
5050   else {
5151      deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
52      machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
52      m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
5353      deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
5454   }
5555
5656   if (m_spriteram2 != NULL)
57      machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0, 0x1ff);
57      m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0, 0x1ff);
5858
59   machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0200, 0, 0x1ff);
59   m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0200, 0, 0x1ff);
6060   return 0;
6161}
trunk/src/mame/video/lemmings.c
r20577r20578
3939   machine().gfx[2]->set_source(m_vram_buffer);
4040
4141   m_sprgen->alloc_sprite_bitmap();
42   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
42   m_sprgen2->alloc_sprite_bitmap();
4343
4444   save_item(NAME(m_bitmap0));
4545   save_item(NAME(m_vram_buffer));
r20577r20578
136136   rect.min_y = cliprect.min_y;
137137
138138   m_sprgen->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_1, 0x400, true);
139   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_0, 0x400, true);
139   m_sprgen2->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_0, 0x400, true);
140140
141141   bitmap.fill(get_black_pen(machine()), cliprect);
142142   m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x300, 0xff);
r20577r20578
157157      lemmings_copy_bitmap(machine(), bitmap, m_bitmap0, &x1, &y, rect);
158158   }
159159
160   machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0xff);
160   m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0xff);
161161   m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x300, 0xff);
162162   m_vram_tilemap->draw(bitmap, cliprect, 0, 0);
163   machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0xff);
163   m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0xff);
164164   return 0;
165165}
trunk/src/mame/video/deco32.c
r20577r20578
548548   width = machine().primary_screen->width();
549549   height = machine().primary_screen->height();
550550   m_tilemap_alpha_bitmap=auto_bitmap_ind16_alloc(machine(), width, height );
551   machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
552   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
551   m_sprgen1->alloc_sprite_bitmap();
552   m_sprgen2->alloc_sprite_bitmap();
553553   memset(m_dirty_palette,0,4096);
554554   state_save_register_global(machine(), m_pri);
555555   m_has_ace_ram=1;
r20577r20578
840840   bitmap.fill(machine().pens[0x200], cliprect);
841841
842842   /* Draw sprites to temporary bitmaps, saving alpha & priority info for later mixing */
843   machine().device<decospr_device>("spritegen1")->set_pix_raw_shift(8);
844   machine().device<decospr_device>("spritegen2")->set_pix_raw_shift(8);
843   m_sprgen1->set_pix_raw_shift(8);
844   m_sprgen2->set_pix_raw_shift(8);
845845
846   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x800, true);
847   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram16_2_buffered, 0x800, true);
846   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x800, true);
847   m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram16_2_buffered, 0x800, true);
848848
849849
850850   /* Render alpha-blended tilemap to separate buffer for proper mixing */
trunk/src/mame/video/dassault.c
r20577r20578
1717#include "video/deco16ic.h"
1818#include "includes/dassault.h"
1919#include "video/decocomn.h"
20#include "video/decospr.h"
2120
2221/******************************************************************************/
2322
2423void dassault_state::video_start()
2524{
26   machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
27   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
25   m_sprgen1->alloc_sprite_bitmap();
26   m_sprgen2->alloc_sprite_bitmap();
2827}
2928
3029static void mixdassaultlayer(running_machine &machine, bitmap_rgb32 &bitmap, bitmap_ind16* sprite_bitmap, const rectangle &cliprect, UINT16 pri, UINT16 primask, UINT16 penbase, UINT8 alpha)
r20577r20578
8079   UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff);
8180   UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff);
8281
83   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
84   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
85   bitmap_ind16* sprite_bitmap1 = &machine().device<decospr_device>("spritegen1")->get_sprite_temp_bitmap();
86   bitmap_ind16* sprite_bitmap2 = &machine().device<decospr_device>("spritegen2")->get_sprite_temp_bitmap();
82   m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
83   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
84   bitmap_ind16* sprite_bitmap1 = &m_sprgen1->get_sprite_temp_bitmap();
85   bitmap_ind16* sprite_bitmap2 = &m_sprgen2->get_sprite_temp_bitmap();
8786
8887   /* Update tilemaps */
8988   flip_screen_set(BIT(flip, 7));
trunk/src/mame/video/rohga.c
r20577r20578
77#include "emu.h"
88#include "includes/rohga.h"
99#include "video/deco16ic.h"
10#include "video/decospr.h"
1110
11
1212WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
1313{
1414   // Spriteram seems to be triple buffered (no sprite lag on real pcb, but there
r20577r20578
1818
1919VIDEO_START_MEMBER(rohga_state,rohga)
2020{
21   machine().device<decospr_device>("spritegen1")->set_col_callback(rohga_col_callback);
22   machine().device<decospr_device>("spritegen1")->set_pri_callback(rohga_pri_callback);
21   m_sprgen1->set_col_callback(rohga_col_callback);
22   m_sprgen1->set_pri_callback(rohga_pri_callback);
2323}
2424
2525VIDEO_START_MEMBER(rohga_state,schmeisr)
2626{
2727   VIDEO_START_CALL_MEMBER( rohga );
2828   // wire mods on pcb..
29   machine().device<decospr_device>("spritegen1")->set_col_callback(schmeisr_col_callback);
29   m_sprgen1->set_col_callback(schmeisr_col_callback);
3030}
3131
3232
r20577r20578
104104      break;
105105   }
106106
107   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
107   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
108108   deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
109109
110110   return 0;
r20577r20578
114114
115115VIDEO_START_MEMBER(rohga_state,wizdfire)
116116{
117   machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
118   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
117   m_sprgen1->alloc_sprite_bitmap();
118   m_sprgen2->alloc_sprite_bitmap();
119119}
120120
121121// not amazingly efficient, called multiple times to pull a layer out of the sprite bitmaps, but keeps correct sprite<->sprite priorities
r20577r20578
171171   UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff);
172172
173173   /* draw sprite gfx to temp bitmaps */
174   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
175   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
174   m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
175   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
176176
177177   /* Update playfields */
178178   flip_screen_set(BIT(flip, 7));
r20577r20578
183183   bitmap.fill(machine().pens[512], cliprect);
184184
185185   deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
186   machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
186   m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
187187   deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
188   machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
188   m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
189189
190190   if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */
191191      deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
192192   else
193193      deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0);
194194
195   machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
195   m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
196196
197197   mixwizdfirelayer(machine(), bitmap, cliprect, 4, 0x000, 0x000);
198198
r20577r20578
206206   UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff);
207207
208208   /* draw sprite gfx to temp bitmaps */
209   machine().device<decospr_device>("spritegen1")->set_alt_format(true);
210   machine().device<decospr_device>("spritegen2")->set_alt_format(true);
211   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
212   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
209   m_sprgen1->set_alt_format(true);
210   m_sprgen2->set_alt_format(true);
211   m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
212   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
213213
214214   /* Update playfields */
215215   flip_screen_set(BIT(flip, 7));
r20577r20578
226226   deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 16);
227227
228228   /* ToDo reimplement priorities + mixing / alpha, it was busted worse than this before anyway, so no big loss that we don't do it for now ;-) */
229   machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x600, 0xff);
230   machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x400, 0x1ff);
229   m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x600, 0xff);
230   m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x400, 0x1ff);
231231
232232
233233   deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
trunk/src/mame/video/boogwing.c
r20577r20578
22#include "includes/boogwing.h"
33#include "video/deco16ic.h"
44#include "video/decocomn.h"
5#include "video/decospr.h"
65
6
77void boogwing_state::video_start()
88{
9   machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
10   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
9   m_sprgen1->alloc_sprite_bitmap();
10   m_sprgen2->alloc_sprite_bitmap();
1111}
1212
1313
r20577r20578
3131   address_space &space = machine.driver_data()->generic_space();
3232   UINT16 priority = decocomn_priority_r(state->m_decocomn, space, 0, 0xffff);
3333
34   sprite_bitmap1 = &machine.device<decospr_device>("spritegen1")->get_sprite_temp_bitmap();
35   sprite_bitmap2 = &machine.device<decospr_device>("spritegen2")->get_sprite_temp_bitmap();
34   sprite_bitmap1 = &state->m_sprgen1->get_sprite_temp_bitmap();
35   sprite_bitmap2 = &state->m_sprgen1->get_sprite_temp_bitmap();
3636   priority_bitmap = &machine.priority_bitmap;
3737
3838   UINT32* dstline;
r20577r20578
185185   UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff);
186186
187187   /* Draw sprite planes to bitmaps for later mixing */
188   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
189   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
188   m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
189   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
190190
191191   flip_screen_set(BIT(flip, 7));
192192   deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll);
trunk/src/mame/video/cninja.c
r20577r20578
240240
241241VIDEO_START_MEMBER(cninja_state,mutantf)
242242{
243   machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
244   machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
243   m_sprgen1->alloc_sprite_bitmap();
244   m_sprgen2->alloc_sprite_bitmap();
245245}
246246
247247UINT32 cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
r20577r20578
258258   /* Draw playfields */
259259   bitmap.fill(0x400, cliprect); /* Confirmed */
260260
261   machine().device<decospr_device>("spritegen1")->set_alt_format(true);
262   machine().device<decospr_device>("spritegen2")->set_alt_format(true);
263   machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
264   machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
261   m_sprgen1->set_alt_format(true);
262   m_sprgen2->set_alt_format(true);
263   m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
264   m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
265265
266266
267267   /* There is no priority prom on this board, but there is a
r20577r20578
282282
283283   if (priority & 1)
284284   {
285      machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
286      machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer?
285      m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
286      m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer?
287287   }
288288   else
289289   {
290      machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80);  // fixed alpha of 0x80 for this layer?
291      machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
290      m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80);  // fixed alpha of 0x80 for this layer?
291      m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
292292   }
293293   deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
294294   return 0;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team