trunk/src/mame/drivers/backfire.c
| r20577 | r20578 | |
| 29 | 29 | m_mainram(*this, "mainram"), |
| 30 | 30 | m_left_priority(*this, "left_priority"), |
| 31 | 31 | m_right_priority(*this, "right_priority"), |
| 32 | | m_sprgen(*this, "spritegen") |
| 32 | m_sprgen(*this, "spritegen"), |
| 33 | m_sprgen2(*this, "spritegen2") |
| 33 | 34 | { } |
| 34 | 35 | |
| 35 | 36 | /* memory pointers */ |
| r20577 | r20578 | |
| 39 | 40 | required_shared_ptr<UINT32> m_left_priority; |
| 40 | 41 | required_shared_ptr<UINT32> m_right_priority; |
| 41 | 42 | optional_device<decospr_device> m_sprgen; |
| 43 | optional_device<decospr_device> m_sprgen2; |
| 42 | 44 | |
| 43 | 45 | /* video related */ |
| 44 | 46 | bitmap_ind16 *m_left; |
| r20577 | r20578 | |
| 161 | 163 | { |
| 162 | 164 | deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 1); |
| 163 | 165 | 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); |
| 165 | 167 | } |
| 166 | 168 | else if (m_right_priority[0] == 2) |
| 167 | 169 | { |
| 168 | 170 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2); |
| 169 | 171 | 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); |
| 171 | 173 | } |
| 172 | 174 | else |
| 173 | 175 | popmessage( "unknown right priority %08x", m_right_priority[0]); |
trunk/src/mame/video/sshangha.c
| r20577 | r20578 | |
| 7 | 7 | |
| 8 | 8 | #include "emu.h" |
| 9 | 9 | #include "includes/sshangha.h" |
| 10 | | #include "video/decospr.h" |
| 11 | 10 | |
| 11 | |
| 12 | 12 | /******************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | WRITE16_MEMBER(sshangha_state::sshangha_video_w) |
| r20577 | r20578 | |
| 22 | 22 | |
| 23 | 23 | void sshangha_state::video_start() |
| 24 | 24 | { |
| 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(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /******************************************************************************/ |
| 30 | 30 | |
| 31 | 31 | UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 32 | 32 | { |
| 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); |
| 34 | 34 | |
| 35 | 35 | // 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 |
| 36 | 36 | 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); |
| 38 | 38 | |
| 39 | 39 | machine().tilemap().set_flip_all(flip_screen_x() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); |
| 40 | 40 | |
| r20577 | r20578 | |
| 45 | 45 | /* the tilemap 4bpp + 4bpp = 8bpp mixing actually seems external to the tilemap, note video_control is not part of the tilemap chip */ |
| 46 | 46 | if ((m_video_control&4)==0) { |
| 47 | 47 | 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); |
| 49 | 49 | } |
| 50 | 50 | else { |
| 51 | 51 | 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); |
| 53 | 53 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | 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); |
| 58 | 58 | |
| 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); |
| 60 | 60 | return 0; |
| 61 | 61 | } |
trunk/src/mame/video/lemmings.c
| r20577 | r20578 | |
| 39 | 39 | machine().gfx[2]->set_source(m_vram_buffer); |
| 40 | 40 | |
| 41 | 41 | m_sprgen->alloc_sprite_bitmap(); |
| 42 | | machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap(); |
| 42 | m_sprgen2->alloc_sprite_bitmap(); |
| 43 | 43 | |
| 44 | 44 | save_item(NAME(m_bitmap0)); |
| 45 | 45 | save_item(NAME(m_vram_buffer)); |
| r20577 | r20578 | |
| 136 | 136 | rect.min_y = cliprect.min_y; |
| 137 | 137 | |
| 138 | 138 | 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); |
| 140 | 140 | |
| 141 | 141 | bitmap.fill(get_black_pen(machine()), cliprect); |
| 142 | 142 | m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x300, 0xff); |
| r20577 | r20578 | |
| 157 | 157 | lemmings_copy_bitmap(machine(), bitmap, m_bitmap0, &x1, &y, rect); |
| 158 | 158 | } |
| 159 | 159 | |
| 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); |
| 161 | 161 | m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x300, 0xff); |
| 162 | 162 | 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); |
| 164 | 164 | return 0; |
| 165 | 165 | } |
trunk/src/mame/video/deco32.c
| r20577 | r20578 | |
| 548 | 548 | width = machine().primary_screen->width(); |
| 549 | 549 | height = machine().primary_screen->height(); |
| 550 | 550 | 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(); |
| 553 | 553 | memset(m_dirty_palette,0,4096); |
| 554 | 554 | state_save_register_global(machine(), m_pri); |
| 555 | 555 | m_has_ace_ram=1; |
| r20577 | r20578 | |
| 840 | 840 | bitmap.fill(machine().pens[0x200], cliprect); |
| 841 | 841 | |
| 842 | 842 | /* 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); |
| 845 | 845 | |
| 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); |
| 848 | 848 | |
| 849 | 849 | |
| 850 | 850 | /* Render alpha-blended tilemap to separate buffer for proper mixing */ |
trunk/src/mame/video/dassault.c
| r20577 | r20578 | |
| 17 | 17 | #include "video/deco16ic.h" |
| 18 | 18 | #include "includes/dassault.h" |
| 19 | 19 | #include "video/decocomn.h" |
| 20 | | #include "video/decospr.h" |
| 21 | 20 | |
| 22 | 21 | /******************************************************************************/ |
| 23 | 22 | |
| 24 | 23 | void dassault_state::video_start() |
| 25 | 24 | { |
| 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(); |
| 28 | 27 | } |
| 29 | 28 | |
| 30 | 29 | static void mixdassaultlayer(running_machine &machine, bitmap_rgb32 &bitmap, bitmap_ind16* sprite_bitmap, const rectangle &cliprect, UINT16 pri, UINT16 primask, UINT16 penbase, UINT8 alpha) |
| r20577 | r20578 | |
| 80 | 79 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
| 81 | 80 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
| 82 | 81 | |
| 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(); |
| 87 | 86 | |
| 88 | 87 | /* Update tilemaps */ |
| 89 | 88 | flip_screen_set(BIT(flip, 7)); |
trunk/src/mame/video/rohga.c
| r20577 | r20578 | |
| 7 | 7 | #include "emu.h" |
| 8 | 8 | #include "includes/rohga.h" |
| 9 | 9 | #include "video/deco16ic.h" |
| 10 | | #include "video/decospr.h" |
| 11 | 10 | |
| 11 | |
| 12 | 12 | WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w) |
| 13 | 13 | { |
| 14 | 14 | // Spriteram seems to be triple buffered (no sprite lag on real pcb, but there |
| r20577 | r20578 | |
| 18 | 18 | |
| 19 | 19 | VIDEO_START_MEMBER(rohga_state,rohga) |
| 20 | 20 | { |
| 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); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | VIDEO_START_MEMBER(rohga_state,schmeisr) |
| 26 | 26 | { |
| 27 | 27 | VIDEO_START_CALL_MEMBER( rohga ); |
| 28 | 28 | // 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); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
| r20577 | r20578 | |
| 104 | 104 | break; |
| 105 | 105 | } |
| 106 | 106 | |
| 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); |
| 108 | 108 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
| 109 | 109 | |
| 110 | 110 | return 0; |
| r20577 | r20578 | |
| 114 | 114 | |
| 115 | 115 | VIDEO_START_MEMBER(rohga_state,wizdfire) |
| 116 | 116 | { |
| 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(); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // not amazingly efficient, called multiple times to pull a layer out of the sprite bitmaps, but keeps correct sprite<->sprite priorities |
| r20577 | r20578 | |
| 171 | 171 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
| 172 | 172 | |
| 173 | 173 | /* 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); |
| 176 | 176 | |
| 177 | 177 | /* Update playfields */ |
| 178 | 178 | flip_screen_set(BIT(flip, 7)); |
| r20577 | r20578 | |
| 183 | 183 | bitmap.fill(machine().pens[512], cliprect); |
| 184 | 184 | |
| 185 | 185 | 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); |
| 187 | 187 | 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); |
| 189 | 189 | |
| 190 | 190 | if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */ |
| 191 | 191 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0); |
| 192 | 192 | else |
| 193 | 193 | deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0); |
| 194 | 194 | |
| 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 |
| 196 | 196 | |
| 197 | 197 | mixwizdfirelayer(machine(), bitmap, cliprect, 4, 0x000, 0x000); |
| 198 | 198 | |
| r20577 | r20578 | |
| 206 | 206 | UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff); |
| 207 | 207 | |
| 208 | 208 | /* 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); |
| 213 | 213 | |
| 214 | 214 | /* Update playfields */ |
| 215 | 215 | flip_screen_set(BIT(flip, 7)); |
| r20577 | r20578 | |
| 226 | 226 | deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 16); |
| 227 | 227 | |
| 228 | 228 | /* 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); |
| 231 | 231 | |
| 232 | 232 | |
| 233 | 233 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
trunk/src/mame/video/boogwing.c
| r20577 | r20578 | |
| 2 | 2 | #include "includes/boogwing.h" |
| 3 | 3 | #include "video/deco16ic.h" |
| 4 | 4 | #include "video/decocomn.h" |
| 5 | | #include "video/decospr.h" |
| 6 | 5 | |
| 6 | |
| 7 | 7 | void boogwing_state::video_start() |
| 8 | 8 | { |
| 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(); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | |
| r20577 | r20578 | |
| 31 | 31 | address_space &space = machine.driver_data()->generic_space(); |
| 32 | 32 | UINT16 priority = decocomn_priority_r(state->m_decocomn, space, 0, 0xffff); |
| 33 | 33 | |
| 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(); |
| 36 | 36 | priority_bitmap = &machine.priority_bitmap; |
| 37 | 37 | |
| 38 | 38 | UINT32* dstline; |
| r20577 | r20578 | |
| 185 | 185 | UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff); |
| 186 | 186 | |
| 187 | 187 | /* 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); |
| 190 | 190 | |
| 191 | 191 | flip_screen_set(BIT(flip, 7)); |
| 192 | 192 | deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll); |
trunk/src/mame/video/cninja.c
| r20577 | r20578 | |
| 240 | 240 | |
| 241 | 241 | VIDEO_START_MEMBER(cninja_state,mutantf) |
| 242 | 242 | { |
| 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(); |
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | UINT32 cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| r20577 | r20578 | |
| 258 | 258 | /* Draw playfields */ |
| 259 | 259 | bitmap.fill(0x400, cliprect); /* Confirmed */ |
| 260 | 260 | |
| 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); |
| 265 | 265 | |
| 266 | 266 | |
| 267 | 267 | /* There is no priority prom on this board, but there is a |
| r20577 | r20578 | |
| 282 | 282 | |
| 283 | 283 | if (priority & 1) |
| 284 | 284 | { |
| 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? |
| 287 | 287 | } |
| 288 | 288 | else |
| 289 | 289 | { |
| 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); |
| 292 | 292 | } |
| 293 | 293 | deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0); |
| 294 | 294 | return 0; |