summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-08-31 11:41:58 +0200
committer angelosa <salese_corp_ltd@email.it>2017-08-31 11:43:10 +0200
commit0cedd77854a91f785b02393f61a4645c12d7b1ee (patch)
tree1de7742923fced36cea38ee66a7787b051ce9389
parentf3895a09fb299ac9b7bdc8cc0fd831b06e355793 (diff)
mb_vcu.cpp: added multi-layer drawing [Angelo Salese]
-rw-r--r--src/devices/video/mb_vcu.cpp52
-rw-r--r--src/mame/drivers/mazerbla.cpp18
2 files changed, 22 insertions, 48 deletions
diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp
index 46087f9997f..ae75db42c26 100644
--- a/src/devices/video/mb_vcu.cpp
+++ b/src/devices/video/mb_vcu.cpp
@@ -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];
- }
- }
- }
-
- 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];
+ bitmap.pix32(y,x) = m_palette->pen(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
}
diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp
index d6d8534491b..a6f75987d5a 100644
--- a/src/mame/drivers/mazerbla.cpp
+++ b/src/mame/drivers/mazerbla.cpp
@@ -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)