mirror of
https://github.com/holub/mame
synced 2025-05-28 08:33:05 +03:00
misc deco (nw)
This commit is contained in:
parent
b782d13f20
commit
2199cdb59c
@ -86,6 +86,23 @@
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/okim6295.h"
|
||||
|
||||
READ16_MEMBER( boogwing_state::boogwing_protection_region_0_104_r )
|
||||
{
|
||||
int real_address = 0 + (offset *2);
|
||||
int deco146_addr = BITSWAP32(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
|
||||
UINT8 cs = 0;
|
||||
UINT16 data = m_deco104->read_data( deco146_addr, mem_mask, cs );
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE16_MEMBER( boogwing_state::boogwing_protection_region_0_104_w )
|
||||
{
|
||||
int real_address = 0 + (offset *2);
|
||||
int deco146_addr = BITSWAP32(real_address, /* NC */31,30,29,28,27,26,25,24,23,22,21,20,19,18, 13,12,11,/**/ 17,16,15,14, 10,9,8, 7,6,5,4, 3,2,1,0) & 0x7fff;
|
||||
UINT8 cs = 0;
|
||||
m_deco104->write_data( space, deco146_addr, data, mem_mask, cs );
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( boogwing_map, AS_PROGRAM, 16, boogwing_state )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
@ -99,10 +116,11 @@ static ADDRESS_MAP_START( boogwing_map, AS_PROGRAM, 16, boogwing_state )
|
||||
AM_RANGE(0x244000, 0x244001) AM_DEVWRITE("spriteram2", buffered_spriteram16_device, write)
|
||||
AM_RANGE(0x246000, 0x2467ff) AM_RAM AM_SHARE("spriteram2")
|
||||
|
||||
AM_RANGE(0x24e6c0, 0x24e6c1) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0x24e138, 0x24e139) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x24e344, 0x24e345) AM_READ_PORT("INPUTS")
|
||||
/*READD AM_RANGE(0x24e000, 0x24e7ff) AM_WRITE_LEGACY(deco16_104_prot_w) AM_SHARE("prot16ram") */
|
||||
// AM_RANGE(0x24e6c0, 0x24e6c1) AM_READ_PORT("DSW")
|
||||
// AM_RANGE(0x24e138, 0x24e139) AM_READ_PORT("SYSTEM")
|
||||
// AM_RANGE(0x24e344, 0x24e345) AM_READ_PORT("INPUTS")
|
||||
// /*READD AM_RANGE(0x24e000, 0x24e7ff) AM_WRITE_LEGACY(deco16_104_prot_w) AM_SHARE("prot16ram") */
|
||||
AM_RANGE(0x24e000, 0x24efff) AM_READWRITE(boogwing_protection_region_0_104_r,boogwing_protection_region_0_104_w) AM_SHARE("prot16ram") /* Protection device */
|
||||
|
||||
AM_RANGE(0x260000, 0x26000f) AM_DEVWRITE("tilegen1", deco16ic_device, pf_control_w)
|
||||
AM_RANGE(0x264000, 0x265fff) AM_DEVREADWRITE("tilegen1", deco16ic_device, pf1_data_r, pf1_data_w)
|
||||
@ -141,7 +159,7 @@ ADDRESS_MAP_END
|
||||
/**********************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START( boogwing )
|
||||
PORT_START("SYSTEM")
|
||||
PORT_START("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
@ -195,7 +213,7 @@ static INPUT_PORTS_START( boogwing )
|
||||
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
||||
|
||||
PORT_START("INPUTS")
|
||||
PORT_START("IN0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
@ -359,6 +377,10 @@ static MACHINE_CONFIG_START( boogwing, boogwing_state )
|
||||
MCFG_DEVICE_ADD("spritegen2", DECO_SPRITE, 0)
|
||||
decospr_device::set_gfx_region(*device, 4);
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
MCFG_DECO146_SET_INTERFACE_SCRAMBLE_REVERSE
|
||||
MCFG_DECO146_SET_USE_MAGIC_ADDRESS_XOR
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
|
@ -2163,6 +2163,8 @@ static MACHINE_CONFIG_START( tattass, deco32_state )
|
||||
MCFG_GFXDECODE(tattass)
|
||||
MCFG_PALETTE_LENGTH(2048)
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(deco32_state,nslasher)
|
||||
|
||||
/* sound hardware */
|
||||
@ -2204,6 +2206,8 @@ static MACHINE_CONFIG_START( nslasher, deco32_state )
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(deco32_state,nslasher)
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
|
@ -26,6 +26,7 @@ lamps?
|
||||
#include "video/deco16ic.h"
|
||||
#include "video/decospr.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "machine/deco104.h"
|
||||
|
||||
class dreambal_state : public driver_device
|
||||
{
|
||||
@ -34,6 +35,7 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_eeprom(*this, "eeprom"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_deco104(*this, "ioprot104"),
|
||||
m_deco_tilegen1(*this, "tilegen1")
|
||||
{ }
|
||||
|
||||
@ -41,6 +43,7 @@ public:
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<deco104_device> m_deco104;
|
||||
required_device<deco16ic_device> m_deco_tilegen1;
|
||||
|
||||
DECLARE_DRIVER_INIT(dreambal);
|
||||
@ -311,6 +314,8 @@ static MACHINE_CONFIG_START( dreambal, dreambal_state )
|
||||
|
||||
MCFG_EEPROM_93C46_ADD("eeprom") // 93lc46b
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
|
||||
MCFG_DECO16IC_ADD("tilegen1", dreambal_deco16ic_tilegen1_intf)
|
||||
|
||||
/* sound hardware */
|
||||
|
@ -340,6 +340,8 @@ static MACHINE_CONFIG_START( pktgaldx, pktgaldx_state )
|
||||
MCFG_DEVICE_ADD("spritegen", DECO_SPRITE, 0)
|
||||
decospr_device::set_gfx_region(*device, 2);
|
||||
|
||||
MCFG_DECO104_ADD("ioprot104")
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_deco104(*this, "ioprot104"),
|
||||
m_decocomn(*this, "deco_common"),
|
||||
m_deco_tilegen1(*this, "tilegen1"),
|
||||
m_deco_tilegen2(*this, "tilegen2"),
|
||||
@ -37,6 +38,7 @@ public:
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
optional_device<deco104_device> m_deco104;
|
||||
required_device<decocomn_device> m_decocomn;
|
||||
required_device<deco16ic_device> m_deco_tilegen1;
|
||||
required_device<deco16ic_device> m_deco_tilegen2;
|
||||
@ -57,4 +59,7 @@ public:
|
||||
virtual void video_start();
|
||||
UINT32 screen_update_boogwing(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void mix_boogwing(bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_READ16_MEMBER( boogwing_protection_region_0_104_r );
|
||||
DECLARE_WRITE16_MEMBER( boogwing_protection_region_0_104_w );
|
||||
|
||||
};
|
||||
|
@ -14,6 +14,7 @@ class pktgaldx_state : public driver_device
|
||||
public:
|
||||
pktgaldx_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_deco104(*this, "ioprot104"),
|
||||
m_pf1_rowscroll(*this, "pf1_rowscroll"),
|
||||
m_pf2_rowscroll(*this, "pf2_rowscroll"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
@ -25,6 +26,8 @@ public:
|
||||
m_deco_tilegen1(*this, "tilegen1"),
|
||||
m_decocomn(*this, "deco_common") { }
|
||||
|
||||
optional_device<deco104_device> m_deco104;
|
||||
|
||||
/* memory pointers */
|
||||
optional_shared_ptr<UINT16> m_pf1_rowscroll;
|
||||
optional_shared_ptr<UINT16> m_pf2_rowscroll;
|
||||
@ -47,4 +50,7 @@ public:
|
||||
virtual void machine_start();
|
||||
UINT32 screen_update_pktgaldx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_pktgaldb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
READ16_MEMBER( pktgaldx_protection_region_0_104_r );
|
||||
WRITE16_MEMBER( pktgaldx_protection_region_0_104_w );
|
||||
};
|
||||
|
@ -532,31 +532,6 @@ UINT16 deco104_device::read_data_getloc(UINT16 offset, int& location)
|
||||
|
||||
/**********************************************************************************/
|
||||
|
||||
READ16_HANDLER( dietgo_104_prot_r )
|
||||
{
|
||||
switch (offset * 2)
|
||||
{
|
||||
case 0x298: return space.machine().root_device().ioport("IN0")->read();
|
||||
case 0x342: return space.machine().root_device().ioport("IN1")->read();
|
||||
case 0x506: return space.machine().root_device().ioport("DSW")->read();
|
||||
}
|
||||
|
||||
logerror("Protection PC %06x: warning - read unmapped memory address %04x\n", space.device().safe_pc(), offset<<1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
WRITE16_HANDLER( dietgo_104_prot_w )
|
||||
{
|
||||
driver_device *state = space.machine().driver_data<driver_device>();
|
||||
if (offset == (0x380 / 2))
|
||||
{
|
||||
state->soundlatch_byte_w(space, 0, data & 0xff);
|
||||
space.machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
|
||||
return;
|
||||
}
|
||||
logerror("Protection PC %06x: warning - write unmapped memory address %04x %04x\n", space.device().safe_pc(), offset << 1, data);
|
||||
}
|
||||
|
||||
/**********************************************************************************/
|
||||
|
||||
|
@ -80,8 +80,6 @@ extern const device_type DECO104PROT;
|
||||
|
||||
DECLARE_READ16_HANDLER( deco16_104_pktgaldx_prot_r );
|
||||
DECLARE_WRITE16_HANDLER( deco16_104_pktgaldx_prot_w );
|
||||
DECLARE_READ16_HANDLER( dietgo_104_prot_r );
|
||||
DECLARE_WRITE16_HANDLER( dietgo_104_prot_w );
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user