Previous 15994 Revisions Next

r15351 Tuesday 29th May, 2012 at 17:34:32 UTC by Sandro Ronco
DAI: attempt to fix the sound. (nw)
[src/mess/drivers]dai.c
[src/mess/includes]dai.h
[src/mess/machine]dai.c

src/mess/machine/dai.c
r15350r15351
151151   state->membank("bank2")->configure_entries(0, 4, state->memregion("maincpu")->base() + 0x010000, 0x1000);
152152   machine.scheduler().timer_set(attotime::zero, FUNC(dai_bootstrap_callback));
153153   machine.scheduler().timer_pulse(attotime::from_hz(100), FUNC(dai_timer));   /* timer for tms5501 */
154
155   memset(machine.device<ram_device>(RAM_TAG)->pointer(), 0, machine.device<ram_device>(RAM_TAG)->size());
154156}
155157
156158MACHINE_RESET( dai )
r15350r15351
249251
250252/***************************************************************************
251253
254    PIT8253
255
256    Offset need to be shifted by 1 to right, because the PIT is
257    connected to A1 and A2
258
259***************************************************************************/
260
261READ8_MEMBER(dai_state::dai_pit_r)
262{
263   return pit8253_r(m_pit, (offset>>1) & 3);
264}
265
266WRITE8_MEMBER(dai_state::dai_pit_w)
267{
268   pit8253_w(m_pit, (offset>>1) & 3, data);
269}
270
271/***************************************************************************
272
252273    AMD 9911 mathematical coprocesor
253274
254275***************************************************************************/
src/mess/includes/dai.h
r15350r15351
1717{
1818public:
1919   dai_state(const machine_config &mconfig, device_type type, const char *tag)
20      : driver_device(mconfig, type, tag) { }
20      : driver_device(mconfig, type, tag),
21        m_pit(*this, "pit8253")
22      { }
2123
24   required_device<device_t> m_pit;
25
2226   UINT8 m_paddle_select;
2327   UINT8 m_paddle_enable;
2428   UINT8 m_cassette_motor[2];
r15350r15351
3135   DECLARE_WRITE8_MEMBER(dai_io_discrete_devices_w);
3236   DECLARE_READ8_MEMBER(dai_amd9511_r);
3337   DECLARE_WRITE8_MEMBER(dai_amd9511_w);
38   DECLARE_READ8_MEMBER(dai_pit_r);
39   DECLARE_WRITE8_MEMBER(dai_pit_w);
3440};
3541
3642
src/mess/drivers/dai.c
r15350r15351
8080   AM_RANGE( 0xf000, 0xf7ff) AM_WRITE(dai_stack_interrupt_circuit_w )
8181   AM_RANGE( 0xf800, 0xf8ff) AM_RAM
8282   AM_RANGE( 0xfb00, 0xfbff) AM_READWRITE(dai_amd9511_r, dai_amd9511_w )
83   AM_RANGE( 0xfc00, 0xfcff) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w )
83   AM_RANGE( 0xfc00, 0xfcff) AM_READWRITE(dai_pit_r, dai_pit_w) // AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w )
8484   AM_RANGE( 0xfd00, 0xfdff) AM_READWRITE(dai_io_discrete_devices_r, dai_io_discrete_devices_w )
8585   AM_RANGE( 0xfe00, 0xfeff) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
8686   AM_RANGE( 0xff00, 0xffff) AM_DEVREADWRITE_LEGACY("tms5501", tms5501_r, tms5501_w )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team