Previous 199869 Revisions Next

r34872 Thursday 5th February, 2015 at 17:23:32 UTC by Osso
toki.c: don't know what happened with this, but thanks Haze for fixing compile (nw)
[src/mame/drivers]toki.c
[src/mame/includes]toki.h

trunk/src/mame/drivers/toki.c
r243383r243384
4242#include "sound/3812intf.h"
4343#include "includes/toki.h"
4444
45WRITE16_MEMBER(toki_state::tokib_soundcommand16_w)
45WRITE16_MEMBER(toki_state::tokib_soundcommand_w)
4646{
4747   soundlatch_byte_w(space, 0, data & 0xff);
4848   m_audiocpu->set_input_line(0, HOLD_LINE);
4949}
5050
51READ16_MEMBER(toki_state::pip16_r)
51READ16_MEMBER(toki_state::pip_r)
5252{
5353   return ~0;
5454}
5555
5656
5757
58WRITE_LINE_MEMBER(toki_state::toki_adpcm_int)
58WRITE_LINE_MEMBER(toki_state::tokib_adpcm_int)
5959{
6060   m_msm->data_w(m_msm5205next);
6161   m_msm5205next >>= 4;
r243383r243384
6565      m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
6666}
6767
68WRITE8_MEMBER(toki_state::toki_adpcm_control_w)
68WRITE8_MEMBER(toki_state::tokib_adpcm_control_w)
6969{
7070   int bankaddress;
7171   UINT8 *RAM = memregion("audiocpu")->base();
r243383r243384
7878   m_msm->reset_w(data & 0x08);
7979}
8080
81WRITE8_MEMBER(toki_state::toki_adpcm_data_w)
81WRITE8_MEMBER(toki_state::tokib_adpcm_data_w)
8282{
8383   m_msm5205next = data;
8484}
r243383r243384
114114   AM_RANGE(0x071804, 0x071807) AM_WRITENOP    /* sprite related, always 01be0100 */
115115   AM_RANGE(0x07180e, 0x071e45) AM_WRITEONLY AM_SHARE("spriteram")
116116   AM_RANGE(0x072000, 0x072001) AM_READ(watchdog_reset16_r)   /* probably */
117   AM_RANGE(0x075000, 0x075001) AM_WRITE(tokib_soundcommand16_w)
117   AM_RANGE(0x075000, 0x075001) AM_WRITE(tokib_soundcommand_w)
118118   AM_RANGE(0x075004, 0x07500b) AM_WRITEONLY AM_SHARE("scrollram")
119119   AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("DSW")
120120   AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("INPUTS")
121121   AM_RANGE(0x0c0004, 0x0c0005) AM_READ_PORT("SYSTEM")
122   AM_RANGE(0x0c000e, 0x0c000f) AM_READ(pip16_r)  /* sound related, if we return 0 the code writes */
122   AM_RANGE(0x0c000e, 0x0c000f) AM_READ(pip_r)  /* sound related, if we return 0 the code writes */
123123            /* the sound command quickly followed by 0 and the */
124124            /* sound CPU often misses the command. */
125125ADDRESS_MAP_END
r243383r243384
129129static ADDRESS_MAP_START( tokib_audio_map, AS_PROGRAM, 8, toki_state )
130130   AM_RANGE(0x0000, 0x7fff) AM_ROM
131131   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
132   AM_RANGE(0xe000, 0xe000) AM_WRITE(toki_adpcm_control_w) /* MSM5205 + ROM bank */
133   AM_RANGE(0xe400, 0xe400) AM_WRITE(toki_adpcm_data_w)
132   AM_RANGE(0xe000, 0xe000) AM_WRITE(tokib_adpcm_control_w) /* MSM5205 + ROM bank */
133   AM_RANGE(0xe400, 0xe400) AM_WRITE(tokib_adpcm_data_w)
134134   AM_RANGE(0xec00, 0xec01) AM_MIRROR(0x0008) AM_DEVREADWRITE("ymsnd", ym3812_device, read, write)
135135   AM_RANGE(0xf000, 0xf7ff) AM_RAM
136136   AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r)
r243383r243384
463463   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
464464
465465   MCFG_SOUND_ADD("msm", MSM5205, 384000)
466   MCFG_MSM5205_VCLK_CB(WRITELINE(toki_state, toki_adpcm_int)) /* interrupt function */
466   MCFG_MSM5205_VCLK_CB(WRITELINE(toki_state, tokib_adpcm_int)) /* interrupt function */
467467   MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S96_4B)  /* 4KHz               */
468468   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
469469MACHINE_CONFIG_END
trunk/src/mame/includes/toki.h
r243383r243384
4141   tilemap_t *m_foreground_layer;
4242   tilemap_t *m_text_layer;
4343
44   DECLARE_WRITE16_MEMBER(tokib_soundcommand16_w);
45   DECLARE_READ16_MEMBER(pip16_r);
44   DECLARE_WRITE16_MEMBER(tokib_soundcommand_w);
45   DECLARE_READ16_MEMBER(pip_r);
4646   DECLARE_WRITE16_MEMBER(toki_control_w);
4747   DECLARE_WRITE16_MEMBER(foreground_videoram_w);
4848   DECLARE_WRITE16_MEMBER(background1_videoram_w);
4949   DECLARE_WRITE16_MEMBER(background2_videoram_w);
50   DECLARE_WRITE8_MEMBER(toki_adpcm_control_w);
51   DECLARE_WRITE8_MEMBER(toki_adpcm_data_w);
52   DECLARE_WRITE_LINE_MEMBER(toki_adpcm_int);
50   DECLARE_WRITE8_MEMBER(tokib_adpcm_control_w);
51   DECLARE_WRITE8_MEMBER(tokib_adpcm_data_w);
52   DECLARE_WRITE_LINE_MEMBER(tokib_adpcm_int);
5353
5454   DECLARE_DRIVER_INIT(tokib);
5555   DECLARE_DRIVER_INIT(jujuba);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team