diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index aae3b82f1c8..a696a307dd0 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -1150,7 +1150,7 @@ static ADDRESS_MAP_START( gx_base_memmap, AS_PROGRAM, 32, konamigx_state ) AM_RANGE(0x200000, 0x3fffff) AM_ROM // main program ROM AM_RANGE(0x400000, 0x7fffff) AM_ROM // data ROM AM_RANGE(0xc00000, 0xc1ffff) AM_RAM AM_SHARE("workram") // work RAM - AM_RANGE(0xd00000, 0xd01fff) AM_DEVREAD("k056832", k056832_device, altK056832_5bpp_rom_long_r) + AM_RANGE(0xd00000, 0xd01fff) AM_DEVREAD("k056832", k056832_device, k_5bpp_rom_long_r) AM_RANGE(0xd20000, 0xd20fff) AM_READWRITE_LEGACY(K053247_long_r, K053247_long_w) AM_RANGE(0xd21000, 0xd23fff) AM_RAM AM_RANGE(0xd40000, 0xd4003f) AM_DEVWRITE("k056832", k056832_device, altK056832_long_w) @@ -1168,8 +1168,8 @@ static ADDRESS_MAP_START( gx_base_memmap, AS_PROGRAM, 32, konamigx_state ) AM_RANGE(0xd5c000, 0xd5c003) AM_READ_PORT("INPUTS") AM_RANGE(0xd5e000, 0xd5e003) AM_READ_PORT("SERVICE") AM_RANGE(0xd80000, 0xd8001f) AM_WRITE_LEGACY(K054338_long_w) - AM_RANGE(0xda0000, 0xda1fff) AM_DEVREADWRITE("k056832", k056832_device, altK056832_ram_long_r, altK056832_ram_long_w) - AM_RANGE(0xda2000, 0xda3fff) AM_DEVREADWRITE("k056832", k056832_device, altK056832_ram_long_r, altK056832_ram_long_w) + AM_RANGE(0xda0000, 0xda1fff) AM_DEVREADWRITE("k056832", k056832_device, ram_long_r, ram_long_w) + AM_RANGE(0xda2000, 0xda3fff) AM_DEVREADWRITE("k056832", k056832_device, ram_long_r, ram_long_w) #if GX_DEBUG AM_RANGE(0xd40000, 0xd4003f) AM_READ_LEGACY(altK056832_long_r) AM_RANGE(0xd50000, 0xd500ff) AM_READ_LEGACY(K055555_long_r) @@ -3717,9 +3717,9 @@ static const GXGameInfoT gameDefs[] = { "", -1, -1, -1, -1 }, }; -READ32_MEMBER( konamigx_state::altK056832_6bpp_rom_long_r ) +READ32_MEMBER( konamigx_state::k_6bpp_rom_long_r ) { - return m_k056832->altK056832_6bpp_rom_long_r(space,offset,mem_mask); + return m_k056832->k_6bpp_rom_long_r(space,offset,mem_mask); } DRIVER_INIT_MEMBER(konamigx_state,konamigx) @@ -3810,7 +3810,7 @@ DRIVER_INIT_MEMBER(konamigx_state,konamigx) break; case BPP66: - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd00000, 0xd01fff, read32_delegate(FUNC(konamigx_state::altK056832_6bpp_rom_long_r), this)); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd00000, 0xd01fff, read32_delegate(FUNC(konamigx_state::k_6bpp_rom_long_r), this)); case BPP6: m_maincpu->space(AS_PROGRAM).install_read_handler(0xd4a000, 0xd4a00f, read32_delegate(FUNC(konamigx_state::gx6bppspr_r),this)); diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 57302c5f83d..c9206090c05 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -203,7 +203,7 @@ READ16_MEMBER(mystwarr_state::sound_status_msb_r) WRITE16_MEMBER(mystwarr_state::irq_ack_w) { - m_k056832->altK056832_b_word_w(space, offset, data, mem_mask); + m_k056832->b_word_w(space, offset, data, mem_mask); if (offset == 3 && ACCESSING_BITS_0_7) { @@ -267,8 +267,8 @@ static ADDRESS_MAP_START( mystwarr_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x49a000, 0x49a001) AM_WRITE(sound_irq_w) AM_RANGE(0x49c000, 0x49c01f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) AM_RANGE(0x49e000, 0x49e007) AM_WRITE(irq_ack_w) // VSCCS (custom) - AM_RANGE(0x600000, 0x601fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) - AM_RANGE(0x602000, 0x603fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM mirror read(essential) + AM_RANGE(0x600000, 0x601fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) + AM_RANGE(0x602000, 0x603fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM mirror read(essential) AM_RANGE(0x680000, 0x683fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r) AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xrgb_word_be_w) AM_SHARE("paletteram") #if MW_DEBUG @@ -299,7 +299,7 @@ static ADDRESS_MAP_START( metamrph_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x26800e, 0x26800f) AM_WRITE(sound_cmd2_w) AM_RANGE(0x268014, 0x268015) AM_READ(sound_status_r) AM_RANGE(0x268000, 0x26801f) AM_RAM - AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,altK056832_b_word_w) + AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,b_word_w) AM_RANGE(0x270000, 0x27003f) AM_DEVWRITE("k056832", k056832_device,m_word_w) AM_RANGE(0x274000, 0x274001) AM_READ_PORT("P1_P3") AM_RANGE(0x274002, 0x274003) AM_READ_PORT("P2_P4") @@ -307,8 +307,8 @@ static ADDRESS_MAP_START( metamrph_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x278002, 0x278003) AM_READ(eeprom_r) AM_RANGE(0x27c000, 0x27c001) AM_READNOP // watchdog lives here AM_RANGE(0x27c000, 0x27c001) AM_WRITE(mmeeprom_w) - AM_RANGE(0x300000, 0x301fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) - AM_RANGE(0x302000, 0x303fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM mirror read/write (essential) + AM_RANGE(0x300000, 0x301fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) + AM_RANGE(0x302000, 0x303fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM mirror read/write (essential) AM_RANGE(0x310000, 0x311fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r) AM_RANGE(0x320000, 0x321fff) AM_DEVREAD("k053250_1", k053250_device, rom_r) AM_RANGE(0x330000, 0x331fff) AM_RAM_WRITE(paletteram_xrgb_word_be_w) AM_SHARE("paletteram") @@ -342,7 +342,7 @@ static ADDRESS_MAP_START( viostorm_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x26800e, 0x26800f) AM_WRITE(sound_cmd2_w) AM_RANGE(0x268014, 0x268015) AM_READ(sound_status_r) AM_RANGE(0x268000, 0x26801f) AM_RAM - AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,altK056832_b_word_w) + AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,b_word_w) AM_RANGE(0x270000, 0x27003f) AM_DEVWRITE("k056832", k056832_device,m_word_w) AM_RANGE(0x274000, 0x274001) AM_READ_PORT("P1_P3") AM_RANGE(0x274002, 0x274003) AM_READ_PORT("P2_P4") @@ -350,8 +350,8 @@ static ADDRESS_MAP_START( viostorm_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x278002, 0x278003) AM_READ(eeprom_r) AM_RANGE(0x27c000, 0x27c001) AM_READNOP // watchdog lives here AM_RANGE(0x27c000, 0x27c001) AM_WRITE(mmeeprom_w) - AM_RANGE(0x300000, 0x301fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) - AM_RANGE(0x302000, 0x303fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM mirror read(essential) + AM_RANGE(0x300000, 0x301fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) + AM_RANGE(0x302000, 0x303fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM mirror read(essential) AM_RANGE(0x304000, 0x3041ff) AM_RAM AM_RANGE(0x310000, 0x311fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r) AM_RANGE(0x330000, 0x331fff) AM_RAM_WRITE(paletteram_xrgb_word_be_w) AM_SHARE("paletteram") @@ -439,11 +439,11 @@ static ADDRESS_MAP_START( martchmp_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x418000, 0x41801f) AM_RAM // sound regs fall through AM_RANGE(0x41a000, 0x41a001) AM_WRITE(sound_irq_w) AM_RANGE(0x41c000, 0x41c01f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) // CCU - AM_RANGE(0x41e000, 0x41e007) AM_DEVWRITE("k056832", k056832_device,altK056832_b_word_w) // VSCCS + AM_RANGE(0x41e000, 0x41e007) AM_DEVWRITE("k056832", k056832_device,b_word_w) // VSCCS AM_RANGE(0x480000, 0x483fff) AM_READWRITE(K053247_martchmp_word_r,K053247_martchmp_word_w) AM_SHARE("spriteram") // sprite RAM AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_xrgb_word_be_w) AM_SHARE("paletteram") // palette RAM - AM_RANGE(0x680000, 0x681fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM - AM_RANGE(0x682000, 0x683fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM mirror read/write (essential) + AM_RANGE(0x680000, 0x681fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM + AM_RANGE(0x682000, 0x683fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM mirror read/write (essential) AM_RANGE(0x700000, 0x703fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r) // tile ROM readback #if MW_DEBUG AM_RANGE(0x400000, 0x4000ff) AM_READ_LEGACY(K055555_word_r) @@ -460,8 +460,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( dadandrn_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x000000, 0x1fffff) AM_ROM // main program and data ROM AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(K053247_scattered_word_r,K053247_scattered_word_w) AM_SHARE("spriteram") - AM_RANGE(0x410000, 0x411fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM - AM_RANGE(0x412000, 0x413fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM mirror read/write (essential) + AM_RANGE(0x410000, 0x411fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM + AM_RANGE(0x412000, 0x413fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM mirror read/write (essential) AM_RANGE(0x420000, 0x421fff) AM_RAM_WRITE(paletteram_xrgb_word_be_w) AM_SHARE("paletteram") AM_RANGE(0x430000, 0x430007) AM_WRITE_LEGACY(K053246_word_w) AM_RANGE(0x440000, 0x443fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r) @@ -470,7 +470,7 @@ static ADDRESS_MAP_START( dadandrn_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x460000, 0x46001f) AM_WRITEONLY AM_SHARE("k053936_0_ct16") AM_RANGE(0x470000, 0x470fff) AM_RAM AM_SHARE("k053936_0_li16") AM_RANGE(0x480000, 0x48003f) AM_DEVWRITE("k056832", k056832_device,m_word_w) // VACSET - AM_RANGE(0x482000, 0x482007) AM_DEVWRITE("k056832", k056832_device,altK056832_b_word_w) // VSCCS + AM_RANGE(0x482000, 0x482007) AM_DEVWRITE("k056832", k056832_device,b_word_w) // VSCCS AM_RANGE(0x484000, 0x484003) AM_WRITE(ddd_053936_clip_w) AM_RANGE(0x486000, 0x48601f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) AM_RANGE(0x488000, 0x4880ff) AM_WRITE_LEGACY(K055555_word_w) @@ -507,8 +507,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( gaiapols_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x000000, 0x2fffff) AM_ROM // main program AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(K053247_scattered_word_r,K053247_scattered_word_w) AM_SHARE("spriteram") - AM_RANGE(0x410000, 0x411fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM - AM_RANGE(0x412000, 0x413fff) AM_DEVREADWRITE("k056832", k056832_device,altK056832_ram_word_r,altK056832_ram_word_w) // tilemap RAM mirror read / write (essential) + AM_RANGE(0x410000, 0x411fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM + AM_RANGE(0x412000, 0x413fff) AM_DEVREADWRITE("k056832", k056832_device,ram_word_r,ram_word_w) // tilemap RAM mirror read / write (essential) AM_RANGE(0x420000, 0x421fff) AM_RAM_WRITE(paletteram_xrgb_word_be_w) AM_SHARE("paletteram") AM_RANGE(0x430000, 0x430007) AM_WRITE_LEGACY(K053246_word_w) AM_RANGE(0x440000, 0x441fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r) @@ -517,7 +517,7 @@ static ADDRESS_MAP_START( gaiapols_map, AS_PROGRAM, 16, mystwarr_state ) AM_RANGE(0x460000, 0x46001f) AM_WRITEONLY AM_SHARE("k053936_0_ct16") AM_RANGE(0x470000, 0x470fff) AM_RAM AM_SHARE("k053936_0_li16") AM_RANGE(0x480000, 0x48003f) AM_DEVWRITE("k056832", k056832_device,m_word_w) // VACSET - AM_RANGE(0x482000, 0x482007) AM_DEVWRITE("k056832", k056832_device,altK056832_b_word_w) // VSCCS + AM_RANGE(0x482000, 0x482007) AM_DEVWRITE("k056832", k056832_device,b_word_w) // VSCCS AM_RANGE(0x484000, 0x484003) AM_WRITE(ddd_053936_clip_w) AM_RANGE(0x486000, 0x48601f) AM_DEVREADWRITE8("k053252", k053252_device, read, write, 0x00ff) AM_RANGE(0x488000, 0x4880ff) AM_WRITE_LEGACY(K055555_word_w) diff --git a/src/mame/includes/konamigx.h b/src/mame/includes/konamigx.h index 008ad6bea61..79f3b8f5939 100644 --- a/src/mame/includes/konamigx.h +++ b/src/mame/includes/konamigx.h @@ -103,7 +103,7 @@ public: void _gxcommoninitnosprites(running_machine &machine); void _gxcommoninit(running_machine &machine); - DECLARE_READ32_MEMBER( altK056832_6bpp_rom_long_r ); + DECLARE_READ32_MEMBER( k_6bpp_rom_long_r ); void konamigx_mixer(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, tilemap_t *sub1, int sub1flags, tilemap_t *sub2, int sub2flags, diff --git a/src/mame/video/k054156_k054157_k056832.c b/src/mame/video/k054156_k054157_k056832.c index e97f004e657..fbbdb3558fa 100644 --- a/src/mame/video/k054156_k054157_k056832.c +++ b/src/mame/video/k054156_k054157_k056832.c @@ -524,6 +524,7 @@ void k056832_device::mark_page_dirty( int page ) mark_all_lines_dirty(page); } + void k056832_device::mark_plane_dirty( int layer ) { int tilemode, i; @@ -540,6 +541,9 @@ void k056832_device::mark_plane_dirty( int layer ) } } + + + void k056832_device::mark_all_tilemaps_dirty( ) { int i; @@ -554,12 +558,6 @@ void k056832_device::mark_all_tilemaps_dirty( ) } } -/* moo.c needs to call this in its VIDEO_UPDATE */ -void k056832_device::mark_all_tmaps_dirty( ) -{ - mark_all_tilemaps_dirty(); -} - void k056832_device::update_page_layout( ) { int layer, rowstart, rowspan, colstart, colspan, r, c, page_idx, setlayer; @@ -613,6 +611,9 @@ void k056832_device::update_page_layout( ) mark_all_tilemaps_dirty(); } + + + int k056832_device::get_lookup( int bits ) { int res; @@ -708,6 +709,10 @@ void k056832_device::change_rambank( ) mark_all_tilemaps_dirty(); } + + + + int k056832_device::get_current_rambank( ) { int bank = m_regs[0x19]; @@ -727,6 +732,9 @@ void k056832_device::change_rombank( ) m_cur_gfx_banks = bank % m_num_gfx_banks; } + + + void k056832_device::set_tile_bank( int bank ) { m_uses_tile_banks = 1; @@ -785,6 +793,7 @@ int k056832_device::rom_read_b( int offset, int blksize, int blksize2, int zeros return ret; } + READ16_MEMBER( k056832_device::k_5bpp_rom_word_r ) { if (mem_mask == 0xff00) @@ -832,6 +841,9 @@ READ32_MEMBER( k056832_device::k_6bpp_rom_long_r ) return 0; } + + + READ16_MEMBER( k056832_device::rom_word_r ) { int addr = 0x2000 * m_cur_gfx_banks + 2 * offset; @@ -957,6 +969,10 @@ READ16_MEMBER( k056832_device::ram_half_word_r ) return m_videoram[m_selected_page_x4096 + (((offset << 1) & 0xffe) | ((offset >> 11) ^ 1))]; } + + + + READ32_MEMBER( k056832_device::ram_long_r ) { UINT16 *pMem = &m_videoram[m_selected_page_x4096 + offset * 2]; @@ -1092,6 +1108,8 @@ WRITE16_MEMBER( k056832_device::ram_word_w ) } } + + WRITE16_MEMBER( k056832_device::ram_half_word_w ) { UINT16 *adr = &m_videoram[m_selected_page_x4096 + (((offset << 1) & 0xffe) | 1)]; @@ -1133,6 +1151,9 @@ WRITE32_MEMBER( k056832_device::ram_long_w ) } } + + + WRITE32_MEMBER( k056832_device::unpaged_ram_long_w ) { UINT16 *tile_ptr; @@ -1273,6 +1294,125 @@ WRITE16_MEMBER( k056832_device::word_w ) } } + +WRITE16_MEMBER( k056832_device::m_word_w ) +{ + int layer, flip, mask, i; + UINT32 old_data, new_data; + + old_data = m_regs[offset]; + COMBINE_DATA(&m_regs[offset]); + new_data = m_regs[offset]; + + if (new_data != old_data) + { + switch(offset) + { + /* -x-- ---- dotclock select: 0=8Mhz, 1=6Mhz (not used by GX) + * --x- ---- screen flip y + * ---x ---- screen flip x + * ---- --x- external linescroll RAM page enable + */ + case 0x00/2: + if ((new_data & 0x30) != (old_data & 0x30)) + { + flip = 0; + if (new_data & 0x20) flip |= TILEMAP_FLIPY; + if (new_data & 0x10) flip |= TILEMAP_FLIPX; + for (i=0; iset_flip(flip); + } + } + + if ((new_data & 0x02) != (old_data & 0x02)) + { + change_rambank(); + } + break; + + /* -------- -----xxx external irqlines enable (not used by GX) + * -------- xx------ tilemap attribute config (FBIT0 and FBIT1) + */ + //case 0x06/2: break; + + // -------- ----DCBA tile mode: 0=512x1, 1=8x8 + // -------- DCBA---- synchronous scroll: 0=off, 1=on + case 0x08/2: + for (layer=0; layer<4; layer++) + { + mask = 1<= 0x10/2 && offset <= 0x16/2) + { + m_y[layer] = (new_data&0x18)>>3; + m_h[layer] = (new_data&0x3); + m_active_layer = layer; + update_page_layout(); + } else + + if (offset >= 0x18/2 && offset <= 0x1e/2) + { + m_x[layer] = (new_data&0x18)>>3; + m_w[layer] = (new_data&0x03); + m_active_layer = layer; + update_page_layout(); + } else + + if (offset >= 0x20/2 && offset <= 0x26/2) + { + m_dy[layer] = (INT16)new_data; + } else + + if (offset >= 0x28/2 && offset <= 0x2e/2) + { + m_dx[layer] = (INT16)new_data; + } + break; + } + } +} + WRITE32_MEMBER( k056832_device::long_w ) { // GX does access of all 3 widths (8/16/32) so we can't do the @@ -1283,11 +1423,25 @@ WRITE32_MEMBER( k056832_device::long_w ) word_w(space, offset + 1, data, mem_mask); } +WRITE32_MEMBER( k056832_device::altK056832_long_w ) +{ + // GX does access of all 3 widths (8/16/32) so we can't do the + // if (ACCESSING_xxx) trick. in particular, 8-bit writes + // are used to the tilemap bank register. + offset <<= 1; + m_word_w(space, offset, data>>16, mem_mask >> 16); + m_word_w(space, offset+1, data, mem_mask); +} + + WRITE16_MEMBER( k056832_device::b_word_w ) { COMBINE_DATA(&m_regsb[offset]); } + + + WRITE8_MEMBER( k056832_device::write ) { if (offset & 1) @@ -2047,10 +2201,6 @@ void k056832_device::set_layer_association( int status ) m_default_layer_association = status; } -int k056832_device::get_layer_association( ) -{ - return(m_layer_association); -} void k056832_device::set_layer_offs( int layer, int offsx, int offsy ) { @@ -2124,143 +2274,13 @@ READ16_MEMBER( k056832_device::b_word_r ) /* */ /***************************************************************************/ -#define altK056832_mark_line_dirty(P,L) if (L<0x100) m_line_dirty[P][L>>5] |= 1<<(L&0x1f) -#define altK056832_mark_all_lines_dirty(P) m_all_lines_dirty[P] = 1 - -void k056832_device::altK056832_mark_page_dirty(int page) -{ - if (m_page_tile_mode[page]) - m_tilemap[page]->mark_all_dirty(); - else - altK056832_mark_all_lines_dirty(page); -} - -void k056832_device::altK056832_mark_plane_dirty(int layer) -{ - int tilemode, i; - - tilemode = m_layer_tile_mode[layer]; - - for (i=0; i>1)&0xc)|(bank&3); - } - m_selected_page_x4096 = m_selected_page << 12; - - // refresh associated tilemaps - altK056832_MarkAllTilemapsDirty(); -} - -void k056832_device::altK056832_change_rombank(void) -{ - int bank; - - if (m_uses_tile_banks) /* Asterix */ - { - bank = (m_regs[0x1a] >> 8) | (m_regs[0x1b] << 4) | (m_cur_tile_bank << 6); - } - else - { - bank = m_regs[0x1a] | (m_regs[0x1b] << 16); - } - - m_cur_gfx_banks = bank % m_num_gfx_banks; -} void k056832_device::altK056832_postload() { - altK056832_UpdatePageLayout(); - altK056832_change_rambank(); - altK056832_change_rombank(); + update_page_layout(); + change_rambank(); + change_rombank(); } void k056832_device::altK056832_vh_start(running_machine &machine, const char *gfx_memory_region, int bpp, int big, @@ -2473,10 +2493,10 @@ void k056832_device::altK056832_vh_start(running_machine &machine, const char *g memset(m_regs, 0x00, sizeof(m_regs) ); memset(m_regsb, 0x00, sizeof(m_regsb) ); - altK056832_UpdatePageLayout(); + update_page_layout(); - altK056832_change_rambank(); - altK056832_change_rombank(); + change_rambank(); + change_rombank(); machine.save().save_pointer(NAME(m_videoram), 0x10000); machine.save().save_item(NAME(m_regs)); @@ -2496,91 +2516,7 @@ void k056832_device::altK056832_vh_start(running_machine &machine, const char *g -/* generic helper routine for ROM checksumming */ -int k056832_device::altK056832_rom_read_b(running_machine &machine, int offset, int blksize, int blksize2, int zerosec) -{ - UINT8 *rombase; - int base, ret; - rombase = (UINT8 *)machine.root_device().memregion(altK056832_memory_region)->base(); - - if ((m_rom_half) && (zerosec)) - { - return 0; - } - - // add in the bank offset - offset += (m_cur_gfx_banks * 0x2000); - - // figure out the base of the ROM block - base = (offset / blksize) * blksize2; - - // get the starting offset of the proper word inside the block - base += (offset % blksize) * 2; - - if (m_rom_half) - { - ret = rombase[base+1]; - } - else - { - ret = rombase[base]; - m_rom_half = 1; - } - - return ret; -} - - -READ32_MEMBER( k056832_device::altK056832_5bpp_rom_long_r ) -{ - if (mem_mask == 0xff000000) - { - return altK056832_rom_read_b(space.machine(), offset*4, 4, 5, 0)<<24; - } - else if (mem_mask == 0x00ff0000) - { - return altK056832_rom_read_b(space.machine(), offset*4+1, 4, 5, 0)<<16; - } - else if (mem_mask == 0x0000ff00) - { - return altK056832_rom_read_b(space.machine(), offset*4+2, 4, 5, 0)<<8; - } - else if (mem_mask == 0x000000ff) - { - return altK056832_rom_read_b(space.machine(), offset*4+3, 4, 5, 1); - } - else - { - LOG(("Non-byte read of tilemap ROM, PC=%x (mask=%x)\n", space.device().safe_pc(), mem_mask)); - } - return 0; -} - -READ32_MEMBER( k056832_device::altK056832_6bpp_rom_long_r ) -{ - if (mem_mask == 0xff000000) - { - return altK056832_rom_read_b(space.machine(), offset*4, 4, 6, 0)<<24; - } - else if (mem_mask == 0x00ff0000) - { - return altK056832_rom_read_b(space.machine(), offset*4+1, 4, 6, 0)<<16; - } - else if (mem_mask == 0x0000ff00) - { - return altK056832_rom_read_b(space.machine(), offset*4+2, 4, 6, 0)<<8; - } - else if (mem_mask == 0x000000ff) - { - return altK056832_rom_read_b(space.machine(), offset*4+3, 4, 6, 0); - } - else - { - LOG(("Non-byte read of tilemap ROM, PC=%x (mask=%x)\n", space.device().safe_pc(), mem_mask)); - } - return 0; -} // data is arranged like this: @@ -2651,203 +2587,11 @@ READ16_MEMBER( k056832_device::altK056832_mw_rom_word_r ) } -/* only one page is mapped to videoram at a time through a window */ -READ16_MEMBER( k056832_device::altK056832_ram_word_r ) -{ - // reading from tile RAM resets the ROM readback "half" offset - m_rom_half = 0; - - return m_videoram[m_selected_page_x4096+offset]; -} -READ32_MEMBER( k056832_device::altK056832_ram_long_r ) -{ - UINT16 *pMem = &m_videoram[m_selected_page_x4096+offset*2]; - - // reading from tile RAM resets the ROM readback "half" offset - m_rom_half = 0; - - return(pMem[0]<<16 | pMem[1]); -} - -WRITE16_MEMBER( k056832_device::altK056832_ram_word_w ) -{ - UINT16 *tile_ptr; - UINT16 old_mask, old_data; - - tile_ptr = &m_videoram[m_selected_page_x4096+offset]; - old_mask = ~mem_mask; - old_data = *tile_ptr; - data = (data & mem_mask) | (old_data & old_mask); - - if(data != old_data) - { - offset >>= 1; - *tile_ptr = data; - - if (m_page_tile_mode[m_selected_page]) - m_tilemap[m_selected_page]->mark_tile_dirty(offset); - else - altK056832_mark_line_dirty(m_selected_page, offset); - } -} -WRITE32_MEMBER( k056832_device::altK056832_ram_long_w ) -{ - UINT16 *tile_ptr; - UINT32 old_mask, old_data; - tile_ptr = &m_videoram[m_selected_page_x4096+offset*2]; - old_mask = ~mem_mask; - old_data = (UINT32)tile_ptr[0]<<16 | (UINT32)tile_ptr[1]; - data = (data & mem_mask) | (old_data & old_mask); - - if (data != old_data) - { - tile_ptr[0] = data>>16; - tile_ptr[1] = data; - - if (m_page_tile_mode[m_selected_page]) - m_tilemap[m_selected_page]->mark_tile_dirty(offset); - else - altK056832_mark_line_dirty(m_selected_page, offset); - } -} - -WRITE16_MEMBER( k056832_device::m_word_w ) -{ - int layer, flip, mask, i; - UINT32 old_data, new_data; - - old_data = m_regs[offset]; - COMBINE_DATA(&m_regs[offset]); - new_data = m_regs[offset]; - - if (new_data != old_data) - { - switch(offset) - { - /* -x-- ---- dotclock select: 0=8Mhz, 1=6Mhz (not used by GX) - * --x- ---- screen flip y - * ---x ---- screen flip x - * ---- --x- external linescroll RAM page enable - */ - case 0x00/2: - if ((new_data & 0x30) != (old_data & 0x30)) - { - flip = 0; - if (new_data & 0x20) flip |= TILEMAP_FLIPY; - if (new_data & 0x10) flip |= TILEMAP_FLIPX; - for (i=0; iset_flip(flip); - } - } - - if ((new_data & 0x02) != (old_data & 0x02)) - { - altK056832_change_rambank(); - } - break; - - /* -------- -----xxx external irqlines enable (not used by GX) - * -------- xx------ tilemap attribute config (FBIT0 and FBIT1) - */ - //case 0x06/2: break; - - // -------- ----DCBA tile mode: 0=512x1, 1=8x8 - // -------- DCBA---- synchronous scroll: 0=off, 1=on - case 0x08/2: - for (layer=0; layer<4; layer++) - { - mask = 1<= 0x10/2 && offset <= 0x16/2) - { - m_y[layer] = (new_data&0x18)>>3; - m_h[layer] = (new_data&0x3); - m_active_layer = layer; - altK056832_UpdatePageLayout(); - } else - - if (offset >= 0x18/2 && offset <= 0x1e/2) - { - m_x[layer] = (new_data&0x18)>>3; - m_w[layer] = (new_data&0x03); - m_active_layer = layer; - altK056832_UpdatePageLayout(); - } else - - if (offset >= 0x20/2 && offset <= 0x26/2) - { - m_dy[layer] = (INT16)new_data; - } else - - if (offset >= 0x28/2 && offset <= 0x2e/2) - { - m_dx[layer] = (INT16)new_data; - } - break; - } - } -} - -WRITE32_MEMBER( k056832_device::altK056832_long_w ) -{ - // GX does access of all 3 widths (8/16/32) so we can't do the - // if (ACCESSING_xxx) trick. in particular, 8-bit writes - // are used to the tilemap bank register. - offset <<= 1; - m_word_w(space, offset, data>>16, mem_mask >> 16); - m_word_w(space, offset+1, data, mem_mask); -} - -WRITE16_MEMBER( k056832_device::altK056832_b_word_w ) -{ - COMBINE_DATA( &m_regsb[offset] ); -} int k056832_device::altK056832_update_linemap(running_machine &machine, bitmap_rgb32 &bitmap, int page, int flags) @@ -3161,7 +2905,7 @@ void k056832_device::m_tilemap_draw(running_machine &machine, bitmap_rgb32 &bitm if (last_colorbase[pageIndex] != new_colorbase) { last_colorbase[pageIndex] = new_colorbase; - altK056832_mark_page_dirty(pageIndex); + mark_page_dirty(pageIndex); } } else @@ -3257,18 +3001,11 @@ void k056832_device::m_tilemap_draw(running_machine &machine, bitmap_rgb32 &bitm } // end of function -int k056832_device::altK056832_get_LayerAssociation(void) +int k056832_device::get_layer_association(void) { return(m_layer_association); } -void k056832_device::altK056832_set_LayerOffset(int layer, int offsx, int offsy) -{ - m_layer_offs[layer][0] = offsx; - m_layer_offs[layer][1] = offsy; -} - - void k056832_device::altK056832_set_UpdateMode(int mode) { m_k055555_use = mode; diff --git a/src/mame/video/k054156_k054157_k056832.h b/src/mame/video/k054156_k054157_k056832.h index cf75c5a99f7..de57f72aa11 100644 --- a/src/mame/video/k054156_k054157_k056832.h +++ b/src/mame/video/k054156_k054157_k056832.h @@ -85,7 +85,7 @@ public: DECLARE_WRITE8_MEMBER( write ); DECLARE_WRITE8_MEMBER( b_w ); void mark_plane_dirty(int num); - void mark_all_tmaps_dirty(); + void mark_all_tilemaps_dirty(); void tilemap_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority); void tilemap_draw(bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority); void tilemap_draw_dj(bitmap_rgb32 &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority); @@ -198,7 +198,6 @@ private: TILE_GET_INFO_MEMBER(get_tile_infof); void mark_page_dirty(int page); - void mark_all_tilemaps_dirty(); void update_page_layout(); void change_rambank(); void change_rombank(); @@ -223,31 +222,18 @@ public: int (*scrolld)[4][2], void (*callback)(running_machine &machine, int layer, int *code, int *color, int *flags), int djmain_hack); - DECLARE_READ16_MEMBER( altK056832_ram_word_r ); - DECLARE_WRITE16_MEMBER( altK056832_ram_word_w ); - DECLARE_READ32_MEMBER( altK056832_5bpp_rom_long_r ); - DECLARE_READ32_MEMBER( altK056832_6bpp_rom_long_r ); + DECLARE_READ16_MEMBER( altK056832_mw_rom_word_r ); DECLARE_WRITE16_MEMBER( m_word_w ); // "VRAM" registers - DECLARE_WRITE16_MEMBER( altK056832_b_word_w ); - void altK056832_mark_plane_dirty(int num); - void altK056832_MarkAllTilemapsDirty(void); - void m_tilemap_draw(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority); - int altK056832_get_LayerAssociation(void); - void altK056832_set_LayerOffset(int layer, int offsx, int offsy); - void altK056832_set_UpdateMode(int mode); - DECLARE_READ32_MEMBER( altK056832_ram_long_r ); - DECLARE_WRITE32_MEMBER( altK056832_ram_long_w ); + void altK056832_set_UpdateMode(int mode); // k055555 hook + DECLARE_WRITE32_MEMBER( altK056832_long_w ); - DECLARE_WRITE32_MEMBER( altK056832_b_long_w ); - void altK056832_mark_page_dirty(int page); - void altK056832_change_rambank(void); - void altK056832_change_rombank(void); - void altK056832_UpdatePageLayout(void); - int altK056832_rom_read_b(running_machine &machine, int offset, int blksize, int blksize2, int zerosec); void altK056832_postload(void); + + void m_tilemap_draw(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority); +private: int altK056832_update_linemap(running_machine &machine, bitmap_rgb32 &bitmap, int page, int flags); diff --git a/src/mame/video/konamigx.c b/src/mame/video/konamigx.c index 97cff797184..2984e330470 100644 --- a/src/mame/video/konamigx.c +++ b/src/mame/video/konamigx.c @@ -2044,10 +2044,10 @@ void konamigx_state::_gxcommoninitnosprites(running_machine &machine) // In most cases only a constant is needed to add to the X offsets to yield correct // displacement. This should be done by the CCU but the CRT timings have not been // figured out. - m_k056832->altK056832_set_LayerOffset(0, -2, 0); - m_k056832->altK056832_set_LayerOffset(1, 0, 0); - m_k056832->altK056832_set_LayerOffset(2, 2, 0); - m_k056832->altK056832_set_LayerOffset(3, 3, 0); + m_k056832->set_layer_offs(0, -2, 0); + m_k056832->set_layer_offs(1, 0, 0); + m_k056832->set_layer_offs(2, 2, 0); + m_k056832->set_layer_offs(3, 3, 0); konamigx_has_dual_screen = 0; konamigx_current_frame = 0; @@ -2119,10 +2119,10 @@ VIDEO_START_MEMBER(konamigx_state,dragoonj) _gxcommoninitnosprites(machine()); - m_k056832->altK056832_set_LayerOffset(0, -2+1, 0); - m_k056832->altK056832_set_LayerOffset(1, 0+1, 0); - m_k056832->altK056832_set_LayerOffset(2, 2+1, 0); - m_k056832->altK056832_set_LayerOffset(3, 3+1, 0); + m_k056832->set_layer_offs(0, -2+1, 0); + m_k056832->set_layer_offs(1, 0+1, 0); + m_k056832->set_layer_offs(2, 2+1, 0); + m_k056832->set_layer_offs(3, 3+1, 0); } VIDEO_START_MEMBER(konamigx_state,le2) @@ -2181,10 +2181,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type3) // K053936GP_set_offset(0, -30, -1); K053936_set_offset(0, -30, +1); - m_k056832->altK056832_set_LayerOffset(0, -52, 0); - m_k056832->altK056832_set_LayerOffset(1, -48, 0); - m_k056832->altK056832_set_LayerOffset(2, -48, 0); - m_k056832->altK056832_set_LayerOffset(3, -48, 0); + m_k056832->set_layer_offs(0, -52, 0); + m_k056832->set_layer_offs(1, -48, 0); + m_k056832->set_layer_offs(2, -48, 0); + m_k056832->set_layer_offs(3, -48, 0); konamigx_has_dual_screen = 1; konamigx_palformat = 1; @@ -2207,10 +2207,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4) gx_rozenable = 0; gx_specialrozenable = 3; - m_k056832->altK056832_set_LayerOffset(0, -27, 0); - m_k056832->altK056832_set_LayerOffset(1, -25, 0); - m_k056832->altK056832_set_LayerOffset(2, -24, 0); - m_k056832->altK056832_set_LayerOffset(3, -22, 0); + m_k056832->set_layer_offs(0, -27, 0); + m_k056832->set_layer_offs(1, -25, 0); + m_k056832->set_layer_offs(2, -24, 0); + m_k056832->set_layer_offs(3, -22, 0); K053936_wraparound_enable(0, 0); K053936GP_set_offset(0, -36, 1); @@ -2238,10 +2238,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_vsn) gx_rozenable = 0; gx_specialrozenable = 3; - m_k056832->altK056832_set_LayerOffset(0, -52, 0); - m_k056832->altK056832_set_LayerOffset(1, -48, 0); - m_k056832->altK056832_set_LayerOffset(2, -48, 0); - m_k056832->altK056832_set_LayerOffset(3, -48, 0); + m_k056832->set_layer_offs(0, -52, 0); + m_k056832->set_layer_offs(1, -48, 0); + m_k056832->set_layer_offs(2, -48, 0); + m_k056832->set_layer_offs(3, -48, 0); K053936_wraparound_enable(0, 1); // wraparound doesn't work properly with the custom drawing function anyway, see the crowd in vsnet and rushhero K053936GP_set_offset(0, -30, 0); @@ -2269,10 +2269,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2) gx_specialrozenable = 3; - m_k056832->altK056832_set_LayerOffset(0, -29, -1); - m_k056832->altK056832_set_LayerOffset(1, -27, -1); - m_k056832->altK056832_set_LayerOffset(2, -26, -1); - m_k056832->altK056832_set_LayerOffset(3, -24, -1); + m_k056832->set_layer_offs(0, -29, -1); + m_k056832->set_layer_offs(1, -27, -1); + m_k056832->set_layer_offs(2, -26, -1); + m_k056832->set_layer_offs(3, -24, -1); K053936_wraparound_enable(0, 0); @@ -2308,10 +2308,10 @@ VIDEO_START_MEMBER(konamigx_state,opengolf) _gxcommoninitnosprites(machine()); - m_k056832->altK056832_set_LayerOffset(0, -2+1, 0); - m_k056832->altK056832_set_LayerOffset(1, 0+1, 0); - m_k056832->altK056832_set_LayerOffset(2, 2+1, 0); - m_k056832->altK056832_set_LayerOffset(3, 3+1, 0); + m_k056832->set_layer_offs(0, -2+1, 0); + m_k056832->set_layer_offs(1, 0+1, 0); + m_k056832->set_layer_offs(2, 2+1, 0); + m_k056832->set_layer_offs(3, 3+1, 0); gx_psac_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(konamigx_state::get_gx_psac1a_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 128); gx_psac_tilemap2 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(konamigx_state::get_gx_psac1b_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 128); @@ -2346,10 +2346,10 @@ VIDEO_START_MEMBER(konamigx_state,racinfrc) _gxcommoninitnosprites(machine()); - m_k056832->altK056832_set_LayerOffset(0, -2+1, 0); - m_k056832->altK056832_set_LayerOffset(1, 0+1, 0); - m_k056832->altK056832_set_LayerOffset(2, 2+1, 0); - m_k056832->altK056832_set_LayerOffset(3, 3+1, 0); + m_k056832->set_layer_offs(0, -2+1, 0); + m_k056832->set_layer_offs(1, 0+1, 0); + m_k056832->set_layer_offs(2, 2+1, 0); + m_k056832->set_layer_offs(3, 3+1, 0); gx_psac_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(konamigx_state::get_gx_psac1a_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 128); gx_psac_tilemap2 = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(konamigx_state::get_gx_psac1b_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 128); @@ -2392,7 +2392,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3 if (gx_tilemode == 0) { // driver approximates tile update in mode 0 for speed - unchained = m_k056832->altK056832_get_LayerAssociation(); + unchained = m_k056832->get_layer_association(); for (i=0; i<4; i++) { newbase = K055555_get_palette_index(i)<<6; @@ -2401,7 +2401,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3 layer_colorbase[i] = newbase; if (unchained) - m_k056832->altK056832_mark_plane_dirty(i); + m_k056832->mark_plane_dirty(i); else dirty = 1; } @@ -2428,7 +2428,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3 } } - if (dirty) m_k056832->altK056832_MarkAllTilemapsDirty(); + if (dirty) m_k056832->mark_all_tilemaps_dirty(); // Type-1 if (gx_specialrozenable == 1) diff --git a/src/mame/video/moo.c b/src/mame/video/moo.c index 29face17ee1..fe19e6e47a7 100644 --- a/src/mame/video/moo.c +++ b/src/mame/video/moo.c @@ -97,7 +97,7 @@ UINT32 moo_state::screen_update_moo(screen_device &screen, bitmap_rgb32 &bitmap, } } if (dirty) - m_k056832->mark_all_tmaps_dirty(); + m_k056832->mark_all_tilemaps_dirty(); } layers[0] = 1; diff --git a/src/mame/video/mystwarr.c b/src/mame/video/mystwarr.c index e75cb0d47cd..b05f0db9c0f 100644 --- a/src/mame/video/mystwarr.c +++ b/src/mame/video/mystwarr.c @@ -175,10 +175,10 @@ VIDEO_START_MEMBER(mystwarr_state,gaiapols) konamigx_mixer_init(machine(), 0); - m_k056832->altK056832_set_LayerOffset(0, -2+2-1, 0-1); - m_k056832->altK056832_set_LayerOffset(1, 0+2, 0); - m_k056832->altK056832_set_LayerOffset(2, 2+2, 0); - m_k056832->altK056832_set_LayerOffset(3, 3+2, 0); + m_k056832->set_layer_offs(0, -2+2-1, 0-1); + m_k056832->set_layer_offs(1, 0+2, 0); + m_k056832->set_layer_offs(2, 2+2, 0); + m_k056832->set_layer_offs(3, 3+2, 0); K053936_wraparound_enable(0, 1); K053936GP_set_offset(0, -10, 0); // floor tiles in demo loop2 (Elaine vs. boss) @@ -217,10 +217,10 @@ VIDEO_START_MEMBER(mystwarr_state,dadandrn) konamigx_mixer_primode(1); - m_k056832->altK056832_set_LayerOffset(0, -2+4, 0); - m_k056832->altK056832_set_LayerOffset(1, 0+4, 0); - m_k056832->altK056832_set_LayerOffset(2, 2+4, 0); - m_k056832->altK056832_set_LayerOffset(3, 3+4, 0); + m_k056832->set_layer_offs(0, -2+4, 0); + m_k056832->set_layer_offs(1, 0+4, 0); + m_k056832->set_layer_offs(2, 2+4, 0); + m_k056832->set_layer_offs(3, 3+4, 0); K053936_wraparound_enable(0, 1); K053936GP_set_offset(0, -8, 0); // Brainy's laser @@ -244,10 +244,10 @@ VIDEO_START_MEMBER(mystwarr_state,mystwarr) konamigx_mixer_init(machine(), 0); - m_k056832->altK056832_set_LayerOffset(0, -2-3, 0); - m_k056832->altK056832_set_LayerOffset(1, 0-3, 0); - m_k056832->altK056832_set_LayerOffset(2, 2-3, 0); - m_k056832->altK056832_set_LayerOffset(3, 3-3, 0); + m_k056832->set_layer_offs(0, -2-3, 0); + m_k056832->set_layer_offs(1, 0-3, 0); + m_k056832->set_layer_offs(2, 2-3, 0); + m_k056832->set_layer_offs(3, 3-3, 0); m_cbparam = 0; } @@ -268,10 +268,10 @@ VIDEO_START_MEMBER(mystwarr_state,metamrph) konamigx_mixer_init(machine(), 0); // other reference, floor at first boss - m_k056832->altK056832_set_LayerOffset(0, -2+4, 0); // text - m_k056832->altK056832_set_LayerOffset(1, 0+4, 0); // attract sea - m_k056832->altK056832_set_LayerOffset(2, 2+4, 0); // attract red monster in background of sea - m_k056832->altK056832_set_LayerOffset(3, 3+4, 0); // attract sky background to sea + m_k056832->set_layer_offs(0, -2+4, 0); // text + m_k056832->set_layer_offs(1, 0+4, 0); // attract sea + m_k056832->set_layer_offs(2, 2+4, 0); // attract red monster in background of sea + m_k056832->set_layer_offs(3, 3+4, 0); // attract sky background to sea } VIDEO_START_MEMBER(mystwarr_state,viostorm) @@ -289,10 +289,10 @@ VIDEO_START_MEMBER(mystwarr_state,viostorm) konamigx_mixer_init(machine(), 0); - m_k056832->altK056832_set_LayerOffset(0, -2+1, 0); - m_k056832->altK056832_set_LayerOffset(1, 0+1, 0); - m_k056832->altK056832_set_LayerOffset(2, 2+1, 0); - m_k056832->altK056832_set_LayerOffset(3, 3+1, 0); + m_k056832->set_layer_offs(0, -2+1, 0); + m_k056832->set_layer_offs(1, 0+1, 0); + m_k056832->set_layer_offs(2, 2+1, 0); + m_k056832->set_layer_offs(3, 3+1, 0); } VIDEO_START_MEMBER(mystwarr_state,martchmp) @@ -310,10 +310,10 @@ VIDEO_START_MEMBER(mystwarr_state,martchmp) konamigx_mixer_init(machine(), 0); - m_k056832->altK056832_set_LayerOffset(0, -2-4, 0); - m_k056832->altK056832_set_LayerOffset(1, 0-4, 0); - m_k056832->altK056832_set_LayerOffset(2, 2-4, 0); - m_k056832->altK056832_set_LayerOffset(3, 3-4, 0); + m_k056832->set_layer_offs(0, -2-4, 0); + m_k056832->set_layer_offs(1, 0-4, 0); + m_k056832->set_layer_offs(2, 2-4, 0); + m_k056832->set_layer_offs(3, 3-4, 0); K054338_invert_alpha(0); } @@ -330,7 +330,7 @@ UINT32 mystwarr_state::screen_update_mystwarr(screen_device &screen, bitmap_rgb3 { old = m_layer_colorbase[i]; m_layer_colorbase[i] = K055555_get_palette_index(i)<<4; - if( old != m_layer_colorbase[i] ) m_k056832->altK056832_mark_plane_dirty(i); + if( old != m_layer_colorbase[i] ) m_k056832->mark_plane_dirty(i); } m_sprite_colorbase = K055555_get_palette_index(4)<<5; @@ -347,7 +347,7 @@ UINT32 mystwarr_state::screen_update_metamrph(screen_device &screen, bitmap_rgb3 { old = m_layer_colorbase[i]; m_layer_colorbase[i] = K055555_get_palette_index(i)<<4; - if (old != m_layer_colorbase[i]) m_k056832->altK056832_mark_plane_dirty(i); + if (old != m_layer_colorbase[i]) m_k056832->mark_plane_dirty(i); } m_sprite_colorbase = K055555_get_palette_index(4)<<4; @@ -364,7 +364,7 @@ UINT32 mystwarr_state::screen_update_martchmp(screen_device &screen, bitmap_rgb3 { old = m_layer_colorbase[i]; m_layer_colorbase[i] = K055555_get_palette_index(i)<<4; - if (old != m_layer_colorbase[i]) m_k056832->altK056832_mark_plane_dirty(i); + if (old != m_layer_colorbase[i]) m_k056832->mark_plane_dirty(i); } m_sprite_colorbase = K055555_get_palette_index(4)<<5; @@ -498,7 +498,7 @@ UINT32 mystwarr_state::screen_update_dadandrn(screen_device &screen, bitmap_rgb3 rozmode = GXSUB_8BPP; } - if (m_k056832->altK056832_get_LayerAssociation()) + if (m_k056832->get_layer_association()) { for (i=0; i<4; i++) { @@ -506,7 +506,7 @@ UINT32 mystwarr_state::screen_update_dadandrn(screen_device &screen, bitmap_rgb3 if (m_layer_colorbase[i] != newbase) { m_layer_colorbase[i] = newbase; - m_k056832->altK056832_mark_plane_dirty(i); + m_k056832->mark_plane_dirty(i); } } } @@ -521,7 +521,7 @@ UINT32 mystwarr_state::screen_update_dadandrn(screen_device &screen, bitmap_rgb3 dirty = 1; } } - if (dirty) m_k056832->altK056832_MarkAllTilemapsDirty(); + if (dirty) m_k056832->mark_all_tilemaps_dirty(); }