more of the same (nw)

This commit is contained in:
David Haywood 2013-01-28 09:56:14 +00:00
parent be2f33dc36
commit 7e430b6347
19 changed files with 110 additions and 75 deletions

View File

@ -29,7 +29,8 @@ public:
m_mainram(*this, "mainram"),
m_left_priority(*this, "left_priority"),
m_right_priority(*this, "right_priority"),
m_sprgen(*this, "spritegen")
m_sprgen(*this, "spritegen"),
m_sprgen2(*this, "spritegen2")
{ }
/* memory pointers */
@ -39,6 +40,7 @@ public:
required_shared_ptr<UINT32> m_left_priority;
required_shared_ptr<UINT32> m_right_priority;
optional_device<decospr_device> m_sprgen;
optional_device<decospr_device> m_sprgen2;
/* video related */
bitmap_ind16 *m_left;
@ -161,13 +163,13 @@ UINT32 backfire_state::screen_update_backfire_right(screen_device &screen, bitma
{
deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 1);
deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
}
else if (m_right_priority[0] == 2)
{
deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, 0, 4);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram_2, 0x800);
}
else
popmessage( "unknown right priority %08x", m_right_priority[0]);

View File

@ -88,7 +88,7 @@
#include "sound/okim6295.h"
#include "video/deco16ic.h"
#include "video/decocomn.h"
#include "video/decospr.h"
static ADDRESS_MAP_START( boogwing_map, AS_PROGRAM, 16, boogwing_state )
AM_RANGE(0x000000, 0x0fffff) AM_ROM

View File

@ -136,7 +136,6 @@ Dip locations verified with US conversion kit manual.
#include "sound/okim6295.h"
#include "video/deco16ic.h"
#include "video/decocomn.h"
#include "video/decospr.h"
/**********************************************************************************/

View File

