mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
more konami collapse (nw)
This commit is contained in:
parent
c96889730f
commit
fbfd4e457d
@ -517,7 +517,7 @@ WRITE32_MEMBER(konamigx_state::control_w)
|
||||
m_soundcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
|
||||
}
|
||||
|
||||
K053246_set_OBJCHA_line((data&0x100000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_k055673->alt_K053246_set_OBJCHA_line((data&0x100000) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
konamigx_wrport2 = (data>>16)&0xff;
|
||||
}
|
||||
@ -618,13 +618,13 @@ TIMER_CALLBACK_MEMBER(konamigx_state::dmaend_callback)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmastart_callback(int data)
|
||||
void konamigx_state::dmastart_callback(int data)
|
||||
{
|
||||
// raise the DMA busy flag
|
||||
gx_rdport1_3 |= 2;
|
||||
|
||||
// begin transfer if DMAEN(bit4 of OBJSET1) is set (see p.48)
|
||||
if (K053246_read_register(5) & 0x10)
|
||||
if (m_k055673->alt_K053246_read_register(5) & 0x10)
|
||||
{
|
||||
// disabled by default since it doesn't work too well in MAME
|
||||
konamigx_objdma();
|
||||
@ -907,12 +907,12 @@ READ32_MEMBER(konamigx_state::le2_gun_V_r)
|
||||
|
||||
READ32_MEMBER(konamigx_state::gx5bppspr_r)
|
||||
{
|
||||
return (K055673_rom_word_r(space, offset*2+1, 0xffff) | K055673_rom_word_r(space, offset*2, 0xffff)<<16);
|
||||
return (m_k055673->alt_K055673_rom_word_r(space, offset*2+1, 0xffff) | m_k055673->alt_K055673_rom_word_r(space, offset*2, 0xffff)<<16);
|
||||
}
|
||||
|
||||
READ32_MEMBER(konamigx_state::gx6bppspr_r)
|
||||
{
|
||||
return (K055673_GX6bpp_rom_word_r(space, offset*2+1, 0xffff) | K055673_GX6bpp_rom_word_r(space, offset*2, 0xffff)<<16);
|
||||
return (m_k055673->alt_K055673_GX6bpp_rom_word_r(space, offset*2+1, 0xffff) | m_k055673->alt_K055673_GX6bpp_rom_word_r(space, offset*2, 0xffff)<<16);
|
||||
}
|
||||
|
||||
READ32_MEMBER(konamigx_state::type1_roz_r1)
|
||||
@ -1153,12 +1153,12 @@ static ADDRESS_MAP_START( gx_base_memmap, AS_PROGRAM, 32, konamigx_state )
|
||||
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, k_5bpp_rom_long_r)
|
||||
AM_RANGE(0xd20000, 0xd20fff) AM_READWRITE_LEGACY(K053247_long_r, K053247_long_w)
|
||||
AM_RANGE(0xd20000, 0xd20fff) AM_DEVREADWRITE("k055673", k055673_device, alt_K053247_long_r, alt_K053247_long_w)
|
||||
AM_RANGE(0xd21000, 0xd23fff) AM_RAM
|
||||
AM_RANGE(0xd40000, 0xd4003f) AM_DEVWRITE("k056832", k056832_device, 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)
|
||||
AM_RANGE(0xd48000, 0xd48007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_long_w)
|
||||
AM_RANGE(0xd4a010, 0xd4a01f) AM_DEVWRITE("k055673", k055673_device, alt_K053247_reg_long_w)
|
||||
AM_RANGE(0xd4c000, 0xd4c01f) AM_READWRITE(ccu_r, ccu_w)
|
||||
AM_RANGE(0xd4e000, 0xd4e01f) AM_WRITENOP
|
||||
AM_RANGE(0xd50000, 0xd500ff) AM_DEVWRITE("k055555", k055555_device, K055555_long_w)
|
||||
@ -1796,6 +1796,7 @@ static MACHINE_CONFIG_START( konamigx, konamigx_state )
|
||||
|
||||
MCFG_K056832_ADD_NOINTF("k056832"/*, konamigx_k056832_intf*/)
|
||||
MCFG_K055555_ADD("k055555")
|
||||
MCFG_K055673_ADD_NOINTF("k055673")
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(konamigx_state,konamigx_5bpp)
|
||||
|
||||
|
@ -530,7 +530,7 @@ static MACHINE_CONFIG_START( moo, moo_state )
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(moo_state,moo)
|
||||
|
||||
MCFG_K053247_ADD("k053246", moo_k053247_intf)
|
||||
MCFG_K053246_ADD("k053246", moo_k053247_intf)
|
||||
MCFG_K056832_ADD("k056832", moo_k056832_intf)
|
||||
MCFG_K053251_ADD("k053251")
|
||||
MCFG_K054338_ADD("k054338", moo_k054338_intf)
|
||||
@ -573,7 +573,7 @@ static MACHINE_CONFIG_START( moobl, moo_state )
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(moo_state,moo)
|
||||
|
||||
MCFG_K053247_ADD("k053246", moo_k053247_intf)
|
||||
MCFG_K053246_ADD("k053246", moo_k053247_intf)
|
||||
MCFG_K056832_ADD("k056832", moo_k056832_intf)
|
||||
MCFG_K053251_ADD("k053251")
|
||||
MCFG_K054338_ADD("k054338", moo_k054338_intf)
|
||||
@ -594,7 +594,7 @@ static MACHINE_CONFIG_DERIVED( bucky, moo )
|
||||
MCFG_K054000_ADD("k054000")
|
||||
|
||||
MCFG_DEVICE_REMOVE("k053246")
|
||||
MCFG_K053247_ADD("k053246", bucky_k053247_intf) // diff x offset
|
||||
MCFG_K053246_ADD("k053246", bucky_k053247_intf) // diff x offset
|
||||
|
||||
/* video hardware */
|
||||
MCFG_PALETTE_LENGTH(4096)
|
||||
|
@ -129,7 +129,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::metamrph_interrupt)
|
||||
m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
|
||||
if(scanline == 248)
|
||||
if (K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE);
|
||||
if (m_k055673->alt_K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_5, HOLD_LINE);
|
||||
}
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::mchamp_interrupt)
|
||||
@ -140,7 +140,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mystwarr_state::mchamp_interrupt)
|
||||
|
||||
if(scanline == 247)
|
||||
{
|
||||
if (K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
if (m_k055673->alt_K053246_is_IRQ_enabled()) m_maincpu->set_input_line(M68K_IRQ_6, HOLD_LINE);
|
||||
}
|
||||
|
||||
if(scanline == 23)
|
||||
@ -222,7 +222,7 @@ READ16_MEMBER(mystwarr_state::K053247_scattered_word_r)
|
||||
else
|
||||
{
|
||||
offset = (offset & 0x0007) | ((offset & 0x7f80) >> 4);
|
||||
return K053247_word_r(space,offset,mem_mask);
|
||||
return m_k055673->alt_K053247_word_r(space,offset,mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ WRITE16_MEMBER(mystwarr_state::K053247_scattered_word_w)
|
||||
{
|
||||
offset = (offset & 0x0007) | ((offset & 0x7f80) >> 4);
|
||||
|
||||
K053247_word_w(space,offset,data,mem_mask);
|
||||
m_k055673->alt_K053247_word_w(space,offset,data,mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -248,9 +248,9 @@ static ADDRESS_MAP_START( mystwarr_map, AS_PROGRAM, 16, mystwarr_state )
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("gx_workram")
|
||||
AM_RANGE(0x400000, 0x40ffff) AM_READWRITE(K053247_scattered_word_r,K053247_scattered_word_w) AM_SHARE("spriteram")
|
||||
AM_RANGE(0x480000, 0x4800ff) AM_DEVWRITE("k055555", k055555_device, K055555_word_w)
|
||||
AM_RANGE(0x482000, 0x48200f) AM_READ_LEGACY(K055673_rom_word_r)
|
||||
AM_RANGE(0x482010, 0x48201f) AM_WRITE_LEGACY(K053247_reg_word_w)
|
||||
AM_RANGE(0x484000, 0x484007) AM_WRITE_LEGACY(K053246_word_w)
|
||||
AM_RANGE(0x482000, 0x48200f) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x482010, 0x48201f) AM_DEVWRITE("k055673", k055673_device,alt_K053247_reg_word_w)
|
||||
AM_RANGE(0x484000, 0x484007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x48a000, 0x48a01f) AM_WRITE_LEGACY(K054338_word_w)
|
||||
AM_RANGE(0x48c000, 0x48c03f) AM_DEVWRITE("k056832", k056832_device,word_w)
|
||||
AM_RANGE(0x490000, 0x490001) AM_WRITE(mweeprom_w)
|
||||
@ -283,11 +283,11 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( metamrph_map, AS_PROGRAM, 16, mystwarr_state )
|
||||
AM_RANGE(0x000000, 0x1fffff) AM_ROM // main program
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("gx_workram")
|
||||
AM_RANGE(0x210000, 0x210fff) AM_READWRITE_LEGACY(K053247_word_r,K053247_word_w)
|
||||
AM_RANGE(0x210000, 0x210fff) AM_DEVREADWRITE("k055673", k055673_device,alt_K053247_word_r,alt_K053247_word_w)
|
||||
AM_RANGE(0x211000, 0x21ffff) AM_RAM
|
||||
AM_RANGE(0x240000, 0x240007) AM_WRITE_LEGACY(K053246_word_w)
|
||||
AM_RANGE(0x244000, 0x24400f) AM_READ_LEGACY(K055673_rom_word_r)
|
||||
AM_RANGE(0x244010, 0x24401f) AM_WRITE_LEGACY(K053247_reg_word_w)
|
||||
AM_RANGE(0x240000, 0x240007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x244000, 0x24400f) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x244010, 0x24401f) AM_DEVWRITE("k055673", k055673_device,alt_K053247_reg_word_w)
|
||||
AM_RANGE(0x24c000, 0x24ffff) AM_DEVREADWRITE("k053250_1", k053250_device, ram_r, ram_w)
|
||||
AM_RANGE(0x250000, 0x25000f) AM_DEVREADWRITE("k053250_1", k053250_device, reg_r, reg_w)
|
||||
AM_RANGE(0x254000, 0x25401f) AM_WRITE_LEGACY(K054338_word_w)
|
||||
@ -325,11 +325,11 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( viostorm_map, AS_PROGRAM, 16, mystwarr_state )
|
||||
AM_RANGE(0x000000, 0x1fffff) AM_ROM // main program
|
||||
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("gx_workram")
|
||||
AM_RANGE(0x210000, 0x210fff) AM_READWRITE_LEGACY(K053247_word_r,K053247_word_w)
|
||||
AM_RANGE(0x210000, 0x210fff) AM_DEVREADWRITE("k055673", k055673_device, alt_K053247_word_r,alt_K053247_word_w)
|
||||
AM_RANGE(0x211000, 0x21ffff) AM_RAM
|
||||
AM_RANGE(0x240000, 0x240007) AM_WRITE_LEGACY(K053246_word_w)
|
||||
AM_RANGE(0x244000, 0x24400f) AM_READ_LEGACY(K055673_rom_word_r)
|
||||
AM_RANGE(0x244010, 0x24401f) AM_WRITE_LEGACY(K053247_reg_word_w)
|
||||
AM_RANGE(0x240000, 0x240007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x244000, 0x24400f) AM_DEVREAD("k055673", k055673_device, alt_K055673_rom_word_r)
|
||||
AM_RANGE(0x244010, 0x24401f) AM_DEVWRITE("k055673", k055673_device,alt_K053247_reg_word_w)
|
||||
AM_RANGE(0x24c000, 0x24ffff) AM_RAM // K053250 ram
|
||||
AM_RANGE(0x250000, 0x25000f) AM_RAM // K053250 reg
|
||||
AM_RANGE(0x254000, 0x25401f) AM_WRITE_LEGACY(K054338_word_w)
|
||||
@ -372,7 +372,7 @@ READ16_MEMBER(mystwarr_state::K053247_martchmp_word_r)
|
||||
else
|
||||
{
|
||||
offset = (offset & 0x0007) | ((offset & 0x1fe0) >> 2);
|
||||
return K053247_word_r(space,offset,mem_mask);
|
||||
return m_k055673->alt_K053247_word_r(space,offset,mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,7 +386,7 @@ WRITE16_MEMBER(mystwarr_state::K053247_martchmp_word_w)
|
||||
{
|
||||
offset = (offset & 0x0007) | ((offset & 0x1fe0) >> 2);
|
||||
|
||||
K053247_word_w(space,offset,data,mem_mask);
|
||||
m_k055673->alt_K053247_word_w(space,offset,data,mem_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@ -404,7 +404,7 @@ WRITE16_MEMBER(mystwarr_state::mccontrol_w)
|
||||
// bit 1 = IRQ enable
|
||||
// bit 2 = OBJCHA
|
||||
|
||||
K053246_set_OBJCHA_line((data&0x04) ? ASSERT_LINE : CLEAR_LINE);
|
||||
m_k055673->alt_K053246_set_OBJCHA_line((data&0x04) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
// if (data & 0xf8) logerror("Unk write %x to mccontrol\n", data);
|
||||
|
||||
@ -420,9 +420,9 @@ static ADDRESS_MAP_START( martchmp_map, AS_PROGRAM, 16, mystwarr_state )
|
||||
AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_SHARE("gx_workram") // work RAM
|
||||
AM_RANGE(0x300000, 0x3fffff) AM_ROM // data ROM
|
||||
AM_RANGE(0x400000, 0x4000ff) AM_DEVWRITE("k055555", k055555_device, K055555_word_w) // PCU2
|
||||
AM_RANGE(0x402000, 0x40200f) AM_READ_LEGACY(K055673_rom_word_r) // sprite ROM readback
|
||||
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(0x402000, 0x40200f) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w) // sprite ROM readback
|
||||
AM_RANGE(0x402010, 0x40201f) AM_DEVWRITE("k055673", k055673_device,alt_K053247_reg_word_w) // OBJSET2
|
||||
AM_RANGE(0x404000, 0x404007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w) // OBJSET1
|
||||
AM_RANGE(0x40a000, 0x40a01f) AM_WRITE_LEGACY(K054338_word_w) // CLTC
|
||||
AM_RANGE(0x40c000, 0x40c03f) AM_DEVWRITE("k056832", k056832_device,word_w) // VACSET
|
||||
AM_RANGE(0x40e000, 0x40e03f) AM_WRITE(K053990_martchmp_word_w) // protection
|
||||
@ -462,10 +462,10 @@ static ADDRESS_MAP_START( dadandrn_map, AS_PROGRAM, 16, mystwarr_state )
|
||||
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(0x430000, 0x430007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x440000, 0x443fff) AM_DEVREAD("k056832", k056832_device, 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(0x450000, 0x45000f) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x450010, 0x45001f) AM_DEVWRITE("k055673", k055673_device,alt_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_DEVWRITE("k056832", k056832_device,word_w) // VACSET
|
||||
@ -509,10 +509,10 @@ static ADDRESS_MAP_START( gaiapols_map, AS_PROGRAM, 16, mystwarr_state )
|
||||
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(0x430000, 0x430007) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x440000, 0x441fff) AM_DEVREAD("k056832", k056832_device, 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(0x450000, 0x45000f) AM_DEVWRITE("k055673", k055673_device, alt_K053246_word_w)
|
||||
AM_RANGE(0x450010, 0x45001f) AM_DEVWRITE("k055673", k055673_device,alt_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_DEVWRITE("k056832", k056832_device,word_w) // VACSET
|
||||
@ -1000,6 +1000,7 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state )
|
||||
MCFG_PALETTE_LENGTH(2048)
|
||||
MCFG_K056832_ADD_NOINTF("k056832"/*, mystwarr_k056832_intf*/)
|
||||
MCFG_K055555_ADD("k055555")
|
||||
MCFG_K055673_ADD_NOINTF("k055673")
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(mystwarr_state,mystwarr)
|
||||
|
||||
|
@ -611,8 +611,9 @@ static MACHINE_CONFIG_START( kongambl, kongambl_state )
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(kongambl_state,kongambl)
|
||||
|
||||
MCFG_K053247_ADD("k053246", k053247_intf)
|
||||
MCFG_K053246_ADD("k053246", k053247_intf)
|
||||
MCFG_K055555_ADD("k055555")
|
||||
MCFG_K055673_ADD_NOINTF("k055673")
|
||||
|
||||
MCFG_GFXDECODE(tasman)
|
||||
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
m_workram(*this,"workram"),
|
||||
m_psacram(*this,"psacram"),
|
||||
m_subpaletteram32(*this,"subpaletteram"),
|
||||
m_k055673(*this, "k055673"),
|
||||
m_k055555(*this, "k055555"),
|
||||
m_k056832(*this, "k056832"),
|
||||
m_k053936_0_ctrl(*this,"k053936_0_ctrl",32),
|
||||
@ -32,6 +33,7 @@ public:
|
||||
optional_shared_ptr<UINT32> m_workram;
|
||||
optional_shared_ptr<UINT32> m_psacram;
|
||||
optional_shared_ptr<UINT32> m_subpaletteram32;
|
||||
required_device<k055673_device> m_k055673;
|
||||
required_device<k055555_device> m_k055555;
|
||||
required_device<k056832_device> m_k056832;
|
||||
optional_shared_ptr<UINT16> m_k053936_0_ctrl;
|
||||
@ -118,6 +120,10 @@ public:
|
||||
void konamigx_esc_alert(UINT32 *srcbase, int srcoffs, int count, int mode);
|
||||
void konamigx_precache_registers(void);
|
||||
|
||||
void dmastart_callback(int data);
|
||||
|
||||
void konamigx_mixer_init(running_machine &machine, int objdma);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "machine/k053252.h"
|
||||
#include "video/k055555.h"
|
||||
#include "video/k054000.h"
|
||||
#include "video/k053246_k053247_k055673.h"
|
||||
|
||||
class mystwarr_state : public konamigx_state
|
||||
{
|
||||
@ -11,6 +12,7 @@ public:
|
||||
m_maincpu(*this,"maincpu"),
|
||||
m_k053252(*this, "k053252"),
|
||||
m_k056832(*this, "k056832"),
|
||||
m_k055673(*this, "k055673"),
|
||||
m_gx_workram(*this,"gx_workram"),
|
||||
m_spriteram(*this,"spriteram")
|
||||
{ }
|
||||
@ -18,6 +20,7 @@ public:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<k053252_device> m_k053252;
|
||||
required_device<k056832_device> m_k056832;
|
||||
required_device<k055673_device> m_k055673;
|
||||
required_shared_ptr<UINT16> m_gx_workram;
|
||||
optional_shared_ptr<UINT16> m_spriteram;
|
||||
UINT8 m_mw_irq_control;
|
||||
|
@ -75,7 +75,7 @@ void k053247_device::clear_all()
|
||||
|
||||
m_intf_screen = 0;
|
||||
m_intf_gfx_memory_region = 0;
|
||||
m_intf_gfx_num = 0;
|
||||
m_intf_gfx_num = -1;
|
||||
m_intf_plane_order = 0;
|
||||
m_intf_dx = m_intf_dy = 0;
|
||||
m_intf_deinterleave = 0;
|
||||
@ -769,6 +769,11 @@ k055673_device::k055673_device(const machine_config &mconfig, const char *tag, d
|
||||
|
||||
void k055673_device::device_start()
|
||||
{
|
||||
|
||||
/* early out for the non-interface cases for now */
|
||||
if (m_intf_gfx_num == -1)
|
||||
return;
|
||||
|
||||
UINT32 total;
|
||||
UINT8 *s1, *s2, *d;
|
||||
long i;
|
||||
@ -1076,31 +1081,6 @@ static void decode_gfx(running_machine &machine, int gfx_index, UINT8 *data, UIN
|
||||
machine.gfx[gfx_index] = auto_alloc(machine, gfx_element(machine, gl, data, machine.total_colors() >> bpp, 0));
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* 05324x Family Sprite Generators */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
static int K05324x_z_rejection;
|
||||
|
||||
/*
|
||||
In a K053247+K055555 setup objects with Z-code 0x00 should be ignored
|
||||
when PRFLIP is cleared, while objects with Z-code 0xff should be
|
||||
ignored when PRFLIP is set.
|
||||
|
||||
These behaviors can also be seen in older K053245(6)+K053251 setups.
|
||||
Bucky'O Hare, The Simpsons and Sunset Riders rely on their implications
|
||||
to prepare and retire sprites. They probably apply to many other Konami
|
||||
games but it's hard to tell because most artifacts have been filtered
|
||||
by exclusion sort.
|
||||
|
||||
A driver may call K05324x_set_z_rejection() to set which zcode to ignore.
|
||||
Parameter:
|
||||
-1 = accept all(default)
|
||||
0x00-0xff = zcode to ignore
|
||||
*/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
@ -1108,35 +1088,27 @@ static int K05324x_z_rejection;
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
static const char *K053247_memory_region;
|
||||
static int K053247_dx, K053247_dy, K053247_wraparound;
|
||||
static UINT8 K053246_regs[8];
|
||||
static UINT16 K053247_regs[16];
|
||||
static UINT16 *K053247_ram=0;
|
||||
static gfx_element *K053247_gfx;
|
||||
static void (*K053247_callback)(running_machine &machine, int *code,int *color,int *priority);
|
||||
static UINT8 K053246_OBJCHA_line;
|
||||
|
||||
void K053247_export_config(UINT16 **ram, gfx_element **gfx, void (**callback)(running_machine &, int *, int *, int *), int *dx, int *dy)
|
||||
void k053247_device::alt_K053247_export_config(UINT16 **ram, gfx_element **gfx, void (**callback)(running_machine &, int *, int *, int *), int *dx, int *dy)
|
||||
{
|
||||
if(ram)
|
||||
*ram = K053247_ram;
|
||||
*ram = m_ram;
|
||||
if(gfx)
|
||||
*gfx = K053247_gfx;
|
||||
*gfx = m_gfx;
|
||||
if(callback)
|
||||
*callback = K053247_callback;
|
||||
*callback = m_callback;
|
||||
if(dx)
|
||||
*dx = K053247_dx;
|
||||
*dx = m_dx;
|
||||
if(dy)
|
||||
*dy = K053247_dy;
|
||||
*dy = m_dy;
|
||||
}
|
||||
|
||||
int K053246_read_register(int regnum) { return(K053246_regs[regnum]); }
|
||||
int K053247_read_register(int regnum) { return(K053247_regs[regnum]); }
|
||||
int k053247_device::alt_K053246_read_register(int regnum) { return(m_kx46_regs[regnum]); }
|
||||
int k053247_device::alt_K053247_read_register(int regnum) { return(m_kx47_regs[regnum]); }
|
||||
|
||||
|
||||
/* K055673 used with the 54246 in PreGX/Run and Gun/System GX games */
|
||||
void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, int layout, int dx, int dy, void (*callback)(running_machine &machine, int *code,int *color,int *priority))
|
||||
/* alt_K055673 used with the 54246 in PreGX/Run and Gun/System GX games */
|
||||
void k053247_device::alt_K055673_vh_start(running_machine &machine, const char *gfx_memory_region, int layout, int dx, int dy, void (*callback)(running_machine &machine, int *code,int *color,int *priority))
|
||||
{
|
||||
int gfx_index;
|
||||
UINT32 total;
|
||||
@ -1186,7 +1158,7 @@ void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, i
|
||||
};
|
||||
UINT8 *s1, *s2, *d;
|
||||
long i;
|
||||
UINT16 *K055673_rom;
|
||||
UINT16 *alt_K055673_rom;
|
||||
int size4;
|
||||
|
||||
/* find first empty slot to decode gfx */
|
||||
@ -1195,7 +1167,7 @@ void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, i
|
||||
break;
|
||||
assert(gfx_index != MAX_GFX_ELEMENTS);
|
||||
|
||||
K055673_rom = (UINT16 *)machine.root_device().memregion(gfx_memory_region)->base();
|
||||
alt_K055673_rom = (UINT16 *)machine.root_device().memregion(gfx_memory_region)->base();
|
||||
|
||||
/* decode the graphics */
|
||||
switch(layout)
|
||||
@ -1204,8 +1176,8 @@ void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, i
|
||||
size4 = (machine.root_device().memregion(gfx_memory_region)->bytes()/(1024*1024))/5;
|
||||
size4 *= 4*1024*1024;
|
||||
/* set the # of tiles based on the 4bpp section */
|
||||
K055673_rom = auto_alloc_array(machine, UINT16, size4 * 5 / 2);
|
||||
d = (UINT8 *)K055673_rom;
|
||||
alt_K055673_rom = auto_alloc_array(machine, UINT16, size4 * 5 / 2);
|
||||
d = (UINT8 *)alt_K055673_rom;
|
||||
// now combine the graphics together to form 5bpp
|
||||
s1 = machine.root_device().memregion(gfx_memory_region)->base(); // 4bpp area
|
||||
s2 = s1 + (size4); // 1bpp area
|
||||
@ -1219,22 +1191,22 @@ void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, i
|
||||
}
|
||||
|
||||
total = size4 / 128;
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout, 4);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)alt_K055673_rom, total, &spritelayout, 4);
|
||||
break;
|
||||
|
||||
case K055673_LAYOUT_RNG:
|
||||
total = machine.root_device().memregion(gfx_memory_region)->bytes() / (16*16/2);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout2, 4);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)alt_K055673_rom, total, &spritelayout2, 4);
|
||||
break;
|
||||
|
||||
case K055673_LAYOUT_LE2:
|
||||
total = machine.root_device().memregion(gfx_memory_region)->bytes() / (16*16);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout3, 4);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)alt_K055673_rom, total, &spritelayout3, 4);
|
||||
break;
|
||||
|
||||
case K055673_LAYOUT_GX6:
|
||||
total = machine.root_device().memregion(gfx_memory_region)->bytes() / (16*16*6/8);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)K055673_rom, total, &spritelayout4, 4);
|
||||
decode_gfx(machine, gfx_index, (UINT8 *)alt_K055673_rom, total, &spritelayout4, 4);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1244,79 +1216,79 @@ void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, i
|
||||
if (VERBOSE && !(machine.config().m_video_attributes & VIDEO_HAS_SHADOWS))
|
||||
popmessage("driver should use VIDEO_HAS_SHADOWS");
|
||||
|
||||
K053247_dx = dx;
|
||||
K053247_dy = dy;
|
||||
K053247_wraparound = 1;
|
||||
K05324x_z_rejection = -1;
|
||||
K053247_memory_region = gfx_memory_region;
|
||||
K053247_gfx = machine.gfx[gfx_index];
|
||||
K053247_callback = callback;
|
||||
K053246_OBJCHA_line = CLEAR_LINE;
|
||||
K053247_ram = auto_alloc_array(machine, UINT16, 0x1000/2);
|
||||
m_dx = dx;
|
||||
m_dy = dy;
|
||||
m_wraparound = 1;
|
||||
m_z_rejection = -1;
|
||||
m_memory_region = gfx_memory_region;
|
||||
m_gfx = machine.gfx[gfx_index];
|
||||
m_callback = callback;
|
||||
m_objcha_line = CLEAR_LINE;
|
||||
m_ram = auto_alloc_array(machine, UINT16, 0x1000/2);
|
||||
|
||||
memset(K053247_ram, 0, 0x1000);
|
||||
memset(K053246_regs, 0, 8);
|
||||
memset(K053247_regs, 0, 32);
|
||||
memset(m_ram, 0, 0x1000);
|
||||
memset(m_kx46_regs, 0, 8);
|
||||
memset(m_kx47_regs, 0, 32);
|
||||
|
||||
machine.save().save_pointer(NAME(K053247_ram), 0x800);
|
||||
machine.save().save_item(NAME(K053246_regs));
|
||||
machine.save().save_item(NAME(K053247_regs));
|
||||
machine.save().save_item(NAME(K053246_OBJCHA_line));
|
||||
machine.save().save_pointer(NAME(m_ram), 0x800);
|
||||
machine.save().save_item(NAME(m_kx46_regs));
|
||||
machine.save().save_item(NAME(m_kx47_regs));
|
||||
machine.save().save_item(NAME(m_objcha_line));
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( K053247_reg_word_w ) // write-only OBJSET2 registers (see p.43 table 6.1)
|
||||
WRITE16_MEMBER( k053247_device::alt_K053247_reg_word_w ) // write-only OBJSET2 registers (see p.43 table 6.1)
|
||||
{
|
||||
COMBINE_DATA(K053247_regs + offset);
|
||||
COMBINE_DATA(m_kx47_regs + offset);
|
||||
}
|
||||
|
||||
WRITE32_HANDLER( K053247_reg_long_w )
|
||||
WRITE32_MEMBER( k053247_device::alt_K053247_reg_long_w )
|
||||
{
|
||||
offset <<= 1;
|
||||
COMBINE_DATA(K053247_regs + offset + 1);
|
||||
COMBINE_DATA(m_kx47_regs + offset + 1);
|
||||
mem_mask >>= 16;
|
||||
data >>= 16;
|
||||
COMBINE_DATA(K053247_regs + offset);
|
||||
COMBINE_DATA(m_kx47_regs + offset);
|
||||
}
|
||||
|
||||
READ16_HANDLER( K053247_word_r )
|
||||
READ16_MEMBER( k053247_device::alt_K053247_word_r )
|
||||
{
|
||||
return K053247_ram[offset];
|
||||
return m_ram[offset];
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( K053247_word_w )
|
||||
WRITE16_MEMBER( k053247_device::alt_K053247_word_w )
|
||||
{
|
||||
COMBINE_DATA(K053247_ram + offset);
|
||||
COMBINE_DATA(m_ram + offset);
|
||||
}
|
||||
|
||||
READ32_HANDLER( K053247_long_r )
|
||||
READ32_MEMBER( k053247_device::alt_K053247_long_r )
|
||||
{
|
||||
return K053247_ram[offset*2+1] | (K053247_ram[offset*2]<<16);
|
||||
return m_ram[offset*2+1] | (m_ram[offset*2]<<16);
|
||||
}
|
||||
|
||||
WRITE32_HANDLER( K053247_long_w )
|
||||
WRITE32_MEMBER( k053247_device::alt_K053247_long_w )
|
||||
{
|
||||
offset <<= 1;
|
||||
COMBINE_DATA(K053247_ram + offset + 1);
|
||||
COMBINE_DATA(m_ram + offset + 1);
|
||||
mem_mask >>= 16;
|
||||
data >>= 16;
|
||||
COMBINE_DATA(K053247_ram + offset);
|
||||
COMBINE_DATA(m_ram + offset);
|
||||
}
|
||||
|
||||
// Mystic Warriors hardware games support a non-OBJCHA based ROM readback
|
||||
// write the address to the 246 as usual, but there's a completely separate ROM
|
||||
// window that works without needing an OBJCHA line.
|
||||
// in this window, +0 = 32 bits from one set of ROMs, and +8 = 32 bits from another set
|
||||
READ16_HANDLER( K055673_rom_word_r ) // 5bpp
|
||||
READ16_MEMBER( k053247_device::alt_K055673_rom_word_r ) // 5bpp
|
||||
{
|
||||
UINT8 *ROM8 = (UINT8 *)space.machine().root_device().memregion(K053247_memory_region)->base();
|
||||
UINT16 *ROM = (UINT16 *)space.machine().root_device().memregion(K053247_memory_region)->base();
|
||||
int size4 = (space.machine().root_device().memregion(K053247_memory_region)->bytes()/(1024*1024))/5;
|
||||
UINT8 *ROM8 = (UINT8 *)space.machine().root_device().memregion(m_memory_region)->base();
|
||||
UINT16 *ROM = (UINT16 *)space.machine().root_device().memregion(m_memory_region)->base();
|
||||
int size4 = (space.machine().root_device().memregion(m_memory_region)->bytes()/(1024*1024))/5;
|
||||
int romofs;
|
||||
|
||||
size4 *= 4*1024*1024; // get offset to 5th bit
|
||||
ROM8 += size4;
|
||||
|
||||
romofs = K053246_regs[6]<<16 | K053246_regs[7]<<8 | K053246_regs[4];
|
||||
romofs = m_kx46_regs[6]<<16 | m_kx46_regs[7]<<8 | m_kx46_regs[4];
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
@ -1344,12 +1316,12 @@ READ16_HANDLER( K055673_rom_word_r ) // 5bpp
|
||||
return 0;
|
||||
}
|
||||
|
||||
READ16_HANDLER( K055673_GX6bpp_rom_word_r )
|
||||
READ16_MEMBER( k053247_device::alt_K055673_GX6bpp_rom_word_r )
|
||||
{
|
||||
UINT16 *ROM = (UINT16 *)space.machine().root_device().memregion(K053247_memory_region)->base();
|
||||
UINT16 *ROM = (UINT16 *)space.machine().root_device().memregion(m_memory_region)->base();
|
||||
int romofs;
|
||||
|
||||
romofs = K053246_regs[6]<<16 | K053246_regs[7]<<8 | K053246_regs[4];
|
||||
romofs = m_kx46_regs[6]<<16 | m_kx46_regs[7]<<8 | m_kx46_regs[4];
|
||||
|
||||
romofs /= 4; // romofs increments 4 at a time
|
||||
romofs *= 12/2; // each increment of romofs = 12 new bytes (6 new words)
|
||||
@ -1378,36 +1350,36 @@ READ16_HANDLER( K055673_GX6bpp_rom_word_r )
|
||||
return 0;
|
||||
}
|
||||
|
||||
static WRITE8_HANDLER( K053246_w )
|
||||
WRITE8_MEMBER( k053247_device::alt_K053246_w )
|
||||
{
|
||||
K053246_regs[offset] = data;
|
||||
m_kx46_regs[offset] = data;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_HANDLER( K053246_word_w )
|
||||
WRITE16_MEMBER( k053247_device::alt_K053246_word_w )
|
||||
{
|
||||
if (ACCESSING_BITS_8_15)
|
||||
K053246_w(space, offset<<1,(data >> 8) & 0xff, (mem_mask >> 8) & 0xff);
|
||||
alt_K053246_w(space, offset<<1,(data >> 8) & 0xff, (mem_mask >> 8) & 0xff);
|
||||
if (ACCESSING_BITS_0_7)
|
||||
K053246_w(space, (offset<<1) + 1,data & 0xff, mem_mask & 0xff);
|
||||
alt_K053246_w(space, (offset<<1) + 1,data & 0xff, mem_mask & 0xff);
|
||||
}
|
||||
|
||||
WRITE32_HANDLER( K053246_long_w )
|
||||
WRITE32_MEMBER( k053247_device::alt_K053246_long_w )
|
||||
{
|
||||
offset <<= 1;
|
||||
K053246_word_w(space, offset, data>>16, mem_mask >> 16);
|
||||
K053246_word_w(space, offset+1, data, mem_mask);
|
||||
alt_K053246_word_w(space, offset, data>>16, mem_mask >> 16);
|
||||
alt_K053246_word_w(space, offset+1, data, mem_mask);
|
||||
}
|
||||
|
||||
void K053246_set_OBJCHA_line(int state)
|
||||
void k053247_device::alt_K053246_set_OBJCHA_line(int state)
|
||||
{
|
||||
K053246_OBJCHA_line = state;
|
||||
m_objcha_line = state;
|
||||
}
|
||||
|
||||
int K053246_is_IRQ_enabled(void)
|
||||
int k053247_device::alt_K053246_is_IRQ_enabled(void)
|
||||
{
|
||||
// This bit enables obj DMA rather than obj IRQ even though the two functions usually coincide.
|
||||
return K053246_regs[5] & 0x10;
|
||||
return m_kx46_regs[5] & 0x10;
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,6 +102,31 @@ public:
|
||||
const char *m_memory_region;
|
||||
screen_device *m_screen;
|
||||
|
||||
/* alt implementation - to be collapsed */
|
||||
void alt_K055673_vh_start(running_machine &machine, const char *gfx_memory_region, int alt_layout, int dx, int dy,
|
||||
void (*callback)(running_machine &machine, int *code,int *color,int *priority));
|
||||
DECLARE_READ16_MEMBER( alt_K055673_rom_word_r );
|
||||
DECLARE_READ16_MEMBER( alt_K055673_GX6bpp_rom_word_r );
|
||||
|
||||
DECLARE_READ16_MEMBER( alt_K053247_word_r );
|
||||
DECLARE_WRITE16_MEMBER( alt_K053247_word_w );
|
||||
DECLARE_READ32_MEMBER( alt_K053247_long_r );
|
||||
DECLARE_WRITE32_MEMBER( alt_K053247_long_w );
|
||||
DECLARE_WRITE16_MEMBER( alt_K053247_reg_word_w ); // "OBJSET2" registers
|
||||
DECLARE_WRITE32_MEMBER( alt_K053247_reg_long_w );
|
||||
|
||||
int alt_K053247_read_register(int regnum);
|
||||
void alt_K053247_set_SpriteOffset(int offsx, int offsy);
|
||||
void alt_K053247_export_config(UINT16 **ram, gfx_element **gfx, void (**callback)(running_machine &, int *, int *, int *), int *dx, int *dy);
|
||||
|
||||
DECLARE_WRITE8_MEMBER( alt_K053246_w );
|
||||
DECLARE_WRITE16_MEMBER( alt_K053246_word_w );
|
||||
DECLARE_WRITE32_MEMBER( alt_K053246_long_w );
|
||||
void alt_K053246_set_OBJCHA_line(int state);
|
||||
int alt_K053246_is_IRQ_enabled(void);
|
||||
int alt_K053246_read_register(int regnum);
|
||||
|
||||
|
||||
template<class _BitmapClass>
|
||||
void k053247_sprites_draw_common( _BitmapClass &bitmap, const rectangle &cliprect );
|
||||
|
||||
@ -139,51 +164,19 @@ extern const device_type K055673;
|
||||
#define MCFG_K053246_ADD(_tag, _interface) \
|
||||
MCFG_DEVICE_ADD(_tag, K053246, 0) \
|
||||
MCFG_DEVICE_CONFIG(_interface)
|
||||
|
||||
#define MCFG_K053247_ADD(_tag, _interface) \
|
||||
MCFG_DEVICE_ADD(_tag, K053247, 0) \
|
||||
MCFG_DEVICE_CONFIG(_interface)
|
||||
|
||||
#define MCFG_K055673_ADD(_tag, _interface) \
|
||||
MCFG_DEVICE_ADD(_tag, K055673, 0) \
|
||||
MCFG_DEVICE_CONFIG(_interface)
|
||||
|
||||
#define MCFG_K055673_ADD_NOINTF(_tag ) \
|
||||
MCFG_DEVICE_ADD(_tag, K055673, 0) \
|
||||
|
||||
|
||||
|
||||
|
||||
/* old non-device stuff */
|
||||
|
||||
void K055673_vh_start(running_machine &machine, const char *gfx_memory_region, int alt_layout, int dx, int dy,
|
||||
void (*callback)(running_machine &machine, int *code,int *color,int *priority));
|
||||
DECLARE_READ16_HANDLER( K055673_rom_word_r );
|
||||
DECLARE_READ16_HANDLER( K055673_GX6bpp_rom_word_r );
|
||||
|
||||
/*
|
||||
Callback procedures for non-standard shadows:
|
||||
|
||||
1) translate shadow code to the correct 2-bit form (0=off, 1-3=style)
|
||||
2) shift shadow code left by K053247_SHDSHIFT and add the K053247_CUSTOMSHADOW flag
|
||||
3) combine the result with sprite color
|
||||
*/
|
||||
#define K053247_CUSTOMSHADOW 0x20000000
|
||||
#define K053247_SHDSHIFT 20
|
||||
|
||||
DECLARE_READ16_HANDLER( K053247_word_r );
|
||||
DECLARE_WRITE16_HANDLER( K053247_word_w );
|
||||
DECLARE_READ32_HANDLER( K053247_long_r );
|
||||
DECLARE_WRITE32_HANDLER( K053247_long_w );
|
||||
DECLARE_WRITE16_HANDLER( K053247_reg_word_w ); // "OBJSET2" registers
|
||||
DECLARE_WRITE32_HANDLER( K053247_reg_long_w );
|
||||
|
||||
int K053247_read_register(int regnum);
|
||||
void K053247_set_SpriteOffset(int offsx, int offsy);
|
||||
void K053247_export_config(UINT16 **ram, gfx_element **gfx, void (**callback)(running_machine &, int *, int *, int *), int *dx, int *dy);
|
||||
|
||||
DECLARE_WRITE16_HANDLER( K053246_word_w );
|
||||
DECLARE_WRITE32_HANDLER( K053246_long_w );
|
||||
void K053246_set_OBJCHA_line(int state);
|
||||
int K053246_is_IRQ_enabled(void);
|
||||
int K053246_read_register(int regnum);
|
||||
|
||||
|
||||
|
||||
|
@ -856,21 +856,21 @@ void konamigx_state::konamigx_precache_registers(void)
|
||||
static const int coregshifts[5]= {4,5,6,7,8};
|
||||
int i;
|
||||
|
||||
K053246_objset1 = K053246_read_register(5);
|
||||
K053246_objset1 = m_k055673->alt_K053246_read_register(5);
|
||||
|
||||
i = K053247_read_register(0x8/2);
|
||||
i = m_k055673->alt_K053247_read_register(0x8/2);
|
||||
K053247_vrcbk[0] = (i & 0x000f) << 14;
|
||||
K053247_vrcbk[1] = (i & 0x0f00) << 6;
|
||||
i = K053247_read_register(0xa/2);
|
||||
i = m_k055673->alt_K053247_read_register(0xa/2);
|
||||
K053247_vrcbk[2] = (i & 0x000f) << 14;
|
||||
K053247_vrcbk[3] = (i & 0x0f00) << 6;
|
||||
|
||||
// COREG == OBJSET2+1C == bit8-11 of OPSET ??? (see p.50 last table, needs p.49 to confirm)
|
||||
K053247_opset = K053247_read_register(0xc/2);
|
||||
K053247_opset = m_k055673->alt_K053247_read_register(0xc/2);
|
||||
|
||||
i = K053247_opset & 7; if (i > 4) i = 4;
|
||||
|
||||
K053247_coreg = K053247_read_register(0xc/2)>>8 & 0xf;
|
||||
K053247_coreg = m_k055673->alt_K053247_read_register(0xc/2)>>8 & 0xf;
|
||||
K053247_coreg =(K053247_coreg & coregmasks[i]) << 12;
|
||||
|
||||
K053247_coregshift = coregshifts[i];
|
||||
@ -1130,7 +1130,7 @@ static void K053247GP_set_SpriteOffset(int offsx, int offsy)
|
||||
K053247_dy = offsy;
|
||||
}
|
||||
|
||||
void konamigx_mixer_init(running_machine &machine, int objdma)
|
||||
void konamigx_state::konamigx_mixer_init(running_machine &machine, int objdma)
|
||||
{
|
||||
gx_objdma = 0;
|
||||
gx_primode = 0;
|
||||
@ -1139,7 +1139,7 @@ void konamigx_mixer_init(running_machine &machine, int objdma)
|
||||
gx_shdzbuf = auto_alloc_array(machine, UINT8, GX_ZBUFSIZE);
|
||||
gx_objpool = auto_alloc_array(machine, struct GX_OBJ, GX_MAX_OBJECTS);
|
||||
|
||||
K053247_export_config(&K053247_ram, &K053247_gfx, &K053247_callback, &K053247_dx, &K053247_dy);
|
||||
m_k055673->alt_K053247_export_config(&K053247_ram, &K053247_gfx, &K053247_callback, &K053247_dx, &K053247_dy);
|
||||
K054338_export_config(&K054338_shdRGB);
|
||||
|
||||
if (objdma)
|
||||
@ -1223,8 +1223,8 @@ void konamigx_state::konamigx_mixer(running_machine &machine, bitmap_rgb32 &bitm
|
||||
flipscreeny = K053246_objset1 & 2;
|
||||
|
||||
// get "display window" offsets
|
||||
offx = (K053246_read_register(0)<<8 | K053246_read_register(1)) & 0x3ff;
|
||||
offy = (K053246_read_register(2)<<8 | K053246_read_register(3)) & 0x3ff;
|
||||
offx = (m_k055673->alt_K053246_read_register(0)<<8 | m_k055673->alt_K053246_read_register(1)) & 0x3ff;
|
||||
offy = (m_k055673->alt_K053246_read_register(2)<<8 | m_k055673->alt_K053246_read_register(3)) & 0x3ff;
|
||||
|
||||
// init OBJSET2 and mixer parameters (see p.51 and chapter 7)
|
||||
layerid[0] = 0; layerid[1] = 1; layerid[2] = 2; layerid[3] = 3; layerid[4] = 4; layerid[5] = 5;
|
||||
@ -2055,7 +2055,7 @@ void konamigx_state::_gxcommoninitnosprites(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);
|
||||
m_k055673->alt_K055673_vh_start(machine, "gfx2", K055673_LAYOUT_GX, -26, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine);
|
||||
}
|
||||
@ -2106,7 +2106,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_5bpp)
|
||||
VIDEO_START_MEMBER(konamigx_state,winspike)
|
||||
{
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -53, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine());
|
||||
}
|
||||
@ -2114,7 +2114,7 @@ VIDEO_START_MEMBER(konamigx_state,winspike)
|
||||
VIDEO_START_MEMBER(konamigx_state,dragoonj)
|
||||
{
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_RNG, -53, -23, konamigx_dragoonj_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine());
|
||||
|
||||
@ -2127,7 +2127,7 @@ VIDEO_START_MEMBER(konamigx_state,dragoonj)
|
||||
VIDEO_START_MEMBER(konamigx_state,le2)
|
||||
{
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_LE2, -46, -23, konamigx_le2_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine());
|
||||
|
||||
@ -2156,7 +2156,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type3)
|
||||
int height = machine().primary_screen->height();
|
||||
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
dualscreen_right_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
@ -2195,7 +2195,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4)
|
||||
int height = machine().primary_screen->height();
|
||||
|
||||
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
|
||||
m_k055673->alt_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);
|
||||
dualscreen_right_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
@ -2226,7 +2226,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_vsn)
|
||||
int height = machine().primary_screen->height();
|
||||
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -132, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
dualscreen_right_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
@ -2256,7 +2256,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_type4_sd2)
|
||||
int height = machine().primary_screen->height();
|
||||
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -81, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
dualscreen_left_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
dualscreen_right_tempbitmap = auto_bitmap_rgb32_alloc(machine(), width, height);
|
||||
@ -2290,7 +2290,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2)
|
||||
|
||||
if (!strcmp(machine().system().name,"salmndr2") || !strcmp(machine().system().name,"salmndr2a"))
|
||||
{
|
||||
K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -48, -23, konamigx_salmndr2_sprite_callback);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -48, -23, konamigx_salmndr2_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine());
|
||||
}
|
||||
@ -2303,7 +2303,7 @@ VIDEO_START_MEMBER(konamigx_state,konamigx_6bpp_2)
|
||||
VIDEO_START_MEMBER(konamigx_state,opengolf)
|
||||
{
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX6, -53, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine());
|
||||
|
||||
@ -2341,7 +2341,7 @@ VIDEO_START_MEMBER(konamigx_state,opengolf)
|
||||
VIDEO_START_MEMBER(konamigx_state,racinfrc)
|
||||
{
|
||||
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);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", K055673_LAYOUT_GX, -53, -23, konamigx_type2_sprite_callback);
|
||||
|
||||
_gxcommoninitnosprites(machine());
|
||||
|
||||
|
@ -170,7 +170,7 @@ VIDEO_START_MEMBER(mystwarr_state,gaiapols)
|
||||
|
||||
mystwarr_decode_tiles(machine());
|
||||
|
||||
K055673_vh_start(machine(), "gfx2", 1, -61, -22, gaiapols_sprite_callback); // stage2 brick walls
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", 1, -61, -22, gaiapols_sprite_callback); // stage2 brick walls
|
||||
|
||||
konamigx_mixer_init(machine(), 0);
|
||||
|
||||
@ -210,7 +210,7 @@ VIDEO_START_MEMBER(mystwarr_state,dadandrn)
|
||||
|
||||
mystwarr_decode_tiles(machine());
|
||||
|
||||
K055673_vh_start(machine(), "gfx2", 0, -42, -22, gaiapols_sprite_callback);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", 0, -42, -22, gaiapols_sprite_callback);
|
||||
|
||||
konamigx_mixer_init(machine(), 0);
|
||||
|
||||
@ -239,7 +239,7 @@ VIDEO_START_MEMBER(mystwarr_state,mystwarr)
|
||||
|
||||
mystwarr_decode_tiles(machine());
|
||||
|
||||
K055673_vh_start(machine(), "gfx2", 0, -48, -24, mystwarr_sprite_callback);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", 0, -48, -24, mystwarr_sprite_callback);
|
||||
|
||||
konamigx_mixer_init(machine(), 0);
|
||||
|
||||
@ -262,7 +262,7 @@ VIDEO_START_MEMBER(mystwarr_state,metamrph)
|
||||
|
||||
mystwarr_decode_tiles(machine());
|
||||
|
||||
K055673_vh_start(machine(), "gfx2", 1, -51, -22, metamrph_sprite_callback);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", 1, -51, -22, metamrph_sprite_callback);
|
||||
|
||||
konamigx_mixer_init(machine(), 0);
|
||||
|
||||
@ -284,7 +284,7 @@ VIDEO_START_MEMBER(mystwarr_state,viostorm)
|
||||
|
||||
mystwarr_decode_tiles(machine());
|
||||
|
||||
K055673_vh_start(machine(), "gfx2", 1, -62, -23, metamrph_sprite_callback);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", 1, -62, -23, metamrph_sprite_callback);
|
||||
|
||||
konamigx_mixer_init(machine(), 0);
|
||||
|
||||
@ -305,7 +305,7 @@ VIDEO_START_MEMBER(mystwarr_state,martchmp)
|
||||
|
||||
mystwarr_decode_tiles(machine());
|
||||
|
||||
K055673_vh_start(machine(), "gfx2", 0, -58, -23, martchmp_sprite_callback);
|
||||
m_k055673->alt_K055673_vh_start(machine(), "gfx2", 0, -58, -23, martchmp_sprite_callback);
|
||||
|
||||
konamigx_mixer_init(machine(), 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user