begin collapse (nw)

This commit is contained in:
David Haywood 2013-07-10 01:43:33 +00:00
parent 355fa0d55e
commit e9c6b471e0
9 changed files with 526 additions and 473 deletions

View File

@ -1150,10 +1150,10 @@ 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_READ_LEGACY(K056832_5bpp_rom_long_r)
AM_RANGE(0xd00000, 0xd01fff) AM_DEVREAD("k056832", k056832_device, altK056832_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_WRITE_LEGACY(K056832_long_w)
AM_RANGE(0xd40000, 0xd4003f) AM_DEVWRITE("k056832", k056832_device, altK056832_long_w)
AM_RANGE(0xd44000, 0xd4400f) AM_WRITE(konamigx_tilebank_w)
AM_RANGE(0xd48000, 0xd48007) AM_WRITE_LEGACY(K053246_long_w)
AM_RANGE(0xd4a010, 0xd4a01f) AM_WRITE_LEGACY(K053247_reg_long_w)
@ -1168,10 +1168,10 @@ 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_READWRITE_LEGACY(K056832_ram_long_r, K056832_ram_long_w)
AM_RANGE(0xda2000, 0xda3fff) AM_READWRITE_LEGACY(K056832_ram_long_r, K056832_ram_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)
#if GX_DEBUG
AM_RANGE(0xd40000, 0xd4003f) AM_READ_LEGACY(K056832_long_r)
AM_RANGE(0xd40000, 0xd4003f) AM_READ_LEGACY(altK056832_long_r)
AM_RANGE(0xd50000, 0xd500ff) AM_READ_LEGACY(K055555_long_r)
AM_RANGE(0xd4a010, 0xd4a01f) AM_READ_LEGACY(K053247_reg_long_r)
#endif
@ -1792,6 +1792,8 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
MCFG_PALETTE_LENGTH(8192)
MCFG_K056832_ADD_NOINTF("k056832"/*, konamigx_k056832_intf*/)
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_5bpp)
/* sound hardware */
@ -3715,6 +3717,10 @@ static const GXGameInfoT gameDefs[] =
{ "", -1, -1, -1, -1 },
};
READ32_MEMBER( konamigx_state::altK056832_6bpp_rom_long_r )
{
return m_k056832->altK056832_6bpp_rom_long_r(space,offset,mem_mask);
}
DRIVER_INIT_MEMBER(konamigx_state,konamigx)
{
@ -3804,7 +3810,7 @@ DRIVER_INIT_MEMBER(konamigx_state,konamigx)
break;
case BPP66:
m_maincpu->space(AS_PROGRAM).install_legacy_read_handler(0xd00000, 0xd01fff, FUNC(K056832_6bpp_rom_long_r));
m_maincpu->space(AS_PROGRAM).install_read_handler(0xd00000, 0xd01fff, read32_delegate(FUNC(konamigx_state::altK056832_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));

View File

@ -203,7 +203,7 @@ READ16_MEMBER(mystwarr_state::sound_status_msb_r)
WRITE16_MEMBER(mystwarr_state::irq_ack_w)
{
K056832_b_word_w(space, offset, data, mem_mask);
m_k056832->altK056832_b_word_w(space, offset, data, mem_mask);
if (offset == 3 && ACCESSING_BITS_0_7)
{
@ -253,7 +253,7 @@ static ADDRESS_MAP_START( mystwarr_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x482010, 0x48201f) AM_WRITE_LEGACY(K053247_reg_word_w)
AM_RANGE(0x484000, 0x484007) AM_WRITE_LEGACY(K053246_word_w)
AM_RANGE(0x48a000, 0x48a01f) AM_WRITE_LEGACY(K054338_word_w)
AM_RANGE(0x48c000, 0x48c03f) AM_WRITE_LEGACY(K056832_word_w)
AM_RANGE(0x48c000, 0x48c03f) AM_DEVWRITE("k056832", k056832_device,m_word_w)
AM_RANGE(0x490000, 0x490001) AM_WRITE(mweeprom_w)
AM_RANGE(0x492000, 0x492001) AM_WRITENOP // watchdog
AM_RANGE(0x494000, 0x494001) AM_READ_PORT("P1_P2")
@ -267,16 +267,16 @@ 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_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w)
AM_RANGE(0x602000, 0x603fff) AM_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read(essential)
AM_RANGE(0x680000, 0x683fff) AM_READ_LEGACY(K056832_mw_rom_word_r)
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(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
AM_RANGE(0x480000, 0x4800ff) AM_READ_LEGACY(K055555_word_r)
AM_RANGE(0x482010, 0x48201f) AM_READ_LEGACY(K053247_reg_word_r)
AM_RANGE(0x484000, 0x484007) AM_READ_LEGACY(K053246_reg_word_r)
AM_RANGE(0x48a000, 0x48a01f) AM_READ_LEGACY(K054338_word_r)
AM_RANGE(0x48c000, 0x48c03f) AM_READ_LEGACY(K056832_word_r)
AM_RANGE(0x48c000, 0x48c03f) AM_READ_LEGACY(m_word_r)
#endif
ADDRESS_MAP_END
@ -299,17 +299,17 @@ 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_WRITE_LEGACY(K056832_b_word_w)
AM_RANGE(0x270000, 0x27003f) AM_WRITE_LEGACY(K056832_word_w)
AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,altK056832_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")
AM_RANGE(0x278000, 0x278001) AM_READ_PORT("IN0")
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_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w)
AM_RANGE(0x302000, 0x303fff) AM_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read/write (essential)
AM_RANGE(0x310000, 0x311fff) AM_READ_LEGACY(K056832_mw_rom_word_r)
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(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")
#if MW_DEBUG
@ -317,8 +317,8 @@ static ADDRESS_MAP_START( metamrph_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x244010, 0x24401f) AM_READ_LEGACY(K053247_reg_word_r)
AM_RANGE(0x254000, 0x25401f) AM_READ_LEGACY(K054338_word_r)
AM_RANGE(0x258000, 0x2580ff) AM_READ_LEGACY(K055555_word_r)
AM_RANGE(0x26C000, 0x26C007) AM_READ_LEGACY(K056832_b_word_r)
AM_RANGE(0x270000, 0x27003f) AM_READ_LEGACY(K056832_word_r)
AM_RANGE(0x26C000, 0x26C007) AM_READ_LEGACY(altK056832_b_word_r)
AM_RANGE(0x270000, 0x27003f) AM_READ_LEGACY(m_word_r)
#endif
ADDRESS_MAP_END
@ -342,26 +342,26 @@ 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_WRITE_LEGACY(K056832_b_word_w)
AM_RANGE(0x270000, 0x27003f) AM_WRITE_LEGACY(K056832_word_w)
AM_RANGE(0x26c000, 0x26c007) AM_DEVWRITE("k056832", k056832_device,altK056832_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")
AM_RANGE(0x278000, 0x278001) AM_READ_PORT("IN0")
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_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w)
AM_RANGE(0x302000, 0x303fff) AM_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read(essential)
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(0x304000, 0x3041ff) AM_RAM
AM_RANGE(0x310000, 0x311fff) AM_READ_LEGACY(K056832_mw_rom_word_r)
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")
#if MW_DEBUG
AM_RANGE(0x240000, 0x240007) AM_READ_LEGACY(K053246_reg_word_r)
AM_RANGE(0x244010, 0x24401f) AM_READ_LEGACY(K053247_reg_word_r)
AM_RANGE(0x254000, 0x25401f) AM_READ_LEGACY(K054338_word_r)
AM_RANGE(0x258000, 0x2580ff) AM_READ_LEGACY(K055555_word_r)
AM_RANGE(0x26C000, 0x26C007) AM_READ_LEGACY(K056832_b_word_r)
AM_RANGE(0x270000, 0x27003f) AM_READ_LEGACY(K056832_word_r)
AM_RANGE(0x26C000, 0x26C007) AM_READ_LEGACY(altK056832_b_word_r)
AM_RANGE(0x270000, 0x27003f) AM_READ_LEGACY(m_word_r)
#endif
ADDRESS_MAP_END
@ -425,7 +425,7 @@ static ADDRESS_MAP_START( martchmp_map, AS_PROGRAM, 16, mystwarr_state )
AM_RANGE(0x402010, 0x40201f) AM_WRITE_LEGACY(K053247_reg_word_w) // OBJSET2
AM_RANGE(0x404000, 0x404007) AM_WRITE_LEGACY(K053246_word_w) // OBJSET1
AM_RANGE(0x40a000, 0x40a01f) AM_WRITE_LEGACY(K054338_word_w) // CLTC
AM_RANGE(0x40c000, 0x40c03f) AM_WRITE_LEGACY(K056832_word_w) // VACSET
AM_RANGE(0x40c000, 0x40c03f) AM_DEVWRITE("k056832", k056832_device,m_word_w) // VACSET
AM_RANGE(0x40e000, 0x40e03f) AM_WRITE(K053990_martchmp_word_w) // protection
AM_RANGE(0x410000, 0x410001) AM_WRITE(mweeprom_w)
AM_RANGE(0x412000, 0x412001) AM_READWRITE(mccontrol_r,mccontrol_w)
@ -439,20 +439,20 @@ 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_WRITE_LEGACY(K056832_b_word_w) // VSCCS
AM_RANGE(0x41e000, 0x41e007) AM_DEVWRITE("k056832", k056832_device,altK056832_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_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM
AM_RANGE(0x682000, 0x683fff) AM_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read/write (essential)
AM_RANGE(0x700000, 0x703fff) AM_READ_LEGACY(K056832_mw_rom_word_r) // tile ROM readback
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(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)
AM_RANGE(0x402010, 0x40201f) AM_READ_LEGACY(K053247_reg_word_r)
AM_RANGE(0x404000, 0x404007) AM_READ_LEGACY(K053246_reg_word_r)
AM_RANGE(0x40a000, 0x40a01f) AM_READ_LEGACY(K054338_word_r)
AM_RANGE(0x40c000, 0x40c03f) AM_READ_LEGACY(K056832_word_r)
AM_RANGE(0x40c000, 0x40c03f) AM_READ_LEGACY(m_word_r)
AM_RANGE(0x41c000, 0x41c01f) AM_READ_LEGACY(K053252_word_r)
AM_RANGE(0x41e000, 0x41e007) AM_READ_LEGACY(K056832_b_word_r)
AM_RANGE(0x41e000, 0x41e007) AM_READ_LEGACY(altK056832_b_word_r)
#endif
ADDRESS_MAP_END
@ -460,17 +460,17 @@ 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_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM
AM_RANGE(0x412000, 0x413fff) AM_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read/write (essential)
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(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_READ_LEGACY(K056832_mw_rom_word_r)
AM_RANGE(0x440000, 0x443fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r)
AM_RANGE(0x450000, 0x45000f) AM_READ_LEGACY(K055673_rom_word_r)
AM_RANGE(0x450010, 0x45001f) AM_WRITE_LEGACY(K053247_reg_word_w)
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_WRITE_LEGACY(K056832_word_w) // VACSET
AM_RANGE(0x482000, 0x482007) AM_WRITE_LEGACY(K056832_b_word_w) // VSCCS
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(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)
@ -493,8 +493,8 @@ static ADDRESS_MAP_START( dadandrn_map, AS_PROGRAM, 16, mystwarr_state )
#if MW_DEBUG
AM_RANGE(0x430000, 0x430007) AM_READ_LEGACY(K053246_reg_word_r)
AM_RANGE(0x450010, 0x45001f) AM_READ_LEGACY(K053247_reg_word_r)
AM_RANGE(0x480000, 0x48003f) AM_READ_LEGACY(K056832_word_r)
AM_RANGE(0x482000, 0x482007) AM_READ_LEGACY(K056832_b_word_r)
AM_RANGE(0x480000, 0x48003f) AM_READ_LEGACY(m_word_r)
AM_RANGE(0x482000, 0x482007) AM_READ_LEGACY(altK056832_b_word_r)
AM_RANGE(0x488000, 0x4880ff) AM_READ_LEGACY(K055555_word_r)
AM_RANGE(0x48c000, 0x48c01f) AM_READ_LEGACY(K054338_word_r)
#endif
@ -507,17 +507,17 @@ 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_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM
AM_RANGE(0x412000, 0x413fff) AM_READWRITE_LEGACY(K056832_ram_word_r,K056832_ram_word_w) // tilemap RAM mirror read / write (essential)
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(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_READ_LEGACY(K056832_mw_rom_word_r)
AM_RANGE(0x440000, 0x441fff) AM_DEVREAD("k056832", k056832_device, altK056832_mw_rom_word_r)
AM_RANGE(0x450000, 0x45000f) AM_READ_LEGACY(K055673_rom_word_r)
AM_RANGE(0x450010, 0x45001f) AM_WRITE_LEGACY(K053247_reg_word_w)
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_WRITE_LEGACY(K056832_word_w) // VACSET
AM_RANGE(0x482000, 0x482007) AM_WRITE_LEGACY(K056832_b_word_w) // VSCCS
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(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)
@ -540,8 +540,8 @@ static ADDRESS_MAP_START( gaiapols_map, AS_PROGRAM, 16, mystwarr_state )
#if MW_DEBUG
AM_RANGE(0x430000, 0x430007) AM_READ_LEGACY(K053246_reg_word_r)
AM_RANGE(0x450010, 0x45001f) AM_READ_LEGACY(K053247_reg_word_r)
AM_RANGE(0x480000, 0x48003f) AM_READ_LEGACY(K056832_word_r)
AM_RANGE(0x482000, 0x482007) AM_READ_LEGACY(K056832_b_word_r)
AM_RANGE(0x480000, 0x48003f) AM_READ_LEGACY(m_word_r)
AM_RANGE(0x482000, 0x482007) AM_READ_LEGACY(altK056832_b_word_r)
AM_RANGE(0x488000, 0x4880ff) AM_READ_LEGACY(K055555_word_r)
AM_RANGE(0x48c000, 0x48c01f) AM_READ_LEGACY(K054338_word_r)
#endif
@ -999,6 +999,7 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
MCFG_SCREEN_UPDATE_DRIVER(mystwarr_state, screen_update_mystwarr)
MCFG_PALETTE_LENGTH(2048)
MCFG_K056832_ADD_NOINTF("k056832"/*, mystwarr_k056832_intf*/)
MCFG_VIDEO_START_OVERRIDE(mystwarr_state,mystwarr)

View File

@ -11,6 +11,7 @@ public:
m_workram(*this,"workram"),
m_psacram(*this,"psacram"),
m_subpaletteram32(*this,"subpaletteram"),
m_k056832(*this, "k056832"),
m_k053936_0_ctrl(*this,"k053936_0_ctrl",32),
m_k053936_0_linectrl(*this,"k053936_0_line",32),
m_k053936_0_ctrl_16(*this,"k053936_0_ct16",16),
@ -26,6 +27,7 @@ public:
optional_shared_ptr<UINT32> m_workram;
optional_shared_ptr<UINT32> m_psacram;
optional_shared_ptr<UINT32> m_subpaletteram32;
required_device<k056832_device> m_k056832;
optional_shared_ptr<UINT16> m_k053936_0_ctrl;
optional_shared_ptr<UINT16> m_k053936_0_linectrl;
optional_shared_ptr<UINT16> m_k053936_0_ctrl_16;
@ -98,6 +100,14 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(konamigx_hbinterrupt);
optional_device<cpu_device> m_soundcpu;
optional_device<tms57002_device> m_dasp;
void _gxcommoninitnosprites(running_machine &machine);
void _gxcommoninit(running_machine &machine);
DECLARE_READ32_MEMBER( altK056832_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,
int mixerflags, bitmap_ind16 *extra_bitmap, int rushingheroes_hack);
};

View File

@ -8,12 +8,14 @@ public:
: konamigx_state(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_k053252(*this, "k053252"),
m_k056832(*this, "k056832"),
m_gx_workram(*this,"gx_workram"),
m_spriteram(*this,"spriteram")
{ }
required_device<cpu_device> m_maincpu;
required_device<k053252_device> m_k053252;
required_device<k056832_device> m_k056832;
required_shared_ptr<UINT16> m_gx_workram;
optional_shared_ptr<UINT16> m_spriteram;
UINT8 m_mw_irq_control;

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,14 @@
typedef void (*k056832_callback)(running_machine &machine, int layer, int *code, int *color, int *flags);
#define MCFG_K056832_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, K056832, 0) \
MCFG_DEVICE_CONFIG(_interface)
#define MCFG_K056832_ADD_NOINTF(_tag ) \
MCFG_DEVICE_ADD(_tag, K056832, 0)
struct k056832_interface
{
const char *m_gfx_memory_region;
@ -35,13 +43,22 @@ struct k056832_interface
#define K056832_BPP_8TASMAN 6
#define K056832_DRAW_FLAG_MIRROR 0x00800000
#define K056382_DRAW_FLAG_FORCE_XYSCROLL 0x00800000
class k056832_device : public device_t,
public k056832_interface
{
public:
k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k056832_device() {}
~k056832_device()
{
m_k055555_use = 0;
altK056832_djmain_hack= 0;
altK056832_gfxnum = 0;
altK056832_bpp = 0;
altK056832_memory_region = 0;
}
void SetExtLinescroll(); /* Lethal Enforcers */
@ -117,6 +134,14 @@ private:
int m_num_gfx_banks; // depends on size of graphics ROMs
int m_cur_gfx_banks; // cached info for K056832_regs[0x1a]
// ROM readback involves reading 2 halves of a word
// from the same location in a row. Reading the
// RAM window resets this state so you get the first half.
@ -146,6 +171,19 @@ private:
int m_use_ext_linescroll;
int m_uses_tile_banks, m_cur_tile_bank;
// todo: collapse these into above
int m_k055555_use;
int altK056832_djmain_hack;
int altK056832_gfxnum; // graphics element index for unpacked tiles
const char *altK056832_memory_region; // memory region for tile gfx data
int altK056832_bpp;
device_t *m_k055555; /* used to choose colorbase */
void get_tile_info( tile_data &tileinfo, int tile_index, int pageIndex );
@ -180,6 +218,62 @@ private:
template<class _BitmapClass>
void tilemap_draw_common(_BitmapClass &bitmap, const rectangle &cliprect, int layer, UINT32 flags, UINT32 priority);
public:
void altK056832_vh_start(running_machine &machine, const char *gfx_memory_region, int bpp, int big,
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 );
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 altK056832_get_tile_info( tile_data &tileinfo, int tile_index, int pageIndex );
int altK056832_update_linemap(running_machine &machine, bitmap_rgb32 &bitmap, int page, int flags);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info0);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info1);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info2);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info3);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info4);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info5);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info6);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info7);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info8);
TILE_GET_INFO_MEMBER(altK056832_get_tile_info9);
TILE_GET_INFO_MEMBER(altK056832_get_tile_infoa);
TILE_GET_INFO_MEMBER(altK056832_get_tile_infob);
TILE_GET_INFO_MEMBER(altK056832_get_tile_infoc);
TILE_GET_INFO_MEMBER(altK056832_get_tile_infod);
TILE_GET_INFO_MEMBER(altK056832_get_tile_infoe);
TILE_GET_INFO_MEMBER(altK056832_get_tile_infof);
};
extern const device_type K056832;
@ -187,38 +281,7 @@ extern const device_type K056832;
#define K056382_DRAW_FLAG_FORCE_XYSCROLL 0x00800000
void K056832_vh_start(running_machine &machine, const char *gfx_memory_region, int bpp, int big,
int (*scrolld)[4][2],
void (*callback)(running_machine &machine, int layer, int *code, int *color, int *flags),
int djmain_hack);
DECLARE_READ16_HANDLER( K056832_ram_word_r );
DECLARE_WRITE16_HANDLER( K056832_ram_word_w );
DECLARE_READ32_HANDLER( K056832_5bpp_rom_long_r );
DECLARE_READ32_HANDLER( K056832_6bpp_rom_long_r );
DECLARE_READ16_HANDLER( K056832_mw_rom_word_r );
DECLARE_WRITE16_HANDLER( K056832_word_w ); // "VRAM" registers
DECLARE_WRITE16_HANDLER( K056832_b_word_w );
void K056832_mark_plane_dirty(int num);
void K056832_MarkAllTilemapsDirty(void);
void K056832_tilemap_draw(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, int num, UINT32 flags, UINT32 priority);
int K056832_get_LayerAssociation(void);
void K056832_set_LayerOffset(int layer, int offsx, int offsy);
void K056832_set_UpdateMode(int mode);
DECLARE_READ32_HANDLER( K056832_ram_long_r );
DECLARE_WRITE32_HANDLER( K056832_ram_long_w );
DECLARE_WRITE32_HANDLER( K056832_long_w );
DECLARE_WRITE32_HANDLER( K056832_b_long_w );
/* bit depths for the 56832 */
#define K056832_BPP_4 0
#define K056832_BPP_5 1
#define K056832_BPP_6 2
#define K056832_BPP_8 3
#define K056832_BPP_4dj 4
#define K056832_BPP_8LE 5
#define K056832_BPP_8TASMAN 6
#endif