@ -113,7 +113,6 @@
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decocomn.h"
#include "video/decospr.h"
READ16_MEMBER(rohga_state::rohga_irq_ack_r)
{

View File

@ -51,7 +51,6 @@ Stephh's notes (based on the games M68000 code and some tests) :
#include "sound/2203intf.h"
#include "sound/okim6295.h"
#include "includes/sshangha.h"
#include "video/decospr.h"
#include "video/deco16ic.h"
#define SSHANGHA_HACK 0

View File

@ -8,6 +8,7 @@
#include "video/deco16ic.h"
#include "video/decocomn.h"
#include "video/bufsprite.h"
#include "video/decospr.h"
class boogwing_state : public driver_device
{
@ -26,7 +27,10 @@ public:
m_pf1_rowscroll(*this, "pf1_rowscroll"),
m_pf2_rowscroll(*this, "pf2_rowscroll"),
m_pf3_rowscroll(*this, "pf3_rowscroll"),
m_pf4_rowscroll(*this, "pf4_rowscroll"){ }
m_pf4_rowscroll(*this, "pf4_rowscroll"),
m_sprgen1(*this, "spritegen1"),
m_sprgen2(*this, "spritegen2")
{ }
/* devices */
required_device<cpu_device> m_maincpu;
@ -43,6 +47,8 @@ public:
required_shared_ptr<UINT16> m_pf2_rowscroll;
required_shared_ptr<UINT16> m_pf3_rowscroll;
required_shared_ptr<UINT16> m_pf4_rowscroll;
required_device<decospr_device> m_sprgen1;
required_device<decospr_device> m_sprgen2;
DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
DECLARE_DRIVER_INIT(boogwing);

View File

@ -29,7 +29,9 @@ public:
m_pf3_rowscroll(*this, "pf3_rowscroll"),
m_pf4_rowscroll(*this, "pf4_rowscroll"),
m_ram(*this, "ram"),
m_sprgen(*this, "spritegen")
m_sprgen(*this, "spritegen"),
m_sprgen1(*this, "spritegen1"),
m_sprgen2(*this, "spritegen2")
{ }
/* devices */
@ -49,6 +51,8 @@ public:
required_shared_ptr<UINT16> m_pf4_rowscroll;
optional_shared_ptr<UINT16> m_ram;
optional_device<decospr_device> m_sprgen;
optional_device<decospr_device> m_sprgen1;
optional_device<decospr_device> m_sprgen2;
/* misc */
int m_scanline;

View File

@ -8,6 +8,7 @@
#include "video/deco16ic.h"
#include "video/decocomn.h"
#include "video/bufsprite.h"
#include "video/decospr.h"
class dassault_state : public driver_device
{
@ -27,7 +28,10 @@ public:
m_pf4_rowscroll(*this, "pf4_rowscroll"),
m_ram(*this, "ram"),
m_shared_ram(*this, "shared_ram"),
m_ram2(*this, "ram2"){ }
m_ram2(*this, "ram2"),
m_sprgen1(*this, "spritegen1"),
m_sprgen2(*this, "spritegen2")
{ }
/* devices */
required_device<cpu_device> m_maincpu;
@ -47,6 +51,9 @@ public:
required_shared_ptr<UINT16> m_shared_ram;
required_shared_ptr<UINT16> m_ram2;
optional_device<decospr_device> m_sprgen1;
optional_device<decospr_device> m_sprgen2;
DECLARE_READ16_MEMBER(dassault_control_r);
DECLARE_WRITE16_MEMBER(dassault_control_w);
DECLARE_READ16_MEMBER(dassault_sub_control_r);

View File

@ -16,7 +16,9 @@ public:
m_pf3_rowscroll32(*this, "pf3_rowscroll32"),
m_pf4_rowscroll32(*this, "pf4_rowscroll32"),
m_ace_ram(*this, "ace_ram"),
m_sprgen(*this, "spritegen")
m_sprgen(*this, "spritegen"),
m_sprgen1(*this, "spritegen1"),
m_sprgen2(*this, "spritegen2")
{ }
required_device<cpu_device> m_maincpu;
@ -31,6 +33,8 @@ public:
optional_shared_ptr<UINT32> m_ace_ram;
optional_device<decospr_device> m_sprgen;
optional_device<decospr_device> m_sprgen1;
optional_device<decospr_device> m_sprgen2;
int m_raster_enable;
timer_device *m_raster_irq_timer;

View File

@ -14,7 +14,8 @@ public:
m_vram_data(*this, "vram_data"),
m_pixel_0_data(*this, "pixel_0_data"),
m_pixel_1_data(*this, "pixel_1_data"),
m_sprgen(*this, "spritegen")
m_sprgen(*this, "spritegen"),
m_sprgen2(*this, "spritegen2")
{ }
/* video-related */
@ -34,6 +35,7 @@ public:
required_shared_ptr<UINT16> m_pixel_0_data;
required_shared_ptr<UINT16> m_pixel_1_data;
optional_device<decospr_device> m_sprgen;
optional_device<decospr_device> m_sprgen2;
DECLARE_WRITE16_MEMBER(lemmings_control_w);
DECLARE_READ16_MEMBER(lemmings_trackball_r);

View File

@ -8,6 +8,7 @@
#include "video/deco16ic.h"
#include "video/decocomn.h"
#include "video/bufsprite.h"
#include "video/decospr.h"
class rohga_state : public driver_device
{
@ -26,7 +27,10 @@ public:
m_pf1_rowscroll(*this, "pf1_rowscroll"),
m_pf2_rowscroll(*this, "pf2_rowscroll"),
m_pf3_rowscroll(*this, "pf3_rowscroll"),
m_pf4_rowscroll(*this, "pf4_rowscroll"){ }
m_pf4_rowscroll(*this, "pf4_rowscroll"),
m_sprgen1(*this, "spritegen1"),
m_sprgen2(*this, "spritegen2")
{ }
/* devices */
required_device<cpu_device> m_maincpu;
@ -45,6 +49,8 @@ public:
required_shared_ptr<UINT16> m_pf3_rowscroll;
required_shared_ptr<UINT16> m_pf4_rowscroll;
optional_device<decospr_device> m_sprgen1;
optional_device<decospr_device> m_sprgen2;
DECLARE_READ16_MEMBER(rohga_irq_ack_r);
DECLARE_WRITE16_MEMBER(wizdfire_irq_ack_w);

View File

@ -1,4 +1,5 @@
#include "video/deco16ic.h"
#include "video/decospr.h"
class sshangha_state : public driver_device
{
@ -15,7 +16,10 @@ public:
m_tile_paletteram2(*this, "tile_palram2"),
m_sprite_paletteram2(*this, "sprite_palram2"),
m_tile_paletteram1(*this, "tile_palram1"),
m_prot_data(*this, "prot_data"){ }
m_prot_data(*this, "prot_data"),
m_sprgen1(*this, "spritegen1"),
m_sprgen2(*this, "spritegen2")
{ }
required_device<deco16ic_device> m_deco_tilegen1;
required_shared_ptr<UINT16> m_spriteram;
@ -31,6 +35,10 @@ public:
required_shared_ptr<UINT16> m_tile_paletteram1;
optional_shared_ptr<UINT16> m_prot_data;
optional_device<decospr_device> m_sprgen1;
optional_device<decospr_device> m_sprgen2;
int m_video_control;

View File

@ -2,12 +2,12 @@
#include "includes/boogwing.h"
#include "video/deco16ic.h"
#include "video/decocomn.h"
#include "video/decospr.h"
void boogwing_state::video_start()
{
machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen1->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
}
@ -31,8 +31,8 @@ static void mix_boogwing(running_machine &machine, bitmap_rgb32 &bitmap, const r
address_space &space = machine.driver_data()->generic_space();
UINT16 priority = decocomn_priority_r(state->m_decocomn, space, 0, 0xffff);
sprite_bitmap1 = &machine.device<decospr_device>("spritegen1")->get_sprite_temp_bitmap();
sprite_bitmap2 = &machine.device<decospr_device>("spritegen2")->get_sprite_temp_bitmap();
sprite_bitmap1 = &state->m_sprgen1->get_sprite_temp_bitmap();
sprite_bitmap2 = &state->m_sprgen1->get_sprite_temp_bitmap();
priority_bitmap = &machine.priority_bitmap;
UINT32* dstline;
@ -185,8 +185,8 @@ UINT32 boogwing_state::screen_update_boogwing(screen_device &screen, bitmap_rgb3
UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff);
/* Draw sprite planes to bitmaps for later mixing */
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
flip_screen_set(BIT(flip, 7));
deco16ic_pf_update(m_deco_tilegen1, m_pf1_rowscroll, m_pf2_rowscroll);

View File

@ -240,8 +240,8 @@ UINT32 cninja_state::screen_update_robocop2(screen_device &screen, bitmap_ind16
VIDEO_START_MEMBER(cninja_state,mutantf)
{
machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen1->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
}
UINT32 cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@ -258,10 +258,10 @@ UINT32 cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &
/* Draw playfields */
bitmap.fill(0x400, cliprect); /* Confirmed */
machine().device<decospr_device>("spritegen1")->set_alt_format(true);
machine().device<decospr_device>("spritegen2")->set_alt_format(true);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
m_sprgen1->set_alt_format(true);
m_sprgen2->set_alt_format(true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
/* There is no priority prom on this board, but there is a
@ -282,13 +282,13 @@ UINT32 cninja_state::screen_update_mutantf(screen_device &screen, bitmap_rgb32 &
if (priority & 1)
{
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer?
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer?
}
else
{
machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer?
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 1024+768, 0x0ff, 0x80); // fixed alpha of 0x80 for this layer?
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x100, 0x1ff);
}
deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
return 0;

View File

@ -17,14 +17,13 @@
#include "video/deco16ic.h"
#include "includes/dassault.h"
#include "video/decocomn.h"
#include "video/decospr.h"
/******************************************************************************/
void dassault_state::video_start()
{
machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen1->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
}
static void mixdassaultlayer(running_machine &machine, bitmap_rgb32 &bitmap, bitmap_ind16* sprite_bitmap, const rectangle &cliprect, UINT16 pri, UINT16 primask, UINT16 penbase, UINT8 alpha)
@ -80,10 +79,10 @@ UINT32 dassault_state::screen_update_dassault(screen_device &screen, bitmap_rgb3
UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff);
UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
bitmap_ind16* sprite_bitmap1 = &machine().device<decospr_device>("spritegen1")->get_sprite_temp_bitmap();
bitmap_ind16* sprite_bitmap2 = &machine().device<decospr_device>("spritegen2")->get_sprite_temp_bitmap();
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
bitmap_ind16* sprite_bitmap1 = &m_sprgen1->get_sprite_temp_bitmap();
bitmap_ind16* sprite_bitmap2 = &m_sprgen2->get_sprite_temp_bitmap();
/* Update tilemaps */
flip_screen_set(BIT(flip, 7));

View File

@ -548,8 +548,8 @@ VIDEO_START_MEMBER(deco32_state,nslasher)
width = machine().primary_screen->width();
height = machine().primary_screen->height();
m_tilemap_alpha_bitmap=auto_bitmap_ind16_alloc(machine(), width, height );
machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen1->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
memset(m_dirty_palette,0,4096);
state_save_register_global(machine(), m_pri);
m_has_ace_ram=1;
@ -840,11 +840,11 @@ UINT32 deco32_state::screen_update_nslasher(screen_device &screen, bitmap_rgb32
bitmap.fill(machine().pens[0x200], cliprect);
/* Draw sprites to temporary bitmaps, saving alpha & priority info for later mixing */
machine().device<decospr_device>("spritegen1")->set_pix_raw_shift(8);
machine().device<decospr_device>("spritegen2")->set_pix_raw_shift(8);
m_sprgen1->set_pix_raw_shift(8);
m_sprgen2->set_pix_raw_shift(8);
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x800, true);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram16_2_buffered, 0x800, true);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram16_buffered, 0x800, true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram16_2_buffered, 0x800, true);
/* Render alpha-blended tilemap to separate buffer for proper mixing */

View File

@ -39,7 +39,7 @@ void lemmings_state::video_start()
machine().gfx[2]->set_source(m_vram_buffer);
m_sprgen->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
save_item(NAME(m_bitmap0));
save_item(NAME(m_vram_buffer));
@ -136,7 +136,7 @@ UINT32 lemmings_state::screen_update_lemmings(screen_device &screen, bitmap_rgb3
rect.min_y = cliprect.min_y;
m_sprgen->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_1, 0x400, true);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_0, 0x400, true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_sprite_triple_buffer_0, 0x400, true);
bitmap.fill(get_black_pen(machine()), cliprect);
m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x300, 0xff);
@ -157,9 +157,9 @@ UINT32 lemmings_state::screen_update_lemmings(screen_device &screen, bitmap_rgb3
lemmings_copy_bitmap(machine(), bitmap, m_bitmap0, &x1, &y, rect);
}
machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0xff);
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0800, 0x0800, 0x200, 0xff);
m_sprgen->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x300, 0xff);
m_vram_tilemap->draw(bitmap, cliprect, 0, 0);
machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0xff);
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0800, 0x200, 0xff);
return 0;
}

