src/mess/machine/dai.c
| r15350 | r15351 | |
| 151 | 151 | state->membank("bank2")->configure_entries(0, 4, state->memregion("maincpu")->base() + 0x010000, 0x1000); |
| 152 | 152 | machine.scheduler().timer_set(attotime::zero, FUNC(dai_bootstrap_callback)); |
| 153 | 153 | 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()); |
| 154 | 156 | } |
| 155 | 157 | |
| 156 | 158 | MACHINE_RESET( dai ) |
| r15350 | r15351 | |
| 249 | 251 | |
| 250 | 252 | /*************************************************************************** |
| 251 | 253 | |
| 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 | |
| 261 | READ8_MEMBER(dai_state::dai_pit_r) |
| 262 | { |
| 263 | return pit8253_r(m_pit, (offset>>1) & 3); |
| 264 | } |
| 265 | |
| 266 | WRITE8_MEMBER(dai_state::dai_pit_w) |
| 267 | { |
| 268 | pit8253_w(m_pit, (offset>>1) & 3, data); |
| 269 | } |
| 270 | |
| 271 | /*************************************************************************** |
| 272 | |
| 252 | 273 | AMD 9911 mathematical coprocesor |
| 253 | 274 | |
| 254 | 275 | ***************************************************************************/ |
src/mess/includes/dai.h
| r15350 | r15351 | |
| 17 | 17 | { |
| 18 | 18 | public: |
| 19 | 19 | 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 | { } |
| 21 | 23 | |
| 24 | required_device<device_t> m_pit; |
| 25 | |
| 22 | 26 | UINT8 m_paddle_select; |
| 23 | 27 | UINT8 m_paddle_enable; |
| 24 | 28 | UINT8 m_cassette_motor[2]; |
| r15350 | r15351 | |
| 31 | 35 | DECLARE_WRITE8_MEMBER(dai_io_discrete_devices_w); |
| 32 | 36 | DECLARE_READ8_MEMBER(dai_amd9511_r); |
| 33 | 37 | DECLARE_WRITE8_MEMBER(dai_amd9511_w); |
| 38 | DECLARE_READ8_MEMBER(dai_pit_r); |
| 39 | DECLARE_WRITE8_MEMBER(dai_pit_w); |
| 34 | 40 | }; |
| 35 | 41 | |
| 36 | 42 | |
src/mess/drivers/dai.c
| r15350 | r15351 | |
| 80 | 80 | AM_RANGE( 0xf000, 0xf7ff) AM_WRITE(dai_stack_interrupt_circuit_w ) |
| 81 | 81 | AM_RANGE( 0xf800, 0xf8ff) AM_RAM |
| 82 | 82 | 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 ) |
| 84 | 84 | AM_RANGE( 0xfd00, 0xfdff) AM_READWRITE(dai_io_discrete_devices_r, dai_io_discrete_devices_w ) |
| 85 | 85 | AM_RANGE( 0xfe00, 0xfeff) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) |
| 86 | 86 | AM_RANGE( 0xff00, 0xffff) AM_DEVREADWRITE_LEGACY("tms5501", tms5501_r, tms5501_w ) |