diff options
author | angelosa <salese_corp_ltd@email.it> | 2017-09-04 22:22:11 +0200 |
---|---|---|
committer | angelosa <salese_corp_ltd@email.it> | 2017-09-04 22:23:16 +0200 |
commit | 0b5d4e663ed6045880bea71806cf8058d8f4874c (patch) | |
tree | 6fc05de2e2b99e3125635d525ae6eaa3098a5395 | |
parent | f9b8f6e9bd3466fde11092276c823ca7876b3d8d (diff) |
mb_vcu.cpp: Fixed layer clearances for Great Guns [Angelo Salese]
-rw-r--r-- | src/devices/video/mb_vcu.cpp | 15 | ||||
-rw-r--r-- | src/devices/video/mb_vcu.h | 1 | ||||
-rw-r--r-- | src/mame/drivers/mazerbla.cpp | 8 |
3 files changed, 22 insertions, 2 deletions
diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp index 7a5371ec761..1506b3bdfda 100644 --- a/src/devices/video/mb_vcu.cpp +++ b/src/devices/video/mb_vcu.cpp @@ -303,6 +303,7 @@ READ8_MEMBER( mb_vcu_device::load_gfx ) dot = m_cpu->space(AS_PROGRAM).read_byte(((offset + (bits >> 3)) & 0x1fff) + 0x4000) >> (4-(bits & 7)); dot&= 0xf; + //if(dot != 0xf || m_mode & 2) write_byte(dstx|dsty<<8|cur_layer<<16|m_vbank<<18, dot); } @@ -502,10 +503,22 @@ READ8_MEMBER( mb_vcu_device::status_r ) } WRITE8_MEMBER( mb_vcu_device::vbank_w ) -{ +{ m_vbank = (data & 0x40) >> 6; } +WRITE8_MEMBER( mb_vcu_device::vbank_clear_w ) +{ + m_vbank = (data & 0x40) >> 6; + + // setting vbank clears VRAM in the setted bank, applies to Great Guns only since it never ever access the RMW stuff + for(int i=0;i<0x10000;i++) + { + write_byte(i|0x00000|m_vbank<<18,0x0f); + write_byte(i|0x10000|m_vbank<<18,0x0f); + } +} + //------------------------------------------------- // update_screen - //------------------------------------------------- diff --git a/src/devices/video/mb_vcu.h b/src/devices/video/mb_vcu.h index efaad7c7f28..f75810cc16f 100644 --- a/src/devices/video/mb_vcu.h +++ b/src/devices/video/mb_vcu.h @@ -34,6 +34,7 @@ public: DECLARE_WRITE8_MEMBER( background_color_w ); DECLARE_READ8_MEMBER( status_r ); DECLARE_WRITE8_MEMBER( vbank_w ); + DECLARE_WRITE8_MEMBER( vbank_clear_w ); DECLARE_READ8_MEMBER( mb_vcu_paletteram_r ); DECLARE_WRITE8_MEMBER( mb_vcu_paletteram_w ); diff --git a/src/mame/drivers/mazerbla.cpp b/src/mame/drivers/mazerbla.cpp index a6f75987d5a..b9d6586d313 100644 --- a/src/mame/drivers/mazerbla.cpp +++ b/src/mame/drivers/mazerbla.cpp @@ -1034,6 +1034,12 @@ static ADDRESS_MAP_START( greatgun_sound_map, AS_PROGRAM, 8, mazerbla_state ) AM_RANGE(0xa000, 0xa000) AM_WRITE(sound_nmi_clear_w) ADDRESS_MAP_END +static ADDRESS_MAP_START( greatgun_cpu3_io_map, AS_IO, 8, mazerbla_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x05, 0x05) AM_DEVWRITE("vcu", mb_vcu_device, vbank_clear_w) + AM_IMPORT_FROM( mazerbla_cpu3_io_map ) +ADDRESS_MAP_END + /************************************* * @@ -1497,7 +1503,7 @@ static MACHINE_CONFIG_START( greatgun ) MCFG_CPU_ADD("sub2", Z80, MASTER_CLOCK) /* 4 MHz, no NMI, IM1 INT */ MCFG_CPU_PROGRAM_MAP(mazerbla_cpu3_map) - MCFG_CPU_IO_MAP(mazerbla_cpu3_io_map) + MCFG_CPU_IO_MAP(greatgun_cpu3_io_map) /* (vblank related ??) int generated by a custom video processor and cleared on ANY port access. but handled differently for now |