View File

@ -7,7 +7,7 @@
#include "emu.h"
#include "includes/rohga.h"
#include "video/deco16ic.h"
#include "video/decospr.h"
WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
{
@ -18,15 +18,15 @@ WRITE16_MEMBER(rohga_state::rohga_buffer_spriteram16_w)
VIDEO_START_MEMBER(rohga_state,rohga)
{
machine().device<decospr_device>("spritegen1")->set_col_callback(rohga_col_callback);
machine().device<decospr_device>("spritegen1")->set_pri_callback(rohga_pri_callback);
m_sprgen1->set_col_callback(rohga_col_callback);
m_sprgen1->set_pri_callback(rohga_pri_callback);
}
VIDEO_START_MEMBER(rohga_state,schmeisr)
{
VIDEO_START_CALL_MEMBER( rohga );
// wire mods on pcb..
machine().device<decospr_device>("spritegen1")->set_col_callback(schmeisr_col_callback);
m_sprgen1->set_col_callback(schmeisr_col_callback);
}
@ -104,7 +104,7 @@ UINT32 rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &bit
break;
}
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
return 0;
@ -114,8 +114,8 @@ UINT32 rohga_state::screen_update_rohga(screen_device &screen, bitmap_ind16 &bit
VIDEO_START_MEMBER(rohga_state,wizdfire)
{
machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen1->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
}
// not amazingly efficient, called multiple times to pull a layer out of the sprite bitmaps, but keeps correct sprite<->sprite priorities
@ -171,8 +171,8 @@ UINT32 rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &
UINT16 priority = decocomn_priority_r(m_decocomn, space, 0, 0xffff);
/* draw sprite gfx to temp bitmaps */
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, true);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, true);
/* Update playfields */
flip_screen_set(BIT(flip, 7));
@ -183,16 +183,16 @@ UINT32 rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &
bitmap.fill(machine().pens[512], cliprect);
deco16ic_tilemap_2_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0600, 0x0600, 0x400, 0x1ff);
deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0400, 0x0600, 0x400, 0x1ff);
if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */
deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
else
deco16ic_tilemap_1_draw(m_deco_tilegen2, bitmap, cliprect, 0, 0);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0400, 0x400, 0x1ff); // 0x000 and 0x200 of 0x600
mixwizdfirelayer(machine(), bitmap, cliprect, 4, 0x000, 0x000);
@ -206,10 +206,10 @@ UINT32 rohga_state::screen_update_nitrobal(screen_device &screen, bitmap_rgb32 &
UINT16 flip = deco16ic_pf_control_r(m_deco_tilegen1, space, 0, 0xffff);
/* draw sprite gfx to temp bitmaps */
machine().device<decospr_device>("spritegen1")->set_alt_format(true);
machine().device<decospr_device>("spritegen2")->set_alt_format(true);
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
m_sprgen1->set_alt_format(true);
m_sprgen2->set_alt_format(true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2->buffer(), 0x400, false);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0x400, false);
/* Update playfields */
flip_screen_set(BIT(flip, 7));
@ -226,8 +226,8 @@ UINT32 rohga_state::screen_update_nitrobal(screen_device &screen, bitmap_rgb32 &
deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 16);
/* 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 ;-) */
machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x600, 0xff);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x400, 0x1ff);
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x600, 0xff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0x400, 0x1ff);
deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);