View File

@ -1165,7 +1165,7 @@ void konamigx_objdma(void)
if (gx_objdma && gx_spriteram && K053247_ram) memcpy(gx_spriteram, K053247_ram, 0x1000);
}
void konamigx_mixer(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect,
void konamigx_state::konamigx_mixer(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect,
tilemap_t *sub1, int sub1flags,
tilemap_t *sub2, int sub2flags,
int mixerflags, bitmap_ind16 *extra_bitmap, int rushingheroes_hack)
@ -1552,7 +1552,7 @@ void konamigx_mixer(running_machine &machine, bitmap_rgb32 &bitmap, const rectan
if (mixerflags & 1<<(code+12)) k |= K056382_DRAW_FLAG_FORCE_XYSCROLL;
K056832_tilemap_draw(machine, bitmap, cliprect, code, k, 0);
m_k056832->m_tilemap_draw(machine, bitmap, cliprect, code, k, 0);
}
continue;
case -2:
@ -2016,7 +2016,7 @@ static void konamigx_alpha_tile_callback(running_machine &machine, int layer, in
> so, well, the top bits of the code are suspicious
*/
static void _gxcommoninitnosprites(running_machine &machine)
void konamigx_state::_gxcommoninitnosprites(running_machine &machine)
{
int i;
@ -2044,16 +2044,16 @@ static void _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.
K056832_set_LayerOffset(0, -2, 0);
K056832_set_LayerOffset(1, 0, 0);
K056832_set_LayerOffset(2, 2, 0);
K056832_set_LayerOffset(3, 3, 0);
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);
konamigx_has_dual_screen = 0;
konamigx_current_frame = 0;
}
static void _gxcommoninit(running_machine &machine)
void konamigx_state::_gxcommoninit(running_machine &machine)
{
// (+ve values move objects to the right and -ve values move objects to the left)
K055673_vh_start(machine, "gfx2", K055673_LAYOUT_GX, -26, -23, konamigx_type2_sprite_callback);
@ -2069,7 +2069,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
else
game_tile_callback = konamigx_type2_tile_callback;
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game_tile_callback, 0);
_gxcommoninit(machine());
@ -2078,7 +2078,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
if (!strcmp(machine().system().name,"tbyahhoo"))
{
K056832_set_UpdateMode(1);
m_k056832->altK056832_set_UpdateMode(1);
gx_tilemode = 1;
} else
@ -2106,7 +2106,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
VIDEO_START_MEMBER(konamigx_state,winspike)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_alpha_tile_callback, 2);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_alpha_tile_callback, 2);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -53, -23, konamigx_type2_sprite_callback);
_gxcommoninitnosprites(machine());
@ -2114,20 +2114,20 @@ VIDEO_START_MEMBER(konamigx_state,winspike)
VIDEO_START_MEMBER(konamigx_state,dragoonj)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 1, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 1, NULL, konamigx_type2_tile_callback, 0);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_RNG, -53, -23, konamigx_dragoonj_sprite_callback);
_gxcommoninitnosprites(machine());
K056832_set_LayerOffset(0, -2+1, 0);
K056832_set_LayerOffset(1, 0+1, 0);
K056832_set_LayerOffset(2, 2+1, 0);
K056832_set_LayerOffset(3, 3+1, 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);
}
VIDEO_START_MEMBER(konamigx_state,le2)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_8, 1, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 1, NULL, konamigx_type2_tile_callback, 0);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -46, -23, konamigx_le2_sprite_callback);
_gxcommoninitnosprites(machine());
@ -2140,7 +2140,7 @@ VIDEO_START_MEMBER(konamigx_state,le2)
VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 0);
_gxcommoninit(machine());
@ -2156,7 +2156,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type3)
int width = machine().primary_screen->width();
int height = machine().primary_screen->height();
K056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 1);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 1);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback);
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -2181,10 +2181,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type3)
// K053936GP_set_offset(0, -30, -1);
K053936_set_offset(0, -30, +1);
K056832_set_LayerOffset(0, -52, 0);
K056832_set_LayerOffset(1, -48, 0);
K056832_set_LayerOffset(2, -48, 0);
K056832_set_LayerOffset(3, -48, 0);
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);
konamigx_has_dual_screen = 1;
konamigx_palformat = 1;
@ -2195,7 +2195,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4)
int width = machine().primary_screen->width();
int height = machine().primary_screen->height();
K056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 0);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -79, -24, konamigx_type2_sprite_callback); // -23 looks better in intro
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -2207,10 +2207,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4)
gx_rozenable = 0;
gx_specialrozenable = 3;
K056832_set_LayerOffset(0, -27, 0);
K056832_set_LayerOffset(1, -25, 0);
K056832_set_LayerOffset(2, -24, 0);
K056832_set_LayerOffset(3, -22, 0);
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);
K053936_wraparound_enable(0, 0);
K053936GP_set_offset(0, -36, 1);
@ -2226,7 +2226,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_vsn)
int width = machine().primary_screen->width();
int height = machine().primary_screen->height();
K056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 2); // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 2); // set djmain_hack to 2 to kill layer association or half the tilemaps vanish on screen 0
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback);
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -2238,10 +2238,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_vsn)
gx_rozenable = 0;
gx_specialrozenable = 3;
K056832_set_LayerOffset(0, -52, 0);
K056832_set_LayerOffset(1, -48, 0);
K056832_set_LayerOffset(2, -48, 0);
K056832_set_LayerOffset(3, -48, 0);
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);
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);
@ -2256,7 +2256,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2)
int width = machine().primary_screen->width();
int height = machine().primary_screen->height();
K056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_8, 0, NULL, konamigx_type2_tile_callback, 0);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -81, -23, konamigx_type2_sprite_callback);
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
@ -2269,10 +2269,10 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2)
gx_specialrozenable = 3;
K056832_set_LayerOffset(0, -29, -1);
K056832_set_LayerOffset(1, -27, -1);
K056832_set_LayerOffset(2, -26, -1);
K056832_set_LayerOffset(3, -24, -1);
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);
K053936_wraparound_enable(0, 0);
@ -2287,7 +2287,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2)
VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_6, 1, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 1, NULL, konamigx_type2_tile_callback, 0);
if (!strcmp(machine().system().name,"salmndr2") || !strcmp(machine().system().name,"salmndr2a"))
{
@ -2303,15 +2303,15 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2)
VIDEO_START_MEMBER(konamigx_state,opengolf)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, konamigx_type2_tile_callback, 0);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -53, -23, konamigx_type2_sprite_callback);
_gxcommoninitnosprites(machine());
K056832_set_LayerOffset(0, -2+1, 0);
K056832_set_LayerOffset(1, 0+1, 0);
K056832_set_LayerOffset(2, 2+1, 0);
K056832_set_LayerOffset(3, 3+1, 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);
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);
@ -2341,15 +2341,15 @@ VIDEO_START_MEMBER(konamigx_state,opengolf)
VIDEO_START_MEMBER(konamigx_state,racinfrc)
{
K056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_6, 0, NULL, konamigx_type2_tile_callback, 0);
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX, -53, -23, konamigx_type2_sprite_callback);
_gxcommoninitnosprites(machine());
K056832_set_LayerOffset(0, -2+1, 0);
K056832_set_LayerOffset(1, 0+1, 0);
K056832_set_LayerOffset(2, 2+1, 0);
K056832_set_LayerOffset(3, 3+1, 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);
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 = K056832_get_LayerAssociation();
unchained = m_k056832->altK056832_get_LayerAssociation();
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)
K056832_mark_plane_dirty(i);
m_k056832->altK056832_mark_plane_dirty(i);
else
dirty = 1;
}
@ -2409,7 +2409,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
}
else
{
// K056832 does all the tracking in mode 1 for accuracy (Twinbee needs this)
// altK056832 does all the tracking in mode 1 for accuracy (Twinbee needs this)
}
// sub2 is PSAC colorbase on GX
@ -2428,7 +2428,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
}
}
if (dirty) K056832_MarkAllTilemapsDirty();
if (dirty) m_k056832->altK056832_MarkAllTilemapsDirty();
// Type-1
if (gx_specialrozenable == 1)

