Started improving the dataeast games flipscreen problems: (nw)

*fixed MT04987, MT04942;
*partially fixed MT04897: screen flips now and seems to work fine in actfancr, triothep background doesn't scroll, though
*partially fixed MT04724: screen flips now. BG offset as in MT04797, these are caused by the addition of the SCREEN_RAW_PARAMS which hasn't been accounted in the decbac device flip routines. All drivers using this device must be updated to SCREEN_RAW_PARAMS or a workaround must be added in the device emulation.
Hopefully more to come.
This commit is contained in:
Ivan Vangelista 2014-01-20 17:46:17 +00:00
parent ff3676ab66
commit 8ffeff9934
17 changed files with 57 additions and 46 deletions

View File

@ -29,7 +29,6 @@
#include "sound/3812intf.h"
#include "sound/okim6295.h"
#include "includes/actfancr.h"
#include "video/decmxc06.h"
/******************************************************************************/

View File

@ -49,7 +49,6 @@ To do:
#include "sound/3526intf.h"
#include "sound/msm5205.h"
#include "includes/dec8.h"
#include "video/decmxc06.h"
#include "video/deckarn.h"
#include "machine/deco222.h"
@ -2325,7 +2324,7 @@ static MACHINE_CONFIG_START( oscar, dec8_state )
MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
deco_bac06_device::set_gfx_region_wide(*device,2,2,0);
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
MCFG_DEVICE_ADD("spritegen_mxc", DECO_MXC06, 0)
deco_mxc06_device::set_gfx_region(*device, 1);
MCFG_SCREEN_ADD("screen", RASTER)
@ -2417,7 +2416,7 @@ static MACHINE_CONFIG_START( cobracom, dec8_state )
MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
deco_bac06_device::set_gfx_region_wide(*device,3,3,0);
MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
MCFG_DEVICE_ADD("spritegen_mxc", DECO_MXC06, 0)
deco_mxc06_device::set_gfx_region(*device, 1);

View File

@ -19,7 +19,7 @@
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "includes/madmotor.h"
#include "video/decmxc06.h"
/******************************************************************************/

View File

@ -27,7 +27,6 @@
#include "sound/3812intf.h"
#include "sound/okim6295.h"
#include "includes/stadhero.h"
#include "video/decmxc06.h"
/******************************************************************************/

View File

@ -15,7 +15,6 @@
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "includes/vaportra.h"
#include "video/decmxc06.h"
/******************************************************************************/

View File

@ -1,4 +1,5 @@
#include "video/decbac06.h"
#include "video/decmxc06.h"
/*************************************************************************
@ -15,7 +16,8 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_tilegen1(*this, "tilegen1"),
m_tilegen2(*this, "tilegen2") { }
m_tilegen2(*this, "tilegen2"),
m_spritegen(*this, "spritegen") { }
/* memory pointers */
required_shared_ptr<UINT8> m_main_ram;
@ -32,6 +34,7 @@ public:
required_device<cpu_device> m_audiocpu;
required_device<deco_bac06_device> m_tilegen1;
required_device<deco_bac06_device> m_tilegen2;
required_device<deco_mxc06_device> m_spritegen;
DECLARE_WRITE8_MEMBER(triothep_control_select_w);
DECLARE_READ8_MEMBER(triothep_control_r);
DECLARE_WRITE8_MEMBER(actfancr_sound_w);

View File