View File

@ -7,7 +7,7 @@
#include "emu.h"
#include "includes/sshangha.h"
#include "video/decospr.h"
/******************************************************************************/
@ -22,19 +22,19 @@ WRITE16_MEMBER(sshangha_state::sshangha_video_w)
void sshangha_state::video_start()
{
machine().device<decospr_device>("spritegen1")->alloc_sprite_bitmap();
machine().device<decospr_device>("spritegen2")->alloc_sprite_bitmap();
m_sprgen1->alloc_sprite_bitmap();
m_sprgen2->alloc_sprite_bitmap();
}
/******************************************************************************/
UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
machine().device<decospr_device>("spritegen1")->draw_sprites(bitmap, cliprect, m_spriteram, 0x800, true);
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram, 0x800, true);
// 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
if (m_spriteram2 != NULL)
machine().device<decospr_device>("spritegen2")->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true);
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true);
machine().tilemap().set_flip_all(flip_screen_x() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
@ -45,17 +45,17 @@ UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb3
/* the tilemap 4bpp + 4bpp = 8bpp mixing actually seems external to the tilemap, note video_control is not part of the tilemap chip */
if ((m_video_control&4)==0) {
deco16ic_tilemap_12_combine_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0, 1);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
}
else {
deco16ic_tilemap_2_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0200, 0x0200, 0x100, 0x1ff);
deco16ic_tilemap_1_draw(m_deco_tilegen1, bitmap, cliprect, 0, 0);
}
if (m_spriteram2 != NULL)
machine().device<decospr_device>("spritegen2")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0, 0x1ff);
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0, 0x1ff);
machine().device<decospr_device>("spritegen1")->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0200, 0, 0x1ff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0200, 0, 0x1ff);
return 0;
}