mirror of
https://github.com/holub/mame
synced 2025-06-26 14:24:12 +03:00
mb_vcu.cpp: added multi-layer drawing [Angelo Salese]
This commit is contained in:
parent
f3895a09fb
commit
0cedd77854
@ -283,8 +283,10 @@ READ8_MEMBER( mb_vcu_device::load_gfx )
|
||||
uint8_t pen = 0;
|
||||
uint8_t cur_layer;
|
||||
|
||||
// printf("%02x %02x\n",m_mode >> 2,m_mode & 3);
|
||||
|
||||
// cur_layer = (m_mode & 0x3);
|
||||
cur_layer = 0;
|
||||
cur_layer = (m_mode & 2) >> 1;
|
||||
|
||||
switch(m_mode >> 2)
|
||||
{
|
||||
@ -386,6 +388,7 @@ READ8_MEMBER( mb_vcu_device::load_set_clr )
|
||||
int dstx,dsty;
|
||||
// uint8_t dot;
|
||||
int bits = 0;
|
||||
#if 0
|
||||
if(m_mode == 0x13 || m_mode == 0x03)
|
||||
{
|
||||
printf("[0] %02x ",m_ram[m_param_offset_latch]);
|
||||
@ -399,7 +402,8 @@ READ8_MEMBER( mb_vcu_device::load_set_clr )
|
||||
printf("VB:%02x ",m_vbank);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
switch(m_mode)
|
||||
{
|
||||
case 0x13:
|
||||
@ -500,13 +504,13 @@ uint32_t mb_vcu_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
|
||||
int x,y;
|
||||
uint8_t dot;
|
||||
|
||||
bitmap.fill(0x100,cliprect);
|
||||
bitmap.fill(m_palette->pen(0x100),cliprect);
|
||||
|
||||
for(y=0;y<256;y++)
|
||||
{
|
||||
for(x=0;x<256;x++)
|
||||
{
|
||||
dot = read_byte((x >> 0)|(y<<8)|0<<16|(m_vbank ^ 1)<<18);
|
||||
dot = read_byte((x >> 0)|(y<<8)|1<<16|(m_vbank ^ 1)<<18);
|
||||
//if(dot != 0xf)
|
||||
{
|
||||
dot|= m_vregs[1] << 4;
|
||||
@ -516,22 +520,6 @@ uint32_t mb_vcu_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
for(y=0;y<256;y++)
|
||||
{
|
||||
for(x=0;x<256;x++)
|
||||
{
|
||||
dot = read_byte((x >> 0)|(y<<8)|3<<16);
|
||||
|
||||
if(dot != 0xf)
|
||||
{
|
||||
dot|= m_vregs[1] << 4;
|
||||
|
||||
bitmap.pix32(y,x) = machine().pens[dot];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(y=0;y<256;y++)
|
||||
{
|
||||
for(x=0;x<256;x++)
|
||||
@ -542,36 +530,22 @@ uint32_t mb_vcu_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma
|
||||
{
|
||||
dot|= m_vregs[1] << 4;
|
||||
|
||||
bitmap.pix32(y,x) = machine().pens[dot];
|
||||
bitmap.pix32(y,x) = m_palette->pen(dot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(y=0;y<256;y++)
|
||||
{
|
||||
for(x=0;x<256;x++)
|
||||
{
|
||||
dot = read_byte((x >> 0)|(y<<8)|1<<16);
|
||||
|
||||
if(dot != 0xf)
|
||||
{
|
||||
dot|= m_vregs[1] << 4;
|
||||
|
||||
bitmap.pix32(y,x) = machine().pens[dot];
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mb_vcu_device::screen_eof(void)
|
||||
{
|
||||
//for(int i=0;i<0x10000;i++)
|
||||
#if 0
|
||||
for(int i=0;i<0x10000;i++)
|
||||
{
|
||||
//write_byte(i|0x00000|m_vbank<<18,0x0f);
|
||||
write_byte(i|0x00000|m_vbank<<18,0x0f);
|
||||
//write_byte(i|0x10000|m_vbank<<18,0x0f);
|
||||
//write_byte(i|0x30000|m_vbank<<18,0x0f);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1051,12 +1051,13 @@ static INPUT_PORTS_START( mazerbla )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("DSW0") /* Strobe 1: Dip Switches 28-35*/
|
||||
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x03, "6" )
|
||||
PORT_DIPSETTING( 0x02, "5" )
|
||||
PORT_DIPSETTING( 0x01, "4" )
|
||||
PORT_DIPSETTING( 0x00, "3" )
|
||||
PORT_DIPNAME( 0x0c, 0x00, "Freeze Time" )
|
||||
// TODO: these are for mazerblaa set, mazerbla differs significantly
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x03, "3" )
|
||||
PORT_DIPSETTING( 0x02, "4" )
|
||||
PORT_DIPSETTING( 0x01, "5" )
|
||||
PORT_DIPSETTING( 0x00, "6" )
|
||||
PORT_DIPNAME( 0x0c, 0x0c, "Freeze Time" )
|
||||
PORT_DIPSETTING( 0x0c, "1.5 seconds" )
|
||||
PORT_DIPSETTING( 0x08, "2.0 seconds" )
|
||||
PORT_DIPSETTING( 0x04, "2.5 seconds" )
|
||||
@ -1110,9 +1111,7 @@ static INPUT_PORTS_START( mazerbla )
|
||||
PORT_DIPSETTING( 0x70, "1 Coin/14 Credits" )
|
||||
|
||||
PORT_START("DSW2") /* Strobe 3: Dip Switches 12-19*/
|
||||
PORT_DIPNAME( 0x01, 0x01, "Service Index" )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) PORT_NAME("Service Index")
|
||||
PORT_DIPNAME( 0x02, 0x02, "Switch Test" )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -1475,6 +1474,7 @@ static MACHINE_CONFIG_START( mazerbla )
|
||||
MCFG_SCREEN_SIZE(40*8, 32*8)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(mazerbla_state, screen_update_mazerbla)
|
||||
MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(mazerbla_state, screen_vblank))
|
||||
|
||||
MCFG_PALETTE_ADD("palette", 256+1)
|
||||
MCFG_PALETTE_INIT_OWNER(mazerbla_state, mazerbla)
|
||||
|
Loading…
Reference in New Issue
Block a user