@ -1,6 +1,7 @@
#include "video/bufsprite.h"
#include "video/decbac06.h"
#include "sound/msm5205.h"
#include "video/decmxc06.h"
class dec8_state : public driver_device
{
@ -20,6 +21,7 @@ public:
m_msm(*this, "msm"),
m_tilegen1(*this, "tilegen1"),
m_tilegen2(*this, "tilegen2"),
m_spritegen_mxc(*this, "spritegen_mxc"),
m_videoram(*this, "videoram"),
m_bg_data(*this, "bg_data") { }
@ -32,6 +34,7 @@ public:
optional_device<msm5205_device> m_msm;
optional_device<deco_bac06_device> m_tilegen1;
optional_device<deco_bac06_device> m_tilegen2;
optional_device<deco_mxc06_device> m_spritegen_mxc;
/* memory pointers */
required_shared_ptr<UINT8> m_videoram;

View File

@ -5,6 +5,7 @@
*************************************************************************/
#include "video/decbac06.h"
#include "video/decmxc06.h"
class madmotor_state : public driver_device
{
@ -16,7 +17,8 @@ public:
m_audiocpu(*this, "audiocpu"),
m_tilegen1(*this, "tilegen1"),
m_tilegen2(*this, "tilegen2"),
m_tilegen3(*this, "tilegen3") { }
m_tilegen3(*this, "tilegen3"),
m_spritegen(*this, "spritegen") { }
/* memory pointers */
required_shared_ptr<UINT16> m_spriteram;
@ -31,6 +33,7 @@ public:
required_device<deco_bac06_device> m_tilegen1;
required_device<deco_bac06_device> m_tilegen2;
required_device<deco_bac06_device> m_tilegen3;
required_device<deco_mxc06_device> m_spritegen;
DECLARE_WRITE16_MEMBER(madmotor_sound_w);
DECLARE_DRIVER_INIT(madmotor);
virtual void machine_start();

View File

@ -1,4 +1,5 @@
#include "video/decbac06.h"
#include "video/decmxc06.h"
class stadhero_state : public driver_device
{
@ -8,12 +9,14 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_tilegen1(*this, "tilegen1"),
m_spritegen(*this, "spritegen"),
m_spriteram(*this, "spriteram"),
m_pf1_data(*this, "pf1_data") { }
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device<deco_bac06_device> m_tilegen1;
required_device<deco_mxc06_device> m_spritegen;
required_shared_ptr<UINT16> m_spriteram;
required_shared_ptr<UINT16> m_pf1_data;
tilemap_t *m_pf1_tilemap;

View File

@ -1,11 +1,12 @@
/*************************************************************************
Vapour Trail
Vapor Trail
*************************************************************************/
#include "video/bufsprite.h"
#include "video/deco16ic.h"
#include "video/decmxc06.h"
class vaportra_state : public driver_device
{
@ -16,6 +17,7 @@ public:
m_audiocpu(*this, "audiocpu"),
m_deco_tilegen1(*this, "tilegen1"),
m_deco_tilegen2(*this, "tilegen2"),
m_spritegen(*this, "spritegen"),
m_spriteram(*this, "spriteram") { }
/* memory pointers */
@ -32,6 +34,7 @@ public:
required_device<cpu_device> m_audiocpu;
required_device<deco16ic_device> m_deco_tilegen1;
required_device<deco16ic_device> m_deco_tilegen2;
required_device<deco_mxc06_device> m_spritegen;
required_device<buffered_spriteram16_device> m_spriteram;
DECLARE_WRITE16_MEMBER(vaportra_sound_w);
DECLARE_READ16_MEMBER(vaportra_control_r);

View File

@ -6,7 +6,6 @@
#include "emu.h"
#include "includes/actfancr.h"
#include "video/decmxc06.h"
/******************************************************************************/
@ -25,11 +24,10 @@ void actfancr_state::video_start()
UINT32 actfancr_state::screen_update_actfancr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* Draw playfield */
//m_flipscreen = m_control_2[0] & 0x80;
//machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
flip_screen_set(m_tilegen2->get_flip_state());
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram16, 0x00, 0x00, 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram16, 0x00, 0x00, 0x0f);
m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
return 0;

View File

@ -43,7 +43,6 @@ sprites.
#include "emu.h"
#include "includes/dec8.h"
#include "video/decmxc06.h"
#include "video/deckarn.h"
/***************************************************************************
@ -260,12 +259,12 @@ void dec8_state::srdarwin_draw_sprites( bitmap_ind16 &bitmap, const rectangle &
UINT32 dec8_state::screen_update_cobracom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
flip_screen_set(m_bg_control[0] >> 7);
flip_screen_set(m_tilegen1->get_flip_state());
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03);
m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03);
m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03);
m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03);
m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
@ -301,6 +300,8 @@ VIDEO_START_MEMBER(dec8_state,cobracom)
UINT32 dec8_state::screen_update_ghostb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_karnovsprites_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0);
m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
@ -333,11 +334,11 @@ VIDEO_START_MEMBER(dec8_state,ghostb)
UINT32 dec8_state::screen_update_oscar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
flip_screen_set(m_bg_control[1] >> 7);
flip_screen_set(m_tilegen1->get_flip_state());
// we mimic the priority scheme in dec0.c, this was originally a bit different, so this could be wrong
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f);
m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f);
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x08,0x08,0x08,0x08);
m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;

View File

@ -84,6 +84,19 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_ind16 &bi
if (sy >= 256) sy -= 512;
sx = 240 - sx;
sy = 240 - sy;
// maybe, birdie try appears to specify the base code for each part..
code = spriteram[offs + 1] & 0x1fff;
code &= ~(h-1);
if (flipy)
incy = -1;
else
{
code += h-1;
incy = 1;
}
if (machine.driver_data()->flip_screen())
@ -99,19 +112,6 @@ void deco_mxc06_device::draw_sprites( running_machine &machine, bitmap_ind16 &bi
for (x = 0; x < w; x++)
{
// maybe, birdie try appears to specify the base code for each part..
code = spriteram[offs + 1] & 0x1fff;
code &= ~(h-1);
if (flipy)
incy = -1;
else
{
code += h-1;
incy = 1;
}
for (y = 0; y < h; y++)
{
if (spriteram[offs] & 0x8000)

View File

@ -8,7 +8,6 @@
#include "emu.h"
#include "includes/madmotor.h"
#include "video/decmxc06.h"
/******************************************************************************/
@ -23,13 +22,13 @@ void madmotor_state::video_start()
UINT32 madmotor_state::screen_update_madmotor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_tilegen1->get_flip_state();
flip_screen_set(m_tilegen1->get_flip_state());
// machine().tilemap().set_flip_all(m_tilegen1->get_flip_state() ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00);
return 0;
}

View File

@ -65,7 +65,7 @@ void pcktgal_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect
UINT32 pcktgal_state::screen_update_pcktgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_tilegen1->get_flip_state();
flip_screen_set(m_tilegen1->get_flip_state());
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
draw_sprites(bitmap, cliprect);
return 0;
@ -73,6 +73,7 @@ UINT32 pcktgal_state::screen_update_pcktgal(screen_device &screen, bitmap_ind16
UINT32 pcktgal_state::screen_update_pcktgalb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
flip_screen_set(m_tilegen1->get_flip_state());
// the bootleg doesn't properly set the tilemap registers, because it's on non-original hardware, which probably doesn't have the flexible tilemaps.
m_tilegen1->deco_bac06_pf_draw_bootleg(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0, 2);
draw_sprites(bitmap, cliprect);

View File

@ -12,7 +12,7 @@
#include "emu.h"
#include "includes/stadhero.h"
#include "video/decmxc06.h"
/******************************************************************************/
@ -22,9 +22,11 @@ UINT32 stadhero_state::screen_update_stadhero(screen_device &screen, bitmap_ind1
{
// machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0);
flip_screen_set(m_tilegen1->get_flip_state());
m_tilegen1->set_bppmultmask(0x8, 0x7);
m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram, 0x00, 0x00, 0x0f);
m_pf1_tilemap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}

View File

@ -11,7 +11,6 @@
#include "emu.h"
#include "includes/vaportra.h"
#include "video/decmxc06.h"
/******************************************************************************/
@ -58,39 +57,39 @@ UINT32 vaportra_state::screen_update_vaportra(screen_device &screen, bitmap_ind1
m_deco_tilegen1->pf_update(0, 0);
m_deco_tilegen2->pf_update(0, 0);
machine().device<deco_mxc06_device>("spritegen")->set_pri_type(1); // force priorities to be handled in a different way for this driver for now
m_spritegen->set_pri_type(1); // force priorities to be handled in a different way for this driver for now
/* Draw playfields */
if (pri == 0)
{
m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
}
else if (pri == 1)
{
m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
}
else if (pri == 2)
{
m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
}
else
{
m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f);
m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
}
machine().device<deco_mxc06_device>("spritegen")->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 1, m_priority[1], 0x0f);
m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 1, m_priority[1], 0x0f);
m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}