mirror of
https://github.com/holub/mame
synced 2025-05-20 04:39:11 +03:00
oki cleanup (nw)
This commit is contained in:
parent
3b4d2b39c2
commit
aa4935ce1c
@ -113,19 +113,15 @@ WRITE8_MEMBER(aerofgt_state::aerofgt_sh_bankswitch_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(aerofgt_state::pspikesb_oki_banking_w)
|
WRITE16_MEMBER(aerofgt_state::pspikesb_oki_banking_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * (data & 3));
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
oki->set_bank_base(0x40000 * (data & 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*TODO: sound banking. */
|
/*TODO: sound banking. */
|
||||||
WRITE16_MEMBER(aerofgt_state::aerfboo2_okim6295_banking_w)
|
WRITE16_MEMBER(aerofgt_state::aerfboo2_okim6295_banking_w)
|
||||||
{
|
{
|
||||||
// device_t *device = machine().device("oki");
|
|
||||||
// if(ACCESSING_BITS_8_15)
|
// if(ACCESSING_BITS_8_15)
|
||||||
// {
|
// {
|
||||||
// okim6295_device *oki = downcast<okim6295_device *>(device);
|
// m_oki->set_bank_base(0x40000 * ((data & 0xf00)>>8));
|
||||||
// oki->set_bank_base(0x40000 * ((data & 0xf00)>>8));
|
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_paletteram(*this, "paletteram"),
|
m_paletteram(*this, "paletteram"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_spriteram;
|
required_shared_ptr<UINT16> m_spriteram;
|
||||||
@ -72,6 +73,7 @@ public:
|
|||||||
TIMER_DEVICE_CALLBACK_MEMBER(skilldrp_scanline);
|
TIMER_DEVICE_CALLBACK_MEMBER(skilldrp_scanline);
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
@ -190,22 +192,18 @@ WRITE16_MEMBER(astrocorp_state::astrocorp_eeprom_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(astrocorp_state::astrocorp_sound_bank_w)
|
WRITE16_MEMBER(astrocorp_state::astrocorp_sound_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_8_15)
|
if (ACCESSING_BITS_8_15)
|
||||||
{
|
{
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base(0x40000 * ((data >> 8) & 1));
|
||||||
oki->set_bank_base(0x40000 * ((data >> 8) & 1));
|
|
||||||
// logerror("CPU #0 PC %06X: OKI bank %08X\n", space.device().safe_pc(), data);
|
// logerror("CPU #0 PC %06X: OKI bank %08X\n", space.device().safe_pc(), data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(astrocorp_state::skilldrp_sound_bank_w)
|
WRITE16_MEMBER(astrocorp_state::skilldrp_sound_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base(0x40000 * (data & 1));
|
||||||
oki->set_bank_base(0x40000 * (data & 1));
|
|
||||||
// logerror("CPU #0 PC %06X: OKI bank %08X\n", space.device().safe_pc(), data);
|
// logerror("CPU #0 PC %06X: OKI bank %08X\n", space.device().safe_pc(), data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@ public:
|
|||||||
m_txram(*this, "txram"),
|
m_txram(*this, "txram"),
|
||||||
m_vregs(*this, "vregs"),
|
m_vregs(*this, "vregs"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_shared_ptr<UINT16> m_bgram;
|
required_shared_ptr<UINT16> m_bgram;
|
||||||
required_shared_ptr<UINT16> m_fgram;
|
required_shared_ptr<UINT16> m_fgram;
|
||||||
@ -56,6 +57,7 @@ public:
|
|||||||
UINT32 screen_update_bestleaw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_bestleaw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -228,9 +230,7 @@ WRITE16_MEMBER(bestleag_state::bestleag_fgram_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(bestleag_state::oki_bank_w)
|
WRITE16_MEMBER(bestleag_state::oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * ((data & 3) - 1));
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
oki->set_bank_base(0x40000 * ((data & 3) - 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -310,8 +310,7 @@ WRITE8_MEMBER(cps_state::cps1_snd_bankswitch_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(cps_state::cps1_oki_pin7_w)
|
WRITE8_MEMBER(cps_state::cps1_oki_pin7_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_pin7(data & 1);
|
||||||
downcast<okim6295_device *>(device)->set_pin7(data & 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(cps_state::cps1_soundlatch_w)
|
WRITE16_MEMBER(cps_state::cps1_soundlatch_w)
|
||||||
|
@ -156,9 +156,7 @@ ROMs (All ROMs are 27C010 EPROM. - means not populated)
|
|||||||
|
|
||||||
WRITE8_MEMBER(ddragon3_state::oki_bankswitch_w)
|
WRITE8_MEMBER(ddragon3_state::oki_bankswitch_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base((data & 1) * 0x40000);
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
oki->set_bank_base((data & 1) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(ddragon3_state::ddragon3_io_w)
|
WRITE16_MEMBER(ddragon3_state::ddragon3_io_w)
|
||||||
|
@ -60,19 +60,15 @@ WRITE16_MEMBER(deniam_state::sound_command_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(deniam_state::deniam16b_oki_rom_bank_w)
|
WRITE8_MEMBER(deniam_state::deniam16b_oki_rom_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base((data & 0x40) ? 0x40000 : 0x00000);
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
oki->set_bank_base((data & 0x40) ? 0x40000 : 0x00000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(deniam_state::deniam16c_oki_rom_bank_w)
|
WRITE16_MEMBER(deniam_state::deniam16c_oki_rom_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
if ((data&0xFE) != 0) popmessage("OKI bank was not 0 or 1! contact MAMEDEV!");
|
if ((data&0xFE) != 0) popmessage("OKI bank was not 0 or 1! contact MAMEDEV!");
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base((data & 0x01) ? 0x40000 : 0x00000);
|
||||||
oki->set_bank_base((data & 0x01) ? 0x40000 : 0x00000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,8 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_spriteram;
|
required_shared_ptr<UINT16> m_spriteram;
|
||||||
@ -75,6 +76,7 @@ public:
|
|||||||
UINT32 screen_update_diverboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_diverboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -136,12 +138,9 @@ WRITE16_MEMBER(diverboy_state::soundcmd_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(diverboy_state::okibank_w)
|
WRITE8_MEMBER(diverboy_state::okibank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
/* bit 2 might be reset */
|
/* bit 2 might be reset */
|
||||||
// popmessage("%02x",data);
|
// popmessage("%02x",data);
|
||||||
|
m_oki->set_bank_base((data & 3) * 0x40000);
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
oki->set_bank_base((data & 3) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@ public:
|
|||||||
m_videoram_fg(*this, "videorafg"),
|
m_videoram_fg(*this, "videorafg"),
|
||||||
m_videoram_bg(*this, "videorabg"),
|
m_videoram_bg(*this, "videorabg"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_videoram_fg;
|
required_shared_ptr<UINT16> m_videoram_fg;
|
||||||
@ -44,6 +45,7 @@ public:
|
|||||||
UINT32 screen_update_drtomy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_drtomy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -154,12 +156,10 @@ WRITE16_MEMBER(drtomy_state::drtomy_vram_bg_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(drtomy_state::drtomy_okibank_w)
|
WRITE16_MEMBER(drtomy_state::drtomy_okibank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (m_oki_bank != (data & 3))
|
if (m_oki_bank != (data & 3))
|
||||||
{
|
{
|
||||||
m_oki_bank = data & 3;
|
m_oki_bank = data & 3;
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base(m_oki_bank * 0x40000);
|
||||||
oki->set_bank_base(m_oki_bank * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unknown bit 2 -> (data & 4) */
|
/* unknown bit 2 -> (data & 4) */
|
||||||
|
@ -73,9 +73,7 @@ WRITE8_MEMBER(funybubl_state::funybubl_soundcommand_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(funybubl_state::funybubl_oki_bank_sw)
|
WRITE8_MEMBER(funybubl_state::funybubl_oki_bank_sw)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(((data & 1) * 0x40000));
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
oki->set_bank_base(((data & 1) * 0x40000));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,14 +122,12 @@ WRITE8_MEMBER(fuuki16_state::fuuki16_sound_rombank_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(fuuki16_state::fuuki16_oki_banking_w)
|
WRITE8_MEMBER(fuuki16_state::fuuki16_oki_banking_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
/*
|
/*
|
||||||
data & 0x06 is always equals to data & 0x60
|
data & 0x06 is always equals to data & 0x60
|
||||||
data & 0x10 is always set
|
data & 0x10 is always set
|
||||||
*/
|
*/
|
||||||
|
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base(((data & 6) >> 1) * 0x40000);
|
||||||
oki->set_bank_base(((data & 6) >> 1) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( fuuki16_sound_map, AS_PROGRAM, 8, fuuki16_state )
|
static ADDRESS_MAP_START( fuuki16_sound_map, AS_PROGRAM, 8, fuuki16_state )
|
||||||
|
@ -238,11 +238,9 @@ READ16_MEMBER(galpanic_state::comad_timer_r)
|
|||||||
/* a kludge! */
|
/* a kludge! */
|
||||||
READ8_MEMBER(galpanic_state::comad_okim6295_r)
|
READ8_MEMBER(galpanic_state::comad_okim6295_r)
|
||||||
{
|
{
|
||||||
// device_t *device = machine().device("oki");
|
|
||||||
UINT16 retvalue;
|
UINT16 retvalue;
|
||||||
// okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
|
|
||||||
// retvalue = oki->read_status(); // doesn't work, causes lockups when girls change..
|
// retvalue = m_oki->read_status(); // doesn't work, causes lockups when girls change..
|
||||||
retvalue = machine().rand();
|
retvalue = machine().rand();
|
||||||
|
|
||||||
return retvalue;
|
return retvalue;
|
||||||
|
@ -86,11 +86,9 @@ WRITE16_MEMBER(gotcha_state::gotcha_lamps_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(gotcha_state::gotcha_oki_bank_w)
|
WRITE16_MEMBER(gotcha_state::gotcha_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_8_15)
|
if (ACCESSING_BITS_8_15)
|
||||||
{
|
{
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base((((~data & 0x0100) >> 8) * 0x40000));
|
||||||
oki->set_bank_base((((~data & 0x0100) >> 8) * 0x40000));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,8 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_priority_ram(*this, "priority_ram"),
|
m_priority_ram(*this, "priority_ram"),
|
||||||
m_vbowl_trackball(*this, "vbowl_trackball"){ }
|
m_vbowl_trackball(*this, "vbowl_trackball"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_shared_ptr<UINT16> m_priority_ram;
|
required_shared_ptr<UINT16> m_priority_ram;
|
||||||
@ -217,6 +218,7 @@ public:
|
|||||||
void ryukobou_decrypt();
|
void ryukobou_decrypt();
|
||||||
void lhb2_decrypt_gfx();
|
void lhb2_decrypt_gfx();
|
||||||
void drgnwrld_gfx_decrypt();
|
void drgnwrld_gfx_decrypt();
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2373,11 +2375,9 @@ WRITE16_MEMBER(igs011_state::lhb_irq_enable_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(igs011_state::lhb_okibank_w)
|
WRITE16_MEMBER(igs011_state::lhb_okibank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_8_15)
|
if (ACCESSING_BITS_8_15)
|
||||||
{
|
{
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base((data & 0x200) ? 0x40000 : 0);
|
||||||
oki->set_bank_base((data & 0x200) ? 0x40000 : 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( data & (~0x200) )
|
if ( data & (~0x200) )
|
||||||
|
@ -267,10 +267,8 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
WRITE16_MEMBER(kaneko16_state::bakubrkr_oki_bank_sw)
|
WRITE16_MEMBER(kaneko16_state::bakubrkr_oki_bank_sw)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7) {
|
if (ACCESSING_BITS_0_7) {
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base(0x40000 * (data & 0x7) );
|
||||||
oki->set_bank_base(0x40000 * (data & 0x7) );
|
|
||||||
logerror("%s:Selecting OKI bank %02X\n",machine().describe_context(),data&0xff);
|
logerror("%s:Selecting OKI bank %02X\n",machine().describe_context(),data&0xff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,14 +151,12 @@ void ::kickgoal_play(okim6295_device *oki, int melody, int data)
|
|||||||
|
|
||||||
WRITE16_MEMBER(kickgoal_state::kickgoal_snd_w)
|
WRITE16_MEMBER(kickgoal_state::kickgoal_snd_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
logerror("PC:%06x Writing %04x to Sound CPU\n",space.device().safe_pcbase(),data);
|
logerror("PC:%06x Writing %04x to Sound CPU\n",space.device().safe_pcbase(),data);
|
||||||
if (data >= 0x40) {
|
if (data >= 0x40) {
|
||||||
if (data == 0xfe) {
|
if (data == 0xfe) {
|
||||||
oki->write(0,0x40); /* Stop playing the melody */
|
m_oki->write(0,0x40); /* Stop playing the melody */
|
||||||
m_melody = 0x00;
|
m_melody = 0x00;
|
||||||
m_melody_loop = 0x00;
|
m_melody_loop = 0x00;
|
||||||
}
|
}
|
||||||
@ -167,37 +165,37 @@ WRITE16_MEMBER(kickgoal_state::kickgoal_snd_w)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (data == 0) {
|
else if (data == 0) {
|
||||||
oki->write(0,0x38); /* Stop playing effects */
|
m_oki->write(0,0x38); /* Stop playing effects */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
kickgoal_sound = kickgoal_cmd_snd[data];
|
kickgoal_sound = kickgoal_cmd_snd[data];
|
||||||
|
|
||||||
if (kickgoal_sound >= 0x70) {
|
if (kickgoal_sound >= 0x70) {
|
||||||
if (kickgoal_snd_bank != 1)
|
if (kickgoal_snd_bank != 1)
|
||||||
oki->set_bank_base((1 * 0x40000));
|
m_oki->set_bank_base((1 * 0x40000));
|
||||||
kickgoal_snd_bank = 1;
|
kickgoal_snd_bank = 1;
|
||||||
kickgoal_play(oki, 0, data);
|
kickgoal_play(m_oki, 0, data);
|
||||||
}
|
}
|
||||||
else if (kickgoal_sound >= 0x69) {
|
else if (kickgoal_sound >= 0x69) {
|
||||||
if (kickgoal_snd_bank != 2)
|
if (kickgoal_snd_bank != 2)
|
||||||
oki->set_bank_base((2 * 0x40000));
|
m_oki->set_bank_base((2 * 0x40000));
|
||||||
kickgoal_snd_bank = 2;
|
kickgoal_snd_bank = 2;
|
||||||
kickgoal_play(oki, 4, data);
|
kickgoal_play(m_oki, 4, data);
|
||||||
}
|
}
|
||||||
else if (kickgoal_sound >= 0x65) {
|
else if (kickgoal_sound >= 0x65) {
|
||||||
if (kickgoal_snd_bank != 1)
|
if (kickgoal_snd_bank != 1)
|
||||||
oki->set_bank_base((1 * 0x40000));
|
m_oki->set_bank_base((1 * 0x40000));
|
||||||
kickgoal_snd_bank = 1;
|
kickgoal_snd_bank = 1;
|
||||||
kickgoal_play(oki, 4, data);
|
kickgoal_play(m_oki, 4, data);
|
||||||
}
|
}
|
||||||
else if (kickgoal_sound >= 0x60) {
|
else if (kickgoal_sound >= 0x60) {
|
||||||
kickgoal_snd_bank = 0;
|
kickgoal_snd_bank = 0;
|
||||||
oki->set_bank_base(device, (0 * 0x40000));
|
m_oki->set_bank_base(device, (0 * 0x40000));
|
||||||
kickgoal_snd_bank = 0;
|
kickgoal_snd_bank = 0;
|
||||||
kickgoal_play(oki, 4, data);
|
kickgoal_play(m_oki, 4, data);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
kickgoal_play(oki, 0, data);
|
kickgoal_play(m_oki, 0, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,21 +204,19 @@ WRITE16_MEMBER(kickgoal_state::kickgoal_snd_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
|
WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
logerror("%s: Writing %04x to Sound CPU - mask %04x\n",machine().describe_context(),data,mem_mask);
|
logerror("%s: Writing %04x to Sound CPU - mask %04x\n",machine().describe_context(),data,mem_mask);
|
||||||
|
|
||||||
if (!ACCESSING_BITS_0_7)
|
if (!ACCESSING_BITS_0_7)
|
||||||
data >>= 8;
|
data >>= 8;
|
||||||
|
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
switch (data)
|
switch (data)
|
||||||
{
|
{
|
||||||
case 0xfc: oki->set_bank_base((0 * 0x40000)); break;
|
case 0xfc: m_oki->set_bank_base((0 * 0x40000)); break;
|
||||||
case 0xfd: oki->set_bank_base((2 * 0x40000)); break;
|
case 0xfd: m_oki->set_bank_base((2 * 0x40000)); break;
|
||||||
case 0xfe: oki->set_bank_base((1 * 0x40000)); break;
|
case 0xfe: m_oki->set_bank_base((1 * 0x40000)); break;
|
||||||
case 0xff: oki->set_bank_base((3 * 0x40000)); break;
|
case 0xff: m_oki->set_bank_base((3 * 0x40000)); break;
|
||||||
case 0x78:
|
case 0x78:
|
||||||
oki->write_command(data);
|
m_oki->write_command(data);
|
||||||
m_snd_sam[0] = 00; m_snd_sam[1]= 00; m_snd_sam[2] = 00; m_snd_sam[3] = 00;
|
m_snd_sam[0] = 00; m_snd_sam[1]= 00; m_snd_sam[2] = 00; m_snd_sam[3] = 00;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -229,44 +225,44 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
|
|||||||
if ((data & 0x80) && (m_snd_sam[3] != m_snd_new))
|
if ((data & 0x80) && (m_snd_sam[3] != m_snd_new))
|
||||||
{
|
{
|
||||||
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
if ((oki->read_status() & 0x08) != 0x08)
|
if ((m_oki->read_status() & 0x08) != 0x08)
|
||||||
{
|
{
|
||||||
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
oki->write_command(m_snd_new);
|
m_oki->write_command(m_snd_new);
|
||||||
oki->write_command(data);
|
m_oki->write_command(data);
|
||||||
}
|
}
|
||||||
m_snd_new = 00;
|
m_snd_new = 00;
|
||||||
}
|
}
|
||||||
if ((data & 0x40) && (m_snd_sam[2] != m_snd_new))
|
if ((data & 0x40) && (m_snd_sam[2] != m_snd_new))
|
||||||
{
|
{
|
||||||
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
if ((oki->read_status() & 0x04) != 0x04)
|
if ((m_oki->read_status() & 0x04) != 0x04)
|
||||||
{
|
{
|
||||||
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
oki->write_command(m_snd_new);
|
m_oki->write_command(m_snd_new);
|
||||||
oki->write_command(data);
|
m_oki->write_command(data);
|
||||||
}
|
}
|
||||||
m_snd_new = 00;
|
m_snd_new = 00;
|
||||||
}
|
}
|
||||||
if ((data & 0x20) && (m_snd_sam[1] != m_snd_new))
|
if ((data & 0x20) && (m_snd_sam[1] != m_snd_new))
|
||||||
{
|
{
|
||||||
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
if ((oki->read_status() & 0x02) != 0x02)
|
if ((m_oki->read_status() & 0x02) != 0x02)
|
||||||
{
|
{
|
||||||
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
oki->write_command(m_snd_new);
|
m_oki->write_command(m_snd_new);
|
||||||
oki->write_command(data);
|
m_oki->write_command(data);
|
||||||
}
|
}
|
||||||
m_snd_new = 00;
|
m_snd_new = 00;
|
||||||
}
|
}
|
||||||
if ((data & 0x10) && (m_snd_sam[0] != m_snd_new))
|
if ((data & 0x10) && (m_snd_sam[0] != m_snd_new))
|
||||||
{
|
{
|
||||||
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
if ((oki->read_status() & 0x01) != 0x01)
|
if ((m_oki->read_status() & 0x01) != 0x01)
|
||||||
{
|
{
|
||||||
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
|
||||||
oki->write_command(m_snd_new);
|
m_oki->write_command(m_snd_new);
|
||||||
oki->write_command(data);
|
m_oki->write_command(data);
|
||||||
}
|
}
|
||||||
m_snd_new = 00;
|
m_snd_new = 00;
|
||||||
}
|
}
|
||||||
@ -281,7 +277,7 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
|
|||||||
else /* Turn a channel off */
|
else /* Turn a channel off */
|
||||||
{
|
{
|
||||||
logerror("Turning channel %02x off\n", data);
|
logerror("Turning channel %02x off\n", data);
|
||||||
oki->write_command(data);
|
m_oki->write_command(data);
|
||||||
if (data & 0x40) m_snd_sam[3] = 00;
|
if (data & 0x40) m_snd_sam[3] = 00;
|
||||||
if (data & 0x20) m_snd_sam[2] = 00;
|
if (data & 0x20) m_snd_sam[2] = 00;
|
||||||
if (data & 0x10) m_snd_sam[1] = 00;
|
if (data & 0x10) m_snd_sam[1] = 00;
|
||||||
|
@ -224,10 +224,9 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
|
|
||||||
WRITE8_MEMBER(legionna_state::okim_rombank_w)
|
WRITE8_MEMBER(legionna_state::okim_rombank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
// popmessage("%08x",0x40000 * (data & 0x07));
|
// popmessage("%08x",0x40000 * (data & 0x07));
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 0x7));
|
m_oki->set_bank_base(0x40000 * (data & 0x7));
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( cupsocbl_sound_mem, AS_PROGRAM, 8, legionna_state )
|
static ADDRESS_MAP_START( cupsocbl_sound_mem, AS_PROGRAM, 8, legionna_state )
|
||||||
|
@ -351,8 +351,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
WRITE8_MEMBER(lordgun_state::lordgun_okibank_w)
|
WRITE8_MEMBER(lordgun_state::lordgun_okibank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base((data & 2) ? 0x40000 : 0);
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 2) ? 0x40000 : 0);
|
|
||||||
if (data & ~3) logerror("%s: unknown okibank bits %02x\n", machine().describe_context(), data);
|
if (data & ~3) logerror("%s: unknown okibank bits %02x\n", machine().describe_context(), data);
|
||||||
// popmessage("OKI %x", data);
|
// popmessage("OKI %x", data);
|
||||||
}
|
}
|
||||||
|
@ -375,8 +375,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
WRITE16_MEMBER(m92_state::oki_bank_w)
|
WRITE16_MEMBER(m92_state::oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * ((data+1) & 0x3)); // +1?
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * ((data+1) & 0x3)); // +1?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( ppan_portmap, AS_IO, 16, m92_state )
|
static ADDRESS_MAP_START( ppan_portmap, AS_IO, 16, m92_state )
|
||||||
|
@ -1177,23 +1177,19 @@ static void gakusai_oki_bank_set(device_t *device)
|
|||||||
|
|
||||||
WRITE16_MEMBER(metro_state::gakusai_oki_bank_hi_w)
|
WRITE16_MEMBER(metro_state::gakusai_oki_bank_hi_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
m_gakusai_oki_bank_hi = data & 0xff;
|
m_gakusai_oki_bank_hi = data & 0xff;
|
||||||
gakusai_oki_bank_set(device);
|
gakusai_oki_bank_set(m_oki);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(metro_state::gakusai_oki_bank_lo_w)
|
WRITE16_MEMBER(metro_state::gakusai_oki_bank_lo_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
m_gakusai_oki_bank_lo = data & 0xff;
|
m_gakusai_oki_bank_lo = data & 0xff;
|
||||||
gakusai_oki_bank_set(device);
|
gakusai_oki_bank_set(m_oki);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,9 +137,8 @@ Notes:
|
|||||||
|
|
||||||
WRITE8_MEMBER(midyunit_state::yawdim_oki_bank_w)
|
WRITE8_MEMBER(midyunit_state::yawdim_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (data & 4)
|
if (data & 4)
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 3));
|
m_oki->set_bank_base(0x40000 * (data & 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,10 +249,9 @@ WRITE16_MEMBER(moo_state::moo_prot_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(moo_state::moobl_oki_bank_w)
|
WRITE16_MEMBER(moo_state::moobl_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
logerror("%x to OKI bank\n", data);
|
logerror("%x to OKI bank\n", data);
|
||||||
|
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 0x0f) * 0x40000);
|
m_oki->set_bank_base((data & 0x0f) * 0x40000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( moo_map, AS_PROGRAM, 16, moo_state )
|
static ADDRESS_MAP_START( moo_map, AS_PROGRAM, 16, moo_state )
|
||||||
|
@ -238,7 +238,8 @@ public:
|
|||||||
m_bitmap(*this, "bitmap"),
|
m_bitmap(*this, "bitmap"),
|
||||||
m_sprgen(*this, "spritegen"),
|
m_sprgen(*this, "spritegen"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_soundcpu(*this, "soundcpu")
|
m_soundcpu(*this, "soundcpu"),
|
||||||
|
m_oki(*this, "oki")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
@ -263,6 +264,7 @@ public:
|
|||||||
/* devices */
|
/* devices */
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_soundcpu;
|
required_device<cpu_device> m_soundcpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
DECLARE_WRITE16_MEMBER(fg_videoram_w);
|
DECLARE_WRITE16_MEMBER(fg_videoram_w);
|
||||||
DECLARE_WRITE16_MEMBER(bg_videoram_w);
|
DECLARE_WRITE16_MEMBER(bg_videoram_w);
|
||||||
DECLARE_WRITE16_MEMBER(nmg5_soundlatch_w);
|
DECLARE_WRITE16_MEMBER(nmg5_soundlatch_w);
|
||||||
@ -337,8 +339,7 @@ WRITE16_MEMBER(nmg5_state::priority_reg_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(nmg5_state::oki_banking_w)
|
WRITE8_MEMBER(nmg5_state::oki_banking_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base((data & 1) ? 0x40000 : 0);
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 1) ? 0x40000 : 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
@ -90,10 +90,9 @@ READ16_MEMBER(oneshot_state::oneshot_gun_y_p2_r)
|
|||||||
|
|
||||||
WRITE16_MEMBER(oneshot_state::soundbank_w)
|
WRITE16_MEMBER(oneshot_state::soundbank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * ((data & 0x03) ^ 0x03));
|
m_oki->set_bank_base(0x40000 * ((data & 0x03) ^ 0x03));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,9 +32,8 @@ READ16_MEMBER(othldrby_state::othldrby_scanline_r)
|
|||||||
|
|
||||||
WRITE16_MEMBER(othldrby_state::oki_bankswitch_w)
|
WRITE16_MEMBER(othldrby_state::oki_bankswitch_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 1) * 0x40000);
|
m_oki->set_bank_base((data & 1) * 0x40000);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(othldrby_state::coinctrl_w)
|
WRITE16_MEMBER(othldrby_state::coinctrl_w)
|
||||||
|
@ -157,15 +157,13 @@ READ8_MEMBER(playmark_state::playmark_snd_flag_r)
|
|||||||
|
|
||||||
WRITE8_MEMBER(playmark_state::playmark_oki_banking_w)
|
WRITE8_MEMBER(playmark_state::playmark_oki_banking_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
|
|
||||||
if (m_old_oki_bank != (data & 7))
|
if (m_old_oki_bank != (data & 7))
|
||||||
{
|
{
|
||||||
m_old_oki_bank = data & 7;
|
m_old_oki_bank = data & 7;
|
||||||
|
|
||||||
if (((m_old_oki_bank - 1) * 0x40000) < memregion("oki")->bytes())
|
if (((m_old_oki_bank - 1) * 0x40000) < memregion("oki")->bytes())
|
||||||
{
|
{
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (m_old_oki_bank - 1));
|
m_oki->set_bank_base(0x40000 * (m_old_oki_bank - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,8 @@ public:
|
|||||||
m_mid_videoram(*this, "mid_videoram"),
|
m_mid_videoram(*this, "mid_videoram"),
|
||||||
m_txt_videoram(*this, "txt_videoram"),
|
m_txt_videoram(*this, "txt_videoram"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_video_regs;
|
required_shared_ptr<UINT16> m_video_regs;
|
||||||
@ -62,6 +63,7 @@ public:
|
|||||||
virtual void palette_init();
|
virtual void palette_init();
|
||||||
UINT32 screen_update_pzletime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_pzletime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -211,8 +213,7 @@ WRITE16_MEMBER(pzletime_state::video_regs_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(pzletime_state::oki_bank_w)
|
WRITE16_MEMBER(pzletime_state::oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * (data & 0x3));
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 0x3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_INPUT_MEMBER(pzletime_state::ticket_status_r)
|
CUSTOM_INPUT_MEMBER(pzletime_state::ticket_status_r)
|
||||||
|
@ -106,7 +106,7 @@ WRITE16_MEMBER(rampart_state::latch_w)
|
|||||||
{
|
{
|
||||||
set_oki6295_volume((data & 0x0020) ? 100 : 0);
|
set_oki6295_volume((data & 0x0020) ? 100 : 0);
|
||||||
if (!(data & 0x0010))
|
if (!(data & 0x0010))
|
||||||
machine().device("oki")->reset();
|
m_oki->reset();
|
||||||
set_ym2413_volume(((data >> 1) & 7) * 100 / 7);
|
set_ym2413_volume(((data >> 1) & 7) * 100 / 7);
|
||||||
if (!(data & 0x0001))
|
if (!(data & 0x0001))
|
||||||
machine().device("ymsnd")->reset();
|
machine().device("ymsnd")->reset();
|
||||||
|
@ -588,21 +588,19 @@ READ32_MEMBER(seta2_state::funcube_debug_r)
|
|||||||
|
|
||||||
READ32_MEMBER(seta2_state::oki_read)
|
READ32_MEMBER(seta2_state::oki_read)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
return m_oki->read_status() << 16;
|
||||||
return downcast<okim9810_device *>(device)->read_status() << 16;
|
|
||||||
}
|
}
|
||||||
WRITE32_MEMBER(seta2_state::oki_write)
|
WRITE32_MEMBER(seta2_state::oki_write)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
const UINT8 tmp = (data & 0x000000ff);
|
const UINT8 tmp = (data & 0x000000ff);
|
||||||
downcast<okim9810_device *>(device)->write_TMP_register(tmp);
|
m_oki->write_TMP_register(tmp);
|
||||||
}
|
}
|
||||||
else if (ACCESSING_BITS_16_23)
|
else if (ACCESSING_BITS_16_23)
|
||||||
{
|
{
|
||||||
const UINT8 cmd = (data & 0x00ff0000) >> 16;
|
const UINT8 cmd = (data & 0x00ff0000) >> 16;
|
||||||
downcast<okim9810_device *>(device)->write_command(cmd);
|
m_oki->write_command(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,8 +390,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
WRITE8_MEMBER(shadfrce_state::oki_bankswitch_w)
|
WRITE8_MEMBER(shadfrce_state::oki_bankswitch_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base((data & 1) * 0x40000);
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 1) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( shadfrce_sound_map, AS_PROGRAM, 8, shadfrce_state )
|
static ADDRESS_MAP_START( shadfrce_sound_map, AS_PROGRAM, 8, shadfrce_state )
|
||||||
|
@ -351,12 +351,11 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
WRITE8_MEMBER(snowbros_state::twinadv_oki_bank_w)
|
WRITE8_MEMBER(snowbros_state::twinadv_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
int bank = (data &0x02)>>1;
|
int bank = (data &0x02)>>1;
|
||||||
|
|
||||||
if (data&0xfd) logerror ("Unused bank bits! %02x\n",data);
|
if (data&0xfd) logerror ("Unused bank bits! %02x\n",data);
|
||||||
|
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(bank * 0x40000);
|
m_oki->set_bank_base(bank * 0x40000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( twinadv_sound_io_map, AS_IO, 8, snowbros_state )
|
static ADDRESS_MAP_START( twinadv_sound_io_map, AS_IO, 8, snowbros_state )
|
||||||
@ -471,12 +470,10 @@ void snowbros_state::sb3_play_sound (okim6295_device *oki, int data)
|
|||||||
|
|
||||||
WRITE16_MEMBER(snowbros_state::sb3_sound_w)
|
WRITE16_MEMBER(snowbros_state::sb3_sound_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
|
||||||
if (data == 0x00fe)
|
if (data == 0x00fe)
|
||||||
{
|
{
|
||||||
m_sb3_music_is_playing = 0;
|
m_sb3_music_is_playing = 0;
|
||||||
oki->write_command(0x78); /* Stop sounds */
|
m_oki->write_command(0x78); /* Stop sounds */
|
||||||
}
|
}
|
||||||
else /* the alternating 0x00-0x2f or 0x30-0x5f might be something to do with the channels */
|
else /* the alternating 0x00-0x2f or 0x30-0x5f might be something to do with the channels */
|
||||||
{
|
{
|
||||||
@ -484,7 +481,7 @@ WRITE16_MEMBER(snowbros_state::sb3_sound_w)
|
|||||||
|
|
||||||
if (data <= 0x21)
|
if (data <= 0x21)
|
||||||
{
|
{
|
||||||
sb3_play_sound(oki, data);
|
sb3_play_sound(m_oki, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data>=0x22 && data<=0x31)
|
if (data>=0x22 && data<=0x31)
|
||||||
@ -494,7 +491,7 @@ WRITE16_MEMBER(snowbros_state::sb3_sound_w)
|
|||||||
|
|
||||||
if ((data>=0x30) && (data<=0x51))
|
if ((data>=0x30) && (data<=0x51))
|
||||||
{
|
{
|
||||||
sb3_play_sound(oki, data-0x30);
|
sb3_play_sound(m_oki, data-0x30);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data>=0x52 && data<=0x5f)
|
if (data>=0x52 && data<=0x5f)
|
||||||
|
@ -98,8 +98,7 @@ WRITE8_MEMBER(speedspn_state::speedspn_sound_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(speedspn_state::oki_banking_w)
|
WRITE8_MEMBER(speedspn_state::oki_banking_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * (data & 3));
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** MEMORY MAPS *************************************************************/
|
/*** MEMORY MAPS *************************************************************/
|
||||||
|
@ -295,7 +295,6 @@ static void sslam_play(device_t *device, int track, int data)
|
|||||||
|
|
||||||
WRITE16_MEMBER(sslam_state::sslam_snd_w)
|
WRITE16_MEMBER(sslam_state::sslam_snd_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
logerror("%s Writing %04x to Sound CPU\n",machine().describe_context(),data);
|
logerror("%s Writing %04x to Sound CPU\n",machine().describe_context(),data);
|
||||||
@ -303,7 +302,7 @@ WRITE16_MEMBER(sslam_state::sslam_snd_w)
|
|||||||
if (data == 0xfe) {
|
if (data == 0xfe) {
|
||||||
/* This should reset the sound MCU and stop audio playback, but here, it */
|
/* This should reset the sound MCU and stop audio playback, but here, it */
|
||||||
/* chops the first coin insert. So let's only stop any playing melodies. */
|
/* chops the first coin insert. So let's only stop any playing melodies. */
|
||||||
sslam_play(device, 1, (0x80 | 0x40)); /* Stop playing the melody */
|
sslam_play(m_oki, 1, (0x80 | 0x40)); /* Stop playing the melody */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logerror("Unknown command (%02x) sent to the Sound controller\n",data);
|
logerror("Unknown command (%02x) sent to the Sound controller\n",data);
|
||||||
@ -323,13 +322,13 @@ WRITE16_MEMBER(sslam_state::sslam_snd_w)
|
|||||||
else if (m_sound >= 0x70) {
|
else if (m_sound >= 0x70) {
|
||||||
/* These vocals are in bank 1, but a bug in the actual MCU doesn't set the bank */
|
/* These vocals are in bank 1, but a bug in the actual MCU doesn't set the bank */
|
||||||
// if (m_snd_bank != 1)
|
// if (m_snd_bank != 1)
|
||||||
// downcast<okim6295_device *>(device)->set_bank_base((1 * 0x40000));
|
// m_oki->set_bank_base((1 * 0x40000));
|
||||||
// sslam_snd_bank = 1;
|
// sslam_snd_bank = 1;
|
||||||
sslam_play(device, 0, m_sound);
|
sslam_play(m_oki, 0, m_sound);
|
||||||
}
|
}
|
||||||
else if (m_sound >= 0x69) {
|
else if (m_sound >= 0x69) {
|
||||||
if (m_snd_bank != 2)
|
if (m_snd_bank != 2)
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(2 * 0x40000);
|
m_oki->set_bank_base(2 * 0x40000);
|
||||||
m_snd_bank = 2;
|
m_snd_bank = 2;
|
||||||
switch (m_sound)
|
switch (m_sound)
|
||||||
{
|
{
|
||||||
@ -338,18 +337,18 @@ WRITE16_MEMBER(sslam_state::sslam_snd_w)
|
|||||||
case 0x6c: m_melody = 7; break;
|
case 0x6c: m_melody = 7; break;
|
||||||
default: m_melody = 0; m_bar = 0; break; /* Invalid */
|
default: m_melody = 0; m_bar = 0; break; /* Invalid */
|
||||||
}
|
}
|
||||||
sslam_play(device, m_melody, m_sound);
|
sslam_play(m_oki, m_melody, m_sound);
|
||||||
}
|
}
|
||||||
else if (m_sound >= 0x65) {
|
else if (m_sound >= 0x65) {
|
||||||
if (m_snd_bank != 1)
|
if (m_snd_bank != 1)
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(1 * 0x40000);
|
m_oki->set_bank_base(1 * 0x40000);
|
||||||
m_snd_bank = 1;
|
m_snd_bank = 1;
|
||||||
m_melody = 4;
|
m_melody = 4;
|
||||||
sslam_play(device, m_melody, m_sound);
|
sslam_play(m_oki, m_melody, m_sound);
|
||||||
}
|
}
|
||||||
else if (m_sound >= 0x60) {
|
else if (m_sound >= 0x60) {
|
||||||
if (m_snd_bank != 0)
|
if (m_snd_bank != 0)
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0 * 0x40000);
|
m_oki->set_bank_base(0 * 0x40000);
|
||||||
m_snd_bank = 0;
|
m_snd_bank = 0;
|
||||||
switch (m_sound)
|
switch (m_sound)
|
||||||
{
|
{
|
||||||
@ -358,10 +357,10 @@ WRITE16_MEMBER(sslam_state::sslam_snd_w)
|
|||||||
case 0x64: m_melody = 3; break;
|
case 0x64: m_melody = 3; break;
|
||||||
default: m_melody = 0; m_bar = 0; break; /* Invalid */
|
default: m_melody = 0; m_bar = 0; break; /* Invalid */
|
||||||
}
|
}
|
||||||
sslam_play(device, m_melody, m_sound);
|
sslam_play(m_oki, m_melody, m_sound);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sslam_play(device, 0, m_sound);
|
sslam_play(m_oki, 0, m_sound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,7 @@ WRITE16_MEMBER(stlforce_state::eeprom_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(stlforce_state::oki_bank_w)
|
WRITE16_MEMBER(stlforce_state::oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * ((data>>8) & 3));
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * ((data>>8) & 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( stlforce_map, AS_PROGRAM, 16, stlforce_state )
|
static ADDRESS_MAP_START( stlforce_map, AS_PROGRAM, 16, stlforce_state )
|
||||||
|
@ -81,7 +81,8 @@ public:
|
|||||||
m_outputs16(*this, "outputs16"),
|
m_outputs16(*this, "outputs16"),
|
||||||
m_outputs(*this, "outputs"),
|
m_outputs(*this, "outputs"),
|
||||||
m_am188em_regs(*this, "am188em_regs"),
|
m_am188em_regs(*this, "am188em_regs"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
UINT8 *m_hm86171_colorram;
|
UINT8 *m_hm86171_colorram;
|
||||||
layer_t m_layers[2];
|
layer_t m_layers[2];
|
||||||
@ -170,6 +171,7 @@ public:
|
|||||||
TIMER_DEVICE_CALLBACK_MEMBER(am188em_timer2_irq);
|
TIMER_DEVICE_CALLBACK_MEMBER(am188em_timer2_irq);
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(h8_timer_irq);
|
TIMER_DEVICE_CALLBACK_MEMBER(h8_timer_irq);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -819,18 +821,14 @@ READ8_MEMBER(subsino2_state::vblank_bit6_r)
|
|||||||
|
|
||||||
WRITE8_MEMBER(subsino2_state::oki_bank_bit0_w)
|
WRITE8_MEMBER(subsino2_state::oki_bank_bit0_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
// it writes 0x32 or 0x33
|
// it writes 0x32 or 0x33
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base((data & 1) * 0x40000);
|
||||||
oki->set_bank_base((data & 1) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE8_MEMBER(subsino2_state::oki_bank_bit4_w)
|
WRITE8_MEMBER(subsino2_state::oki_bank_bit4_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
// it writes 0x23 or 0x33
|
// it writes 0x23 or 0x33
|
||||||
okim6295_device *oki = downcast<okim6295_device *>(device);
|
m_oki->set_bank_base(((data >> 4) & 1) * 0x40000);
|
||||||
oki->set_bank_base(((data >> 4) & 1) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@ public:
|
|||||||
m_tlc34076(*this, "tlc34076"),
|
m_tlc34076(*this, "tlc34076"),
|
||||||
m_vram(*this, "vram"),
|
m_vram(*this, "vram"),
|
||||||
m_control(*this, "control"),
|
m_control(*this, "control"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_device<tlc34076_device> m_tlc34076;
|
required_device<tlc34076_device> m_tlc34076;
|
||||||
required_shared_ptr<UINT16> m_vram;
|
required_shared_ptr<UINT16> m_vram;
|
||||||
@ -63,6 +64,7 @@ public:
|
|||||||
TIMER_CALLBACK_MEMBER(clear_gun_interrupt);
|
TIMER_CALLBACK_MEMBER(clear_gun_interrupt);
|
||||||
TIMER_CALLBACK_MEMBER(setup_gun_interrupts);
|
TIMER_CALLBACK_MEMBER(setup_gun_interrupts);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -355,23 +357,22 @@ WRITE16_MEMBER(tickee_state::rapidfir_control_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(tickee_state::sound_bank_w)
|
WRITE16_MEMBER(tickee_state::sound_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
switch (data & 0xff)
|
switch (data & 0xff)
|
||||||
{
|
{
|
||||||
case 0x2c:
|
case 0x2c:
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x00000);
|
m_oki->set_bank_base(0x00000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2d:
|
case 0x2d:
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000);
|
m_oki->set_bank_base(0x40000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x1c:
|
case 0x1c:
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x80000);
|
m_oki->set_bank_base(0x80000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x1d:
|
case 0x1d:
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0xc0000);
|
m_oki->set_bank_base(0xc0000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -124,12 +124,14 @@ public:
|
|||||||
m_maincpu(*this,"maincpu"),
|
m_maincpu(*this,"maincpu"),
|
||||||
m_microtouch(*this,"microtouch"),
|
m_microtouch(*this,"microtouch"),
|
||||||
m_regs(*this, "regs"),
|
m_regs(*this, "regs"),
|
||||||
m_galgames_ram(*this, "galgames_ram"){ }
|
m_galgames_ram(*this, "galgames_ram"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<microtouch_device> m_microtouch;
|
optional_device<microtouch_device> m_microtouch;
|
||||||
required_shared_ptr<UINT16> m_regs;
|
required_shared_ptr<UINT16> m_regs;
|
||||||
optional_shared_ptr<UINT16> m_galgames_ram;
|
optional_shared_ptr<UINT16> m_galgames_ram;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
|
|
||||||
int m_okibank;
|
int m_okibank;
|
||||||
UINT8 m_rtc_ram[8];
|
UINT8 m_rtc_ram[8];
|
||||||
@ -201,12 +203,11 @@ public:
|
|||||||
|
|
||||||
WRITE16_MEMBER(tmaster_state::tmaster_oki_bank_w)
|
WRITE16_MEMBER(tmaster_state::tmaster_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_8_15)
|
if (ACCESSING_BITS_8_15)
|
||||||
{
|
{
|
||||||
// data & 0x0800?
|
// data & 0x0800?
|
||||||
m_okibank = ((data >> 8) & 3);
|
m_okibank = ((data >> 8) & 3);
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(m_okibank * 0x40000);
|
m_oki->set_bank_base(m_okibank * 0x40000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
|
@ -746,10 +746,9 @@ WRITE16_MEMBER(toaplan2_state::fixeight_subcpu_ctrl_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(toaplan2_state::oki_bankswitch_w)
|
WRITE16_MEMBER(toaplan2_state::oki_bankswitch_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_0_7)
|
if (ACCESSING_BITS_0_7)
|
||||||
{
|
{
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 1) * 0x40000);
|
m_oki->set_bank_base((data & 1) * 0x40000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,8 +605,6 @@ void tumbleb_state::process_tumbleb2_music_command( okim6295_device *oki, int da
|
|||||||
|
|
||||||
WRITE16_MEMBER(tumbleb_state::tumbleb2_soundmcu_w)
|
WRITE16_MEMBER(tumbleb_state::tumbleb2_soundmcu_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
|
|
||||||
int sound = tumbleb_sound_lookup[data & 0xff];
|
int sound = tumbleb_sound_lookup[data & 0xff];
|
||||||
|
|
||||||
if (sound == 0x00)
|
if (sound == 0x00)
|
||||||
@ -616,11 +614,11 @@ WRITE16_MEMBER(tumbleb_state::tumbleb2_soundmcu_w)
|
|||||||
}
|
}
|
||||||
else if (sound == -2)
|
else if (sound == -2)
|
||||||
{
|
{
|
||||||
process_tumbleb2_music_command(downcast<okim6295_device *>(device), data);
|
process_tumbleb2_music_command(m_oki, data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tumbleb2_play_sound(downcast<okim6295_device *>(device), sound);
|
tumbleb2_play_sound(m_oki, sound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1944,8 +1942,6 @@ GFXDECODE_END
|
|||||||
|
|
||||||
MACHINE_START_MEMBER(tumbleb_state,tumbleb)
|
MACHINE_START_MEMBER(tumbleb_state,tumbleb)
|
||||||
{
|
{
|
||||||
m_oki = machine().device("oki");
|
|
||||||
|
|
||||||
save_item(NAME(m_music_command));
|
save_item(NAME(m_music_command));
|
||||||
save_item(NAME(m_music_bank));
|
save_item(NAME(m_music_bank));
|
||||||
save_item(NAME(m_music_is_playing));
|
save_item(NAME(m_music_is_playing));
|
||||||
|
@ -49,12 +49,11 @@ Year + Game PCB Notes
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
WRITE16_MEMBER(unico_state::burglarx_sound_bank_w)
|
WRITE16_MEMBER(unico_state::burglarx_sound_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if (ACCESSING_BITS_8_15)
|
if (ACCESSING_BITS_8_15)
|
||||||
{
|
{
|
||||||
int bank = (data >> 8 ) & 1;
|
int bank = (data >> 8 ) & 1;
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * bank );
|
m_oki->set_bank_base(0x40000 * bank );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,8 @@ public:
|
|||||||
m_wram(*this,"wram"),
|
m_wram(*this,"wram"),
|
||||||
m_tiles32(*this,"tiles32"),
|
m_tiles32(*this,"tiles32"),
|
||||||
m_wram32(*this,"wram32"),
|
m_wram32(*this,"wram32"),
|
||||||
m_maincpu(*this, "maincpu") {
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") {
|
||||||
m_has_extra_gfx = 0;
|
m_has_extra_gfx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,6 +168,7 @@ public:
|
|||||||
UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
UINT32 screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
READ16_MEMBER(vamphalf_state::eeprom_r)
|
READ16_MEMBER(vamphalf_state::eeprom_r)
|
||||||
@ -288,8 +290,7 @@ F94B
|
|||||||
|
|
||||||
WRITE32_MEMBER(vamphalf_state::finalgdr_oki_bank_w)
|
WRITE32_MEMBER(vamphalf_state::finalgdr_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base(0x40000 * ((data & 0x300) >> 8));
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * ((data & 0x300) >> 8));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE32_MEMBER(vamphalf_state::finalgdr_backupram_bank_w)
|
WRITE32_MEMBER(vamphalf_state::finalgdr_backupram_bank_w)
|
||||||
@ -333,9 +334,8 @@ WRITE32_MEMBER(vamphalf_state::aoh_oki_bank_w)
|
|||||||
|
|
||||||
WRITE16_MEMBER(vamphalf_state::boonggab_oki_bank_w)
|
WRITE16_MEMBER(vamphalf_state::boonggab_oki_bank_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
|
||||||
if(offset)
|
if(offset)
|
||||||
downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 0x7));
|
m_oki->set_bank_base(0x40000 * (data & 0x7));
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(vamphalf_state::boonggab_prize_w)
|
WRITE16_MEMBER(vamphalf_state::boonggab_prize_w)
|
||||||
|
@ -158,8 +158,7 @@ WRITE16_MEMBER(wwfwfest_state::wwfwfest_scroll_write)
|
|||||||
|
|
||||||
WRITE8_MEMBER(wwfwfest_state::oki_bankswitch_w)
|
WRITE8_MEMBER(wwfwfest_state::oki_bankswitch_w)
|
||||||
{
|
{
|
||||||
device_t *device = machine().device("oki");
|
m_oki->set_bank_base((data & 1) * 0x40000);
|
||||||
downcast<okim6295_device *>(device)->set_bank_base((data & 1) * 0x40000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(wwfwfest_state::wwfwfest_soundwrite)
|
WRITE16_MEMBER(wwfwfest_state::wwfwfest_soundwrite)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "video/vsystem_spr.h"
|
#include "video/vsystem_spr.h"
|
||||||
#include "video/vsystem_spr2.h"
|
#include "video/vsystem_spr2.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class aerofgt_state : public driver_device
|
class aerofgt_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -18,7 +19,8 @@ public:
|
|||||||
m_spr_old(*this, "vsystem_spr_old"),
|
m_spr_old(*this, "vsystem_spr_old"),
|
||||||
m_spr_old2(*this, "vsystem_spr_ol2"),
|
m_spr_old2(*this, "vsystem_spr_ol2"),
|
||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_bg1videoram;
|
required_shared_ptr<UINT16> m_bg1videoram;
|
||||||
@ -121,4 +123,5 @@ public:
|
|||||||
void wbbc97_draw_bitmap( bitmap_rgb32 &bitmap );
|
void wbbc97_draw_bitmap( bitmap_rgb32 &bitmap );
|
||||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "sound/msm5205.h"
|
#include "sound/msm5205.h"
|
||||||
#include "sound/qsound.h"
|
#include "sound/qsound.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
struct gfx_range
|
struct gfx_range
|
||||||
{
|
{
|
||||||
@ -75,7 +76,8 @@ public:
|
|||||||
m_objram2(*this, "objram2"),
|
m_objram2(*this, "objram2"),
|
||||||
m_output(*this, "output"),
|
m_output(*this, "output"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu")
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
@ -164,6 +166,7 @@ public:
|
|||||||
/* devices */
|
/* devices */
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<cpu_device> m_audiocpu;
|
optional_device<cpu_device> m_audiocpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
msm5205_device *m_msm_1; // fcrash
|
msm5205_device *m_msm_1; // fcrash
|
||||||
msm5205_device *m_msm_2; // fcrash
|
msm5205_device *m_msm_2; // fcrash
|
||||||
DECLARE_READ16_MEMBER(cps1_hack_dsw_r);
|
DECLARE_READ16_MEMBER(cps1_hack_dsw_r);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Double Dragon 3 & The Combatribes
|
Double Dragon 3 & The Combatribes
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class ddragon3_state : public driver_device
|
class ddragon3_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -14,7 +14,8 @@ public:
|
|||||||
m_fg_videoram(*this, "fg_videoram"),
|
m_fg_videoram(*this, "fg_videoram"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu"){ }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_bg_videoram;
|
required_shared_ptr<UINT16> m_bg_videoram;
|
||||||
@ -38,6 +39,8 @@ public:
|
|||||||
/* devices */
|
/* devices */
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
|
|
||||||
DECLARE_WRITE16_MEMBER(ddragon3_io_w);
|
DECLARE_WRITE16_MEMBER(ddragon3_io_w);
|
||||||
DECLARE_WRITE16_MEMBER(ddragon3_scroll_w);
|
DECLARE_WRITE16_MEMBER(ddragon3_scroll_w);
|
||||||
DECLARE_READ16_MEMBER(ddragon3_scroll_r);
|
DECLARE_READ16_MEMBER(ddragon3_scroll_r);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Deniam games
|
Deniam games
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class deniam_state : public driver_device
|
class deniam_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -15,7 +15,8 @@ public:
|
|||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_paletteram(*this, "paletteram"),
|
m_paletteram(*this, "paletteram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_videoram;
|
required_shared_ptr<UINT16> m_videoram;
|
||||||
@ -69,4 +70,5 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<cpu_device> m_audiocpu; // system 16c does not have sound CPU
|
optional_device<cpu_device> m_audiocpu; // system 16c does not have sound CPU
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class funybubl_state : public driver_device
|
class funybubl_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -7,7 +7,8 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_paletteram(*this, "paletteram"),
|
m_paletteram(*this, "paletteram"),
|
||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT8> m_paletteram;
|
required_shared_ptr<UINT8> m_paletteram;
|
||||||
@ -27,4 +28,5 @@ public:
|
|||||||
UINT32 screen_update_funybubl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_funybubl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class fuuki16_state : public driver_device
|
class fuuki16_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -11,7 +11,8 @@ public:
|
|||||||
m_unknown(*this, "unknown"),
|
m_unknown(*this, "unknown"),
|
||||||
m_priority(*this, "priority"),
|
m_priority(*this, "priority"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu"){ }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr_array<UINT16,4> m_vram;
|
required_shared_ptr_array<UINT16,4> m_vram;
|
||||||
@ -54,4 +55,5 @@ public:
|
|||||||
void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
void fuuki16_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri );
|
void fuuki16_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri );
|
||||||
DECLARE_WRITE_LINE_MEMBER(soundirq);
|
DECLARE_WRITE_LINE_MEMBER(soundirq);
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Gotcha
|
Gotcha
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#include "sound/okim6295.h"
|
||||||
#include "video/decospr.h"
|
#include "video/decospr.h"
|
||||||
|
|
||||||
class gotcha_state : public driver_device
|
class gotcha_state : public driver_device
|
||||||
@ -16,7 +16,8 @@ public:
|
|||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_sprgen(*this, "spritegen"),
|
m_sprgen(*this, "spritegen"),
|
||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_fgvideoram;
|
required_shared_ptr<UINT16> m_fgvideoram;
|
||||||
@ -50,4 +51,5 @@ public:
|
|||||||
UINT32 screen_update_gotcha(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_gotcha(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
inline void get_tile_info( tile_data &tileinfo, int tile_index ,UINT16 *vram, int color_offs);
|
inline void get_tile_info( tile_data &tileinfo, int tile_index ,UINT16 *vram, int color_offs);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "video/kaneko_spr.h"
|
#include "video/kaneko_spr.h"
|
||||||
#include "machine/kaneko_calc3.h"
|
#include "machine/kaneko_calc3.h"
|
||||||
#include "machine/kaneko_toybox.h"
|
#include "machine/kaneko_toybox.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +27,8 @@ public:
|
|||||||
m_view2_0(*this, "view2_0"),
|
m_view2_0(*this, "view2_0"),
|
||||||
m_view2_1(*this, "view2_1"),
|
m_view2_1(*this, "view2_1"),
|
||||||
m_kaneko_spr(*this, "kan_spr"),
|
m_kaneko_spr(*this, "kan_spr"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_shared_ptr<UINT16> m_spriteram;
|
optional_shared_ptr<UINT16> m_spriteram;
|
||||||
@ -72,6 +73,7 @@ public:
|
|||||||
void kaneko16_unscramble_tiles(const char *region);
|
void kaneko16_unscramble_tiles(const char *region);
|
||||||
void kaneko16_expand_sample_banks(const char *region);
|
void kaneko16_expand_sample_banks(const char *region);
|
||||||
optional_device<cpu_device> m_audiocpu;
|
optional_device<cpu_device> m_audiocpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
class kaneko16_gtmr_state : public kaneko16_state
|
class kaneko16_gtmr_state : public kaneko16_state
|
||||||
|
@ -19,7 +19,8 @@ public:
|
|||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_adpcm(*this, "oki"),
|
m_adpcm(*this, "oki"),
|
||||||
m_eeprom(*this, "eeprom") ,
|
m_eeprom(*this, "eeprom") ,
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_fgram;
|
required_shared_ptr<UINT16> m_fgram;
|
||||||
@ -80,4 +81,5 @@ public:
|
|||||||
void kickgoal_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
void kickgoal_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||||
void kickgoal_play(okim6295_device *oki, int melody, int data);
|
void kickgoal_play(okim6295_device *oki, int melody, int data);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class legionna_state : public driver_device
|
class legionna_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -9,7 +11,8 @@ public:
|
|||||||
m_mid_data(*this, "mid_data"),
|
m_mid_data(*this, "mid_data"),
|
||||||
m_textram(*this, "textram"),
|
m_textram(*this, "textram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_shared_ptr<UINT16> m_spriteram;
|
required_shared_ptr<UINT16> m_spriteram;
|
||||||
required_shared_ptr<UINT16> m_back_data;
|
required_shared_ptr<UINT16> m_back_data;
|
||||||
@ -58,6 +61,7 @@ public:
|
|||||||
void descramble_legionnaire_gfx(UINT8* src);
|
void descramble_legionnaire_gfx(UINT8* src);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in video/legionna.c -----------*/
|
/*----------- defined in video/legionna.c -----------*/
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-= IGS Lord Of Gun =-
|
-= IGS Lord Of Gun =-
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
struct lordgun_gun_data
|
struct lordgun_gun_data
|
||||||
{
|
{
|
||||||
@ -22,7 +23,8 @@ public:
|
|||||||
m_scroll_x(*this, "scroll_x"),
|
m_scroll_x(*this, "scroll_x"),
|
||||||
m_scroll_y(*this, "scroll_y") ,
|
m_scroll_y(*this, "scroll_y") ,
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_soundcpu(*this, "soundcpu") { }
|
m_soundcpu(*this, "soundcpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_shared_ptr<UINT16> m_priority_ram;
|
required_shared_ptr<UINT16> m_priority_ram;
|
||||||
required_shared_ptr<UINT16> m_scrollram;
|
required_shared_ptr<UINT16> m_scrollram;
|
||||||
@ -78,6 +80,7 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER(soundirq);
|
DECLARE_WRITE_LINE_MEMBER(soundirq);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_soundcpu;
|
required_device<cpu_device> m_soundcpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in video/lordgun.c -----------*/
|
/*----------- defined in video/lordgun.c -----------*/
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "video/bufsprite.h"
|
#include "video/bufsprite.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
struct pf_layer_info
|
struct pf_layer_info
|
||||||
{
|
{
|
||||||
@ -23,7 +24,8 @@ public:
|
|||||||
m_vram_data(*this, "vram_data"),
|
m_vram_data(*this, "vram_data"),
|
||||||
m_spritecontrol(*this, "spritecontrol"),
|
m_spritecontrol(*this, "spritecontrol"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_soundcpu(*this, "soundcpu")
|
m_soundcpu(*this, "soundcpu"),
|
||||||
|
m_oki(*this, "oki")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
required_device<buffered_spriteram16_device> m_spriteram;
|
required_device<buffered_spriteram16_device> m_spriteram;
|
||||||
@ -84,6 +86,7 @@ public:
|
|||||||
void m92_update_scroll_positions();
|
void m92_update_scroll_positions();
|
||||||
void m92_draw_tiles(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
void m92_draw_tiles(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||||
void m92_sprite_interrupt();
|
void m92_sprite_interrupt();
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in drivers/m92.c -----------*/
|
/*----------- defined in drivers/m92.c -----------*/
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "cpu/tms34010/tms34010.h"
|
#include "cpu/tms34010/tms34010.h"
|
||||||
#include "audio/williams.h"
|
#include "audio/williams.h"
|
||||||
#include "machine/nvram.h"
|
#include "machine/nvram.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
/* protection data types */
|
/* protection data types */
|
||||||
struct protection_data
|
struct protection_data
|
||||||
@ -38,7 +39,8 @@ public:
|
|||||||
m_adpcm_sound(*this, "adpcm"),
|
m_adpcm_sound(*this, "adpcm"),
|
||||||
m_gfx_rom(*this, "gfx_rom", 16) ,
|
m_gfx_rom(*this, "gfx_rom", 16) ,
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
optional_device<williams_narc_sound_device> m_narc_sound;
|
optional_device<williams_narc_sound_device> m_narc_sound;
|
||||||
optional_device<williams_cvsd_sound_device> m_cvsd_sound;
|
optional_device<williams_cvsd_sound_device> m_cvsd_sound;
|
||||||
@ -113,6 +115,7 @@ public:
|
|||||||
TIMER_CALLBACK_MEMBER(autoerase_line);
|
TIMER_CALLBACK_MEMBER(autoerase_line);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<cpu_device> m_audiocpu;
|
optional_device<cpu_device> m_audiocpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
/*----------- defined in video/midyunit.c -----------*/
|
/*----------- defined in video/midyunit.c -----------*/
|
||||||
void midyunit_to_shiftreg(address_space &space, UINT32 address, UINT16 *shiftreg);
|
void midyunit_to_shiftreg(address_space &space, UINT32 address, UINT16 *shiftreg);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
Wild West C.O.W.boys of Moo Mesa / Bucky O'Hare
|
Wild West C.O.W.boys of Moo Mesa / Bucky O'Hare
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class moo_state : public driver_device
|
class moo_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -12,7 +13,8 @@ public:
|
|||||||
m_workram(*this, "workram"),
|
m_workram(*this, "workram"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_soundcpu(*this, "soundcpu"){ }
|
m_soundcpu(*this, "soundcpu"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
optional_shared_ptr<UINT16> m_workram;
|
optional_shared_ptr<UINT16> m_workram;
|
||||||
@ -33,6 +35,7 @@ public:
|
|||||||
/* devices */
|
/* devices */
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<cpu_device> m_soundcpu;
|
optional_device<cpu_device> m_soundcpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
device_t *m_k054539;
|
device_t *m_k054539;
|
||||||
device_t *m_k053246;
|
device_t *m_k053246;
|
||||||
device_t *m_k053251;
|
device_t *m_k053251;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class oneshot_state : public driver_device
|
class oneshot_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -10,7 +11,8 @@ public:
|
|||||||
m_fg_videoram(*this, "fg_videoram"),
|
m_fg_videoram(*this, "fg_videoram"),
|
||||||
m_scroll(*this, "scroll"),
|
m_scroll(*this, "scroll"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu"){ }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_sprites;
|
required_shared_ptr<UINT16> m_sprites;
|
||||||
@ -56,4 +58,5 @@ public:
|
|||||||
void draw_crosshairs( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_crosshairs( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
Othello Derby
|
Othello Derby
|
||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
#define OTHLDRBY_VREG_SIZE 18
|
#define OTHLDRBY_VREG_SIZE 18
|
||||||
|
|
||||||
@ -11,7 +12,8 @@ class othldrby_state : public driver_device
|
|||||||
public:
|
public:
|
||||||
othldrby_state(const machine_config &mconfig, device_type type, const char *tag)
|
othldrby_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag) ,
|
: driver_device(mconfig, type, tag) ,
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
UINT16 * m_vram;
|
UINT16 * m_vram;
|
||||||
@ -47,4 +49,5 @@ public:
|
|||||||
inline void get_tile_info( tile_data &tileinfo, int tile_index, int plane );
|
inline void get_tile_info( tile_data &tileinfo, int tile_index, int plane );
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority );
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -5,13 +5,15 @@
|
|||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "machine/atarigen.h"
|
#include "machine/atarigen.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class rampart_state : public atarigen_state
|
class rampart_state : public atarigen_state
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
rampart_state(const machine_config &mconfig, device_type type, const char *tag)
|
rampart_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: atarigen_state(mconfig, type, tag),
|
: atarigen_state(mconfig, type, tag),
|
||||||
m_bitmap(*this, "bitmap") { }
|
m_bitmap(*this, "bitmap"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_shared_ptr<UINT16> m_bitmap;
|
required_shared_ptr<UINT16> m_bitmap;
|
||||||
UINT8 m_has_mo;
|
UINT8 m_has_mo;
|
||||||
@ -24,4 +26,5 @@ public:
|
|||||||
DECLARE_VIDEO_START(rampart);
|
DECLARE_VIDEO_START(rampart);
|
||||||
UINT32 screen_update_rampart(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_rampart(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void rampart_bitmap_render(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void rampart_bitmap_render(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim9810.h"
|
||||||
|
|
||||||
class seta2_state : public driver_device
|
class seta2_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -9,7 +11,8 @@ public:
|
|||||||
m_vregs(*this, "vregs", 0),
|
m_vregs(*this, "vregs", 0),
|
||||||
m_coldfire_regs(*this, "coldfire_regs"),
|
m_coldfire_regs(*this, "coldfire_regs"),
|
||||||
m_funcube_outputs(*this, "funcube_outputs"),
|
m_funcube_outputs(*this, "funcube_outputs"),
|
||||||
m_funcube_leds(*this, "funcube_leds"){ }
|
m_funcube_leds(*this, "funcube_leds"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_shared_ptr<UINT16> m_nvram;
|
optional_shared_ptr<UINT16> m_nvram;
|
||||||
@ -77,4 +80,5 @@ public:
|
|||||||
TIMER_DEVICE_CALLBACK_MEMBER(funcube_interrupt);
|
TIMER_DEVICE_CALLBACK_MEMBER(funcube_interrupt);
|
||||||
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||||
void funcube_debug_outputs();
|
void funcube_debug_outputs();
|
||||||
|
optional_device<okim9810_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class shadfrce_state : public driver_device
|
class shadfrce_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -8,7 +10,8 @@ public:
|
|||||||
m_bg1videoram(*this, "bg1videoram"),
|
m_bg1videoram(*this, "bg1videoram"),
|
||||||
m_spvideoram(*this, "spvideoram"),
|
m_spvideoram(*this, "spvideoram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
tilemap_t *m_fgtilemap;
|
tilemap_t *m_fgtilemap;
|
||||||
tilemap_t *m_bg0tilemap;
|
tilemap_t *m_bg0tilemap;
|
||||||
@ -50,4 +53,5 @@ public:
|
|||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,8 @@ public:
|
|||||||
m_hyperpac_ram(*this, "hyperpac_ram"),
|
m_hyperpac_ram(*this, "hyperpac_ram"),
|
||||||
m_bootleg_spriteram16(*this, "spriteram16b"),
|
m_bootleg_spriteram16(*this, "spriteram16b"),
|
||||||
m_maincpu(*this,"maincpu"),
|
m_maincpu(*this,"maincpu"),
|
||||||
m_soundcpu(*this, "soundcpu"){ }
|
m_soundcpu(*this, "soundcpu"),
|
||||||
|
m_oki(*this, "oki"){ }
|
||||||
|
|
||||||
optional_shared_ptr<UINT16> m_hyperpac_ram;
|
optional_shared_ptr<UINT16> m_hyperpac_ram;
|
||||||
int m_sb3_music_is_playing;
|
int m_sb3_music_is_playing;
|
||||||
@ -57,4 +58,5 @@ public:
|
|||||||
void sb3_play_sound (okim6295_device *oki, int data);
|
void sb3_play_sound (okim6295_device *oki, int data);
|
||||||
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
DECLARE_WRITE_LINE_MEMBER(irqhandler);
|
||||||
optional_device<cpu_device> m_soundcpu;
|
optional_device<cpu_device> m_soundcpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class speedspn_state : public driver_device
|
class speedspn_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -5,7 +7,8 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_attram(*this, "attram"),
|
m_attram(*this, "attram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_shared_ptr<UINT8> m_attram;
|
required_shared_ptr<UINT8> m_attram;
|
||||||
tilemap_t *m_tilemap;
|
tilemap_t *m_tilemap;
|
||||||
@ -27,4 +30,5 @@ public:
|
|||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class sslam_state : public driver_device
|
class sslam_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -9,7 +11,8 @@ public:
|
|||||||
m_regs(*this, "regs"),
|
m_regs(*this, "regs"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
emu_timer *m_music_timer;
|
emu_timer *m_music_timer;
|
||||||
|
|
||||||
@ -58,4 +61,5 @@ public:
|
|||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class stlforce_state : public driver_device
|
class stlforce_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -12,7 +14,8 @@ public:
|
|||||||
m_mhigh_scrollram(*this, "mhigh_scrollram"),
|
m_mhigh_scrollram(*this, "mhigh_scrollram"),
|
||||||
m_vidattrram(*this, "vidattrram"),
|
m_vidattrram(*this, "vidattrram"),
|
||||||
m_spriteram(*this, "spriteram"),
|
m_spriteram(*this, "spriteram"),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
tilemap_t *m_bg_tilemap;
|
tilemap_t *m_bg_tilemap;
|
||||||
tilemap_t *m_mlow_tilemap;
|
tilemap_t *m_mlow_tilemap;
|
||||||
@ -47,4 +50,5 @@ public:
|
|||||||
UINT32 screen_update_stlforce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
UINT32 screen_update_stlforce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class tatsumi_state : public driver_device
|
class tatsumi_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -23,7 +25,8 @@ public:
|
|||||||
m_spriteram(*this, "spriteram") ,
|
m_spriteram(*this, "spriteram") ,
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
m_subcpu(*this, "sub") { }
|
m_subcpu(*this, "sub"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
optional_shared_ptr<UINT16> m_videoram;
|
optional_shared_ptr<UINT16> m_videoram;
|
||||||
optional_shared_ptr<UINT16> m_cyclwarr_cpua_ram;
|
optional_shared_ptr<UINT16> m_cyclwarr_cpua_ram;
|
||||||
@ -133,6 +136,7 @@ public:
|
|||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
required_device<cpu_device> m_subcpu;
|
required_device<cpu_device> m_subcpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------- defined in machine/tatsumi.c -----------*/
|
/*----------- defined in machine/tatsumi.c -----------*/
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// VDP related
|
// VDP related
|
||||||
#include "video/gp9001.h"
|
#include "video/gp9001.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
// Cache the CPUs and VDPs for faster access
|
// Cache the CPUs and VDPs for faster access
|
||||||
class toaplan2_state : public driver_device
|
class toaplan2_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -22,7 +22,8 @@ public:
|
|||||||
m_tx_gfxram16(*this, "tx_gfxram16"),
|
m_tx_gfxram16(*this, "tx_gfxram16"),
|
||||||
m_mainram16(*this, "mainram16"),
|
m_mainram16(*this, "mainram16"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") {
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") {
|
||||||
m_vdp0 = NULL;
|
m_vdp0 = NULL;
|
||||||
m_vdp1 = NULL;
|
m_vdp1 = NULL;
|
||||||
}
|
}
|
||||||
@ -141,4 +142,5 @@ public:
|
|||||||
DECLARE_WRITE_LINE_MEMBER(bbakraid_irqhandler);
|
DECLARE_WRITE_LINE_MEMBER(bbakraid_irqhandler);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<cpu_device> m_audiocpu;
|
optional_device<cpu_device> m_audiocpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,8 @@ public:
|
|||||||
m_control(*this, "control"),
|
m_control(*this, "control"),
|
||||||
m_sprgen(*this, "spritegen"),
|
m_sprgen(*this, "spritegen"),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu")
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
@ -43,7 +44,7 @@ public:
|
|||||||
/* devices */
|
/* devices */
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
optional_device<cpu_device> m_audiocpu;
|
optional_device<cpu_device> m_audiocpu;
|
||||||
device_t *m_oki;
|
required_device<okim6295_device> m_oki;
|
||||||
UINT8 m_semicom_prot_offset;
|
UINT8 m_semicom_prot_offset;
|
||||||
UINT16 m_protbase;
|
UINT16 m_protbase;
|
||||||
DECLARE_WRITE16_MEMBER(tumblepb_oki_w);
|
DECLARE_WRITE16_MEMBER(tumblepb_oki_w);
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class unico_state : public driver_device
|
class unico_state : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -8,7 +10,8 @@ public:
|
|||||||
m_vram32(*this, "vram32"),
|
m_vram32(*this, "vram32"),
|
||||||
m_scroll32(*this, "scroll32"),
|
m_scroll32(*this, "scroll32"),
|
||||||
m_spriteram(*this, "spriteram", 0),
|
m_spriteram(*this, "spriteram", 0),
|
||||||
m_maincpu(*this, "maincpu") { }
|
m_maincpu(*this, "maincpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
optional_shared_ptr<UINT16> m_vram;
|
optional_shared_ptr<UINT16> m_vram;
|
||||||
optional_shared_ptr<UINT16> m_scroll;
|
optional_shared_ptr<UINT16> m_scroll;
|
||||||
@ -46,4 +49,5 @@ public:
|
|||||||
void unico_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
void unico_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||||
void zeropnt2_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
void zeropnt2_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
optional_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "video/bufsprite.h"
|
#include "video/bufsprite.h"
|
||||||
|
#include "sound/okim6295.h"
|
||||||
|
|
||||||
class wwfwfest_state : public driver_device
|
class wwfwfest_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -10,7 +11,8 @@ public:
|
|||||||
m_bg1_videoram(*this, "bg1_videoram"),
|
m_bg1_videoram(*this, "bg1_videoram"),
|
||||||
m_spriteram(*this, "spriteram") ,
|
m_spriteram(*this, "spriteram") ,
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_audiocpu(*this, "audiocpu") { }
|
m_audiocpu(*this, "audiocpu"),
|
||||||
|
m_oki(*this, "oki") { }
|
||||||
|
|
||||||
required_shared_ptr<UINT16> m_fg0_videoram;
|
required_shared_ptr<UINT16> m_fg0_videoram;
|
||||||
required_shared_ptr<UINT16> m_bg0_videoram;
|
required_shared_ptr<UINT16> m_bg0_videoram;
|
||||||
@ -50,4 +52,5 @@ public:
|
|||||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<cpu_device> m_audiocpu;
|
required_device<cpu_device> m_audiocpu;
|
||||||
|
required_device<okim6295_device> m_oki;
|
||||||
};
|
};
|
||||||
|
@ -350,7 +350,7 @@ READ8_MEMBER(tatsumi_state::tatsumi_hack_ym2151_r)
|
|||||||
// Mame really should emulate the OKI status reads even with Mame sound off.
|
// Mame really should emulate the OKI status reads even with Mame sound off.
|
||||||
READ8_MEMBER(tatsumi_state::tatsumi_hack_oki_r)
|
READ8_MEMBER(tatsumi_state::tatsumi_hack_oki_r)
|
||||||
{
|
{
|
||||||
int r=downcast<okim6295_device *>(machine().device("oki"))->read(space,0);
|
int r=m_oki->read(space,0);
|
||||||
|
|
||||||
if (space.device().safe_pc()==0x2b70 || space.device().safe_pc()==0x2bb5
|
if (space.device().safe_pc()==0x2b70 || space.device().safe_pc()==0x2bb5
|
||||||
|| space.device().safe_pc()==0x2acc
|
|| space.device().safe_pc()==0x2acc
|
||||||
|
Loading…
Reference in New Issue
Block a user