This commit is contained in:
RobertoFresca 2017-11-23 18:25:26 -03:00
commit 0c2ed5c244
3 changed files with 20 additions and 6 deletions

View File

@ -211,10 +211,9 @@ imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, devi
, m_blit_irq_cb(*this)
, m_support_8bpp( has_ext_tiles )
, m_support_16x16( has_ext_tiles )
, m_tilemap_scrolldx{0, 0, 0}
, m_tilemap_scrolldy{0, 0, 0}
{
m_tilemap_scrolldx[0] = 0;
m_tilemap_scrolldx[1] = 0;
m_tilemap_scrolldx[2] = 0;
}
imagetek_i4100_device::imagetek_i4100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@ -263,6 +262,14 @@ void imagetek_i4100_device::static_set_tmap_xoffsets(device_t &device, int x1, i
}
void imagetek_i4100_device::static_set_tmap_yoffsets(device_t &device, int y1, int y2, int y3)
{
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldy[0] = y1;
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldy[1] = y2;
downcast<imagetek_i4100_device &>(device).m_tilemap_scrolldy[2] = y3;
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@ -1065,6 +1072,7 @@ void imagetek_i4100_device::draw_tilemap( screen_device &screen, bitmap_ind16 &b
int windowheight = height >> 3;
sx += m_tilemap_scrolldx[layer] * (m_screen_flip ? 1 : -1);
sy += m_tilemap_scrolldy[layer] * (m_screen_flip ? 1 : -1);
for (y = 0; y < scrheight; y++)
{

View File

@ -26,7 +26,10 @@
#define MCFG_I4100_TILEMAP_XOFFSETS(_a, _b, _c) \
imagetek_i4100_device::static_set_tmap_xoffsets(*device, _a, _b, _c);
#define MCFG_I4100_TILEMAP_YOFFSETS(_a, _b, _c) \
imagetek_i4100_device::static_set_tmap_yoffsets(*device, _a, _b, _c);
//**************************************************************************
// TYPE DEFINITIONS
@ -45,6 +48,7 @@ public:
static void static_set_gfxdecode_tag(device_t &device, const char *tag);
static void static_set_tmap_xoffsets(device_t &device, int x1, int x2, int x3);
static void static_set_tmap_yoffsets(device_t &device, int y1, int y2, int y3);
template <class Object> static devcb_base &static_set_blitter_irq_callback(device_t &device, Object &&cb) { return downcast<imagetek_i4100_device &>(device).m_blit_irq_cb.set_callback(std::forward<Object>(cb)); }
@ -148,6 +152,7 @@ protected:
bool m_screen_flip;
const bool m_support_8bpp, m_support_16x16;
int m_tilemap_scrolldx[3];
int m_tilemap_scrolldy[3];
void blt_write( address_space &space, const int tmap, const offs_t offs, const uint16_t data, const uint16_t mask );

View File

@ -3632,10 +3632,11 @@ static MACHINE_CONFIG_START( vmetal )
/* video hardware */
MCFG_FRAGMENT_ADD( i4220_config_304x224 )
MCFG_DEVICE_MODIFY("vdp2")
MCFG_I4100_TILEMAP_XOFFSETS(-16,-16,-16)
MCFG_I4100_TILEMAP_YOFFSETS(-16,-16,-16)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")