View File

@ -822,10 +822,6 @@ extern const device_type K037122;
#define MCFG_K051733_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, K051733, 0)
#define MCFG_K056832_ADD(_tag, _interface) \
MCFG_DEVICE_ADD(_tag, K056832, 0) \
MCFG_DEVICE_CONFIG(_interface)
#define MCFG_K055555_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, K055555, 0)

View File

@ -167,7 +167,7 @@ VIDEO_START_MEMBER(mystwarr_state,gaiapols)
m_gametype = 0;
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
mystwarr_decode_tiles(machine());
@ -175,10 +175,10 @@ VIDEO_START_MEMBER(mystwarr_state,gaiapols)
konamigx_mixer_init(machine(), 0);
K056832_set_LayerOffset(0, -2+2-1, 0-1);
K056832_set_LayerOffset(1, 0+2, 0);
K056832_set_LayerOffset(2, 2+2, 0);
K056832_set_LayerOffset(3, 3+2, 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);
K053936_wraparound_enable(0, 1);
K053936GP_set_offset(0, -10, 0); // floor tiles in demo loop2 (Elaine vs. boss)
@ -207,7 +207,7 @@ VIDEO_START_MEMBER(mystwarr_state,dadandrn)
m_gametype = 1;
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game5bpp_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game5bpp_tile_callback, 0);
mystwarr_decode_tiles(machine());
@ -217,10 +217,10 @@ VIDEO_START_MEMBER(mystwarr_state,dadandrn)
konamigx_mixer_primode(1);
K056832_set_LayerOffset(0, -2+4, 0);
K056832_set_LayerOffset(1, 0+4, 0);
K056832_set_LayerOffset(2, 2+4, 0);
K056832_set_LayerOffset(3, 3+4, 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);
K053936_wraparound_enable(0, 1);
K053936GP_set_offset(0, -8, 0); // Brainy's laser
@ -236,7 +236,7 @@ VIDEO_START_MEMBER(mystwarr_state,mystwarr)
m_gametype = 0;
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, mystwarr_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, mystwarr_tile_callback, 0);
mystwarr_decode_tiles(machine());
@ -244,10 +244,10 @@ VIDEO_START_MEMBER(mystwarr_state,mystwarr)
konamigx_mixer_init(machine(), 0);
K056832_set_LayerOffset(0, -2-3, 0);
K056832_set_LayerOffset(1, 0-3, 0);
K056832_set_LayerOffset(2, 2-3, 0);
K056832_set_LayerOffset(3, 3-3, 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_cbparam = 0;
}
@ -259,7 +259,7 @@ VIDEO_START_MEMBER(mystwarr_state,metamrph)
K055555_vh_start(machine());
K054338_vh_start(machine());
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
mystwarr_decode_tiles(machine());
@ -268,10 +268,10 @@ VIDEO_START_MEMBER(mystwarr_state,metamrph)
konamigx_mixer_init(machine(), 0);
// other reference, floor at first boss
K056832_set_LayerOffset(0, -2+4, 0); // text
K056832_set_LayerOffset(1, 0+4, 0); // attract sea
K056832_set_LayerOffset(2, 2+4, 0); // attract red monster in background of sea
K056832_set_LayerOffset(3, 3+4, 0); // attract sky background to sea
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
}
VIDEO_START_MEMBER(mystwarr_state,viostorm)
@ -281,7 +281,7 @@ VIDEO_START_MEMBER(mystwarr_state,viostorm)
K055555_vh_start(machine());
K054338_vh_start(machine());
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game4bpp_tile_callback, 0);
mystwarr_decode_tiles(machine());
@ -289,10 +289,10 @@ VIDEO_START_MEMBER(mystwarr_state,viostorm)
konamigx_mixer_init(machine(), 0);
K056832_set_LayerOffset(0, -2+1, 0);
K056832_set_LayerOffset(1, 0+1, 0);
K056832_set_LayerOffset(2, 2+1, 0);
K056832_set_LayerOffset(3, 3+1, 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);
}
VIDEO_START_MEMBER(mystwarr_state,martchmp)
@ -302,7 +302,7 @@ VIDEO_START_MEMBER(mystwarr_state,martchmp)
K055555_vh_start(machine());
K054338_vh_start(machine());
K056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game5bpp_tile_callback, 0);
m_k056832->altK056832_vh_start(machine(), "gfx1", K056832_BPP_5, 0, NULL, game5bpp_tile_callback, 0);
mystwarr_decode_tiles(machine());
@ -310,10 +310,10 @@ VIDEO_START_MEMBER(mystwarr_state,martchmp)
konamigx_mixer_init(machine(), 0);
K056832_set_LayerOffset(0, -2-4, 0);
K056832_set_LayerOffset(1, 0-4, 0);
K056832_set_LayerOffset(2, 2-4, 0);
K056832_set_LayerOffset(3, 3-4, 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);
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] ) K056832_mark_plane_dirty(i);
if( old != m_layer_colorbase[i] ) m_k056832->altK056832_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]) K056832_mark_plane_dirty(i);
if (old != m_layer_colorbase[i]) m_k056832->altK056832_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]) K056832_mark_plane_dirty(i);
if (old != m_layer_colorbase[i]) m_k056832->altK056832_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 (K056832_get_LayerAssociation())
if (m_k056832->altK056832_get_LayerAssociation())
{
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;
K056832_mark_plane_dirty(i);
m_k056832->altK056832_mark_plane_dirty(i);
}
}
}
@ -521,7 +521,7 @@ UINT32 mystwarr_state::screen_update_dadandrn(screen_device &screen, bitmap_rgb3
dirty = 1;
}
}
if (dirty) K056832_MarkAllTilemapsDirty();
if (dirty) m_k056832->altK056832_MarkAllTilemapsDirty();
}