trunk/src/emu/machine/devhelpr.h
| r21984 | r21985 | |
| 1 | | /********************************************************************** |
| 2 | | |
| 3 | | Generic modern device trampolines and other helpers, to minimize |
| 4 | | the amount of redundant copy/pasting between modernized devices. |
| 5 | | |
| 6 | | **********************************************************************/ |
| 7 | | |
| 8 | | #ifndef __DEVHELPR_H__ |
| 9 | | #define __DEVHELPR_H__ |
| 10 | | |
| 11 | | #define READ32_DEVICE_HANDLER_TRAMPOLINE(devname, funcname) \ |
| 12 | | READ32_DEVICE_HANDLER( funcname ) \ |
| 13 | | { return downcast<devname##_device*>(device)->funcname(offset); } \ |
| 14 | | UINT32 devname##_device::funcname(UINT32 offset) |
| 15 | | |
| 16 | | #define WRITE32_DEVICE_HANDLER_TRAMPOLINE(devname, funcname) \ |
| 17 | | WRITE32_DEVICE_HANDLER( funcname ) \ |
| 18 | | { downcast<devname##_device*>(device)->funcname(offset, data, mem_mask); } \ |
| 19 | | void devname##_device::funcname(UINT32 offset, UINT32 data, UINT32 mem_mask) |
| 20 | | |
| 21 | | #define READ8_DEVICE_HANDLER_TRAMPOLINE(devname, funcname) \ |
| 22 | | READ8_DEVICE_HANDLER( funcname ) \ |
| 23 | | { return downcast<devname##_device*>(device)->funcname(offset); } \ |
| 24 | | UINT8 devname##_device::funcname(UINT32 offset) |
| 25 | | |
| 26 | | #define WRITE8_DEVICE_HANDLER_TRAMPOLINE(devname, funcname) \ |
| 27 | | WRITE8_DEVICE_HANDLER( funcname ) \ |
| 28 | | { downcast<devname##_device*>(device)->funcname(offset, data); } \ |
| 29 | | void devname##_device::funcname(UINT32 offset, UINT8 data) |
| 30 | | |
| 31 | | #define READ_LINE_DEVICE_HANDLER_TRAMPOLINE(devname, funcname) \ |
| 32 | | READ_LINE_DEVICE_HANDLER( funcname ) \ |
| 33 | | { return downcast<devname##_device *>(device)->funcname(); } \ |
| 34 | | void devname##_device::funcname() |
| 35 | | |
| 36 | | #define WRITE_LINE_DEVICE_HANDLER_TRAMPOLINE(devname, funcname) \ |
| 37 | | WRITE_LINE_DEVICE_HANDLER( funcname ) \ |
| 38 | | { return downcast<devname##_device *>(device)->funcname(state); } \ |
| 39 | | void devname##_device::funcname(UINT8 state) |
| 40 | | |
| 41 | | #endif // __DEVHELPR_H__ |
trunk/src/emu/machine/ins8154.c
| r21984 | r21985 | |
| 11 | 11 | |
| 12 | 12 | #include "emu.h" |
| 13 | 13 | #include "ins8154.h" |
| 14 | | #include "devhelpr.h" |
| 15 | 14 | |
| 16 | 15 | |
| 17 | 16 | /*************************************************************************** |
| r21984 | r21985 | |
| 115 | 114 | } |
| 116 | 115 | |
| 117 | 116 | |
| 118 | | READ8_DEVICE_HANDLER_TRAMPOLINE(ins8154, ins8154_r) |
| 117 | READ8_MEMBER(ins8154_device::ins8154_r) |
| 119 | 118 | { |
| 120 | 119 | UINT8 val = 0xff; |
| 121 | 120 | |
| r21984 | r21985 | |
| 169 | 168 | return val; |
| 170 | 169 | } |
| 171 | 170 | |
| 172 | | WRITE8_DEVICE_HANDLER_TRAMPOLINE(ins8154, ins8154_porta_w) |
| 171 | WRITE8_MEMBER(ins8154_device::ins8154_porta_w) |
| 173 | 172 | { |
| 174 | 173 | m_out_a = data; |
| 175 | 174 | |
| r21984 | r21985 | |
| 180 | 179 | } |
| 181 | 180 | } |
| 182 | 181 | |
| 183 | | WRITE8_DEVICE_HANDLER_TRAMPOLINE(ins8154, ins8154_portb_w) |
| 182 | WRITE8_MEMBER(ins8154_device::ins8154_portb_w) |
| 184 | 183 | { |
| 185 | 184 | m_out_b = data; |
| 186 | 185 | |
| r21984 | r21985 | |
| 191 | 190 | } |
| 192 | 191 | } |
| 193 | 192 | |
| 194 | | WRITE8_DEVICE_HANDLER_TRAMPOLINE(ins8154, ins8154_w) |
| 193 | WRITE8_MEMBER(ins8154_device::ins8154_w) |
| 195 | 194 | { |
| 196 | 195 | if (offset > 0x24) |
| 197 | 196 | { |
| r21984 | r21985 | |
| 205 | 204 | switch (offset) |
| 206 | 205 | { |
| 207 | 206 | case 0x20: |
| 208 | | ins8154_porta_w(0, data); |
| 207 | ins8154_porta_w(space, 0, data); |
| 209 | 208 | break; |
| 210 | 209 | |
| 211 | 210 | case 0x21: |
| 212 | | ins8154_portb_w(0, data); |
| 211 | ins8154_portb_w(space, 0, data); |
| 213 | 212 | break; |
| 214 | 213 | |
| 215 | 214 | case 0x22: |
| r21984 | r21985 | |
| 245 | 244 | /* Set bit */ |
| 246 | 245 | if (offset < 0x08) |
| 247 | 246 | { |
| 248 | | ins8154_porta_w(0, m_out_a |= offset & 0x07); |
| 247 | ins8154_porta_w(space, 0, m_out_a |= offset & 0x07); |
| 249 | 248 | } |
| 250 | 249 | else |
| 251 | 250 | { |
| 252 | | ins8154_portb_w(0, m_out_b |= (offset >> 4) & 0x07); |
| 251 | ins8154_portb_w(space, 0, m_out_b |= (offset >> 4) & 0x07); |
| 253 | 252 | } |
| 254 | 253 | } |
| 255 | 254 | else |
| r21984 | r21985 | |
| 257 | 256 | /* Clear bit */ |
| 258 | 257 | if (offset < 0x08) |
| 259 | 258 | { |
| 260 | | ins8154_porta_w(0, m_out_a & ~(offset & 0x07)); |
| 259 | ins8154_porta_w(space, 0, m_out_a & ~(offset & 0x07)); |
| 261 | 260 | } |
| 262 | 261 | else |
| 263 | 262 | { |
| 264 | | ins8154_portb_w(0, m_out_b & ~((offset >> 4) & 0x07)); |
| 263 | ins8154_portb_w(space, 0, m_out_b & ~((offset >> 4) & 0x07)); |
| 265 | 264 | } |
| 266 | 265 | } |
| 267 | 266 | |
trunk/src/emu/machine/ins8154.h
| r21984 | r21985 | |
| 73 | 73 | // construction/destruction |
| 74 | 74 | ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 75 | 75 | |
| 76 | | UINT8 ins8154_r(UINT32 offset); |
| 77 | | void ins8154_w(UINT32 offset, UINT8 data); |
| 76 | DECLARE_READ8_MEMBER( ins8154_r ); |
| 77 | DECLARE_WRITE8_MEMBER( ins8154_w ); |
| 78 | 78 | |
| 79 | | void ins8154_porta_w(UINT32 offset, UINT8 data); |
| 80 | | void ins8154_portb_w(UINT32 offset, UINT8 data); |
| 79 | DECLARE_WRITE8_MEMBER( ins8154_porta_w ); |
| 80 | DECLARE_WRITE8_MEMBER( ins8154_portb_w ); |
| 81 | 81 | |
| 82 | 82 | protected: |
| 83 | 83 | // device-level overrides |
| r21984 | r21985 | |
| 110 | 110 | // device type definition |
| 111 | 111 | extern const device_type INS8154; |
| 112 | 112 | |
| 113 | | |
| 114 | | |
| 115 | | /*************************************************************************** |
| 116 | | PROTOTYPES |
| 117 | | ***************************************************************************/ |
| 118 | | |
| 119 | | DECLARE_READ8_DEVICE_HANDLER( ins8154_r ); |
| 120 | | DECLARE_WRITE8_DEVICE_HANDLER( ins8154_w ); |
| 121 | | |
| 122 | | DECLARE_WRITE8_DEVICE_HANDLER( ins8154_porta_w ); |
| 123 | | DECLARE_WRITE8_DEVICE_HANDLER( ins8154_portb_w ); |
| 124 | | |
| 125 | | |
| 126 | 113 | #endif /* __INS8154_H__ */ |
trunk/src/emu/machine/k056230.c
| r21984 | r21985 | |
| 6 | 6 | |
| 7 | 7 | #include "emu.h" |
| 8 | 8 | #include "k056230.h" |
| 9 | | #include "devhelpr.h" |
| 10 | 9 | |
| 11 | 10 | |
| 12 | 11 | //************************************************************************** |
| r21984 | r21985 | |
| 71 | 70 | } |
| 72 | 71 | |
| 73 | 72 | |
| 74 | | READ8_DEVICE_HANDLER_TRAMPOLINE(k056230, k056230_r) |
| 73 | READ8_MEMBER(k056230_device::k056230_r) |
| 75 | 74 | { |
| 76 | 75 | switch (offset) |
| 77 | 76 | { |
| r21984 | r21985 | |
| 100 | 99 | } |
| 101 | 100 | |
| 102 | 101 | |
| 103 | | WRITE8_DEVICE_HANDLER_TRAMPOLINE(k056230, k056230_w) |
| 102 | WRITE8_MEMBER(k056230_device::k056230_w) |
| 104 | 103 | { |
| 105 | 104 | switch(offset) |
| 106 | 105 | { |
| r21984 | r21985 | |
| 134 | 133 | // mame_printf_debug("k056230_w: %d, %02X at %08X\n", offset, data, space.device().safe_pc()); |
| 135 | 134 | } |
| 136 | 135 | |
| 137 | | READ32_DEVICE_HANDLER_TRAMPOLINE(k056230, lanc_ram_r) |
| 136 | READ32_MEMBER(k056230_device::lanc_ram_r) |
| 138 | 137 | { |
| 139 | 138 | //mame_printf_debug("LANC_RAM_r: %08X, %08X at %08X\n", offset, mem_mask, space.device().safe_pc()); |
| 140 | 139 | return m_ram[offset & 0x7ff]; |
| 141 | 140 | } |
| 142 | 141 | |
| 143 | | WRITE32_DEVICE_HANDLER_TRAMPOLINE(k056230, lanc_ram_w) |
| 142 | WRITE32_MEMBER(k056230_device::lanc_ram_w) |
| 144 | 143 | { |
| 145 | 144 | //mame_printf_debug("LANC_RAM_w: %08X, %08X, %08X at %08X\n", data, offset, mem_mask, space.device().safe_pc()); |
| 146 | 145 | COMBINE_DATA(m_ram + (offset & 0x7ff)); |
trunk/src/emu/machine/k056230.h
| r21984 | r21985 | |
| 46 | 46 | // construction/destruction |
| 47 | 47 | k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 48 | 48 | |
| 49 | | UINT32 lanc_ram_r(UINT32 offset); |
| 50 | | void lanc_ram_w(UINT32 offset, UINT32 data, UINT32 mem_mask); |
| 49 | DECLARE_READ32_MEMBER(lanc_ram_r); |
| 50 | DECLARE_WRITE32_MEMBER(lanc_ram_w); |
| 51 | 51 | |
| 52 | | UINT8 k056230_r(UINT32 offset); |
| 53 | | void k056230_w(UINT32 offset, UINT8 data); |
| 52 | DECLARE_READ8_MEMBER(k056230_r); |
| 53 | DECLARE_WRITE8_MEMBER(k056230_w); |
| 54 | 54 | |
| 55 | 55 | static TIMER_CALLBACK( network_irq_clear_callback ); |
| 56 | 56 | |
| r21984 | r21985 | |
| 74 | 74 | // device type definition |
| 75 | 75 | extern const device_type K056230; |
| 76 | 76 | |
| 77 | | |
| 78 | | |
| 79 | | /*************************************************************************** |
| 80 | | PROTOTYPES |
| 81 | | ***************************************************************************/ |
| 82 | | |
| 83 | | extern DECLARE_READ32_DEVICE_HANDLER( lanc_ram_r ); |
| 84 | | extern DECLARE_WRITE32_DEVICE_HANDLER( lanc_ram_w ); |
| 85 | | extern DECLARE_READ8_DEVICE_HANDLER( k056230_r ); |
| 86 | | extern DECLARE_WRITE8_DEVICE_HANDLER( k056230_w ); |
| 87 | | |
| 88 | | |
| 89 | 77 | #endif /* __K056230_H__ */ |
trunk/src/emu/machine/8257dma.h
| r21984 | r21985 | |
| 87 | 87 | i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 88 | 88 | |
| 89 | 89 | /* register access */ |
| 90 | | UINT8 i8257_r(UINT32 offset); |
| 91 | | void i8257_w(UINT32 offset, UINT8 data); |
| 90 | DECLARE_READ8_MEMBER( i8257_r ); |
| 91 | DECLARE_WRITE8_MEMBER( i8257_w ); |
| 92 | 92 | |
| 93 | /* hold acknowledge */ |
| 94 | WRITE_LINE_MEMBER( i8257_hlda_w ) { } |
| 95 | |
| 96 | /* ready */ |
| 97 | WRITE_LINE_MEMBER( i8257_ready_w ) { } |
| 98 | |
| 93 | 99 | /* data request */ |
| 100 | WRITE_LINE_MEMBER( i8257_drq0_w ) { i8257_drq_w(0, state); } |
| 101 | WRITE_LINE_MEMBER( i8257_drq1_w ) { i8257_drq_w(1, state); } |
| 102 | WRITE_LINE_MEMBER( i8257_drq2_w ) { i8257_drq_w(2, state); } |
| 103 | WRITE_LINE_MEMBER( i8257_drq3_w ) { i8257_drq_w(3, state); } |
| 94 | 104 | void i8257_drq_w(int channel, int state); |
| 95 | 105 | |
| 96 | 106 | protected: |
| r21984 | r21985 | |
| 140 | 150 | // device type definition |
| 141 | 151 | extern const device_type I8257; |
| 142 | 152 | |
| 143 | | |
| 144 | | |
| 145 | | /*************************************************************************** |
| 146 | | PROTOTYPES |
| 147 | | ***************************************************************************/ |
| 148 | | |
| 149 | | /* register access */ |
| 150 | | DECLARE_READ8_DEVICE_HANDLER( i8257_r ); |
| 151 | | DECLARE_WRITE8_DEVICE_HANDLER( i8257_w ); |
| 152 | | |
| 153 | | /* hold acknowledge */ |
| 154 | | WRITE_LINE_DEVICE_HANDLER( i8257_hlda_w ); |
| 155 | | |
| 156 | | /* ready */ |
| 157 | | WRITE_LINE_DEVICE_HANDLER( i8257_ready_w ); |
| 158 | | |
| 159 | | /* data request */ |
| 160 | | WRITE_LINE_DEVICE_HANDLER( i8257_drq0_w ); |
| 161 | | WRITE_LINE_DEVICE_HANDLER( i8257_drq1_w ); |
| 162 | | WRITE_LINE_DEVICE_HANDLER( i8257_drq2_w ); |
| 163 | | WRITE_LINE_DEVICE_HANDLER( i8257_drq3_w ); |
| 164 | | |
| 165 | 153 | #endif |
trunk/src/emu/machine/8237dma.h
| r21984 | r21985 | |
| 85 | 85 | i8237_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 86 | 86 | |
| 87 | 87 | /* register access */ |
| 88 | | UINT8 i8237_r(UINT32 offset); |
| 89 | | void i8237_w(UINT32 offset, UINT8 data); |
| 90 | | |
| 88 | DECLARE_READ8_MEMBER( i8237_r ); |
| 89 | DECLARE_WRITE8_MEMBER( i8237_w ); |
| 91 | 90 | /* hold acknowledge */ |
| 92 | | void i8237_hlda_w(UINT8 state) { m_hlda = state; } |
| 91 | WRITE_LINE_MEMBER( i8237_hlda_w ) { m_hlda = state; } |
| 93 | 92 | |
| 93 | /* ready */ |
| 94 | WRITE_LINE_MEMBER( i8237_ready_w ) { } |
| 95 | |
| 94 | 96 | /* data request */ |
| 97 | WRITE_LINE_MEMBER( i8237_dreq0_w ) { i8237_drq_write(0, state); } |
| 98 | WRITE_LINE_MEMBER( i8237_dreq1_w ) { i8237_drq_write(1, state); } |
| 99 | WRITE_LINE_MEMBER( i8237_dreq2_w ) { i8237_drq_write(2, state); } |
| 100 | WRITE_LINE_MEMBER( i8237_dreq3_w ) { i8237_drq_write(3, state); } |
| 95 | 101 | void i8237_drq_write(int channel, int state); |
| 96 | 102 | |
| 103 | /* end of process */ |
| 104 | WRITE_LINE_MEMBER( i8237_eop_w ) { } |
| 105 | |
| 97 | 106 | void i8237_timerproc(); |
| 98 | 107 | |
| 99 | 108 | protected: |
| r21984 | r21985 | |
| 182 | 191 | // device type definition |
| 183 | 192 | extern const device_type I8237; |
| 184 | 193 | |
| 185 | | |
| 186 | | |
| 187 | | /*************************************************************************** |
| 188 | | PROTOTYPES |
| 189 | | ***************************************************************************/ |
| 190 | | |
| 191 | | /* register access */ |
| 192 | | DECLARE_READ8_DEVICE_HANDLER( i8237_r ); |
| 193 | | DECLARE_WRITE8_DEVICE_HANDLER( i8237_w ); |
| 194 | | |
| 195 | | /* hold acknowledge */ |
| 196 | | WRITE_LINE_DEVICE_HANDLER( i8237_hlda_w ); |
| 197 | | |
| 198 | | /* ready */ |
| 199 | | WRITE_LINE_DEVICE_HANDLER( i8237_ready_w ); |
| 200 | | |
| 201 | | /* data request */ |
| 202 | | WRITE_LINE_DEVICE_HANDLER( i8237_dreq0_w ); |
| 203 | | WRITE_LINE_DEVICE_HANDLER( i8237_dreq1_w ); |
| 204 | | WRITE_LINE_DEVICE_HANDLER( i8237_dreq2_w ); |
| 205 | | WRITE_LINE_DEVICE_HANDLER( i8237_dreq3_w ); |
| 206 | | |
| 207 | | /* end of process */ |
| 208 | | WRITE_LINE_DEVICE_HANDLER( i8237_eop_w ); |
| 209 | | |
| 210 | 194 | #endif |
trunk/src/mess/machine/apollo.c
| r21984 | r21985 | |
| 344 | 344 | static UINT8 dn3000_dma_channel1 = 1; // 1 = memory/ctape, 2 = floppy dma channel |
| 345 | 345 | static UINT8 dn3000_dma_channel2 = 5; // 5 = memory dma channel |
| 346 | 346 | |
| 347 | | INLINE device_t *get_device_dma8237_1(device_t *device) { |
| 347 | INLINE i8237_device *get_device_dma8237_1(device_t *device) { |
| 348 | 348 | return device->machine().driver_data<apollo_state>()->dma8237_1; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | | INLINE device_t *get_device_dma8237_2(device_t *device) { |
| 351 | INLINE i8237_device *get_device_dma8237_2(device_t *device) { |
| 352 | 352 | return device->machine().driver_data<apollo_state>()->dma8237_2; |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | static void apollo_dma_fdc_drq(device_t *device, int state) { |
| 356 | 356 | DLOG2(("apollo_dma_fdc_drq: state=%x", state)); |
| 357 | | i8237_dreq2_w(get_device_dma8237_1(device), state); |
| 357 | get_device_dma8237_1(device)->i8237_dreq2_w(state); |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | static void apollo_dma_ctape_drq(device_t *device, int state) { |
| 361 | 361 | DLOG1(("apollo_dma_ctape_drq: state=%x", state)); |
| 362 | | i8237_dreq1_w(get_device_dma8237_1(device), state); |
| 362 | get_device_dma8237_1(device)->i8237_dreq1_w(state); |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | /*------------------------------------------------- |
| r21984 | r21985 | |
| 368 | 368 | |
| 369 | 369 | WRITE8_MEMBER(apollo_state::apollo_dma_1_w){ |
| 370 | 370 | SLOG1(("apollo_dma_1_w: writing DMA Controller 1 at offset %02x = %02x", offset, data)); |
| 371 | | i8237_w(get_device_dma8237_1(&space.device()), space, offset, data); |
| 371 | get_device_dma8237_1(&space.device())->i8237_w(space, offset, data); |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | READ8_MEMBER(apollo_state::apollo_dma_1_r){ |
| 375 | | UINT8 data = i8237_r(get_device_dma8237_1(&space.device()), space, offset); |
| 375 | UINT8 data = get_device_dma8237_1(&space.device())->i8237_r(space, offset); |
| 376 | 376 | SLOG1(("apollo_dma_1_r: reading DMA Controller 1 at offset %02x = %02x", offset, data)); |
| 377 | 377 | return data; |
| 378 | 378 | } |
| r21984 | r21985 | |
| 383 | 383 | |
| 384 | 384 | WRITE8_MEMBER(apollo_state::apollo_dma_2_w){ |
| 385 | 385 | SLOG1(("apollo_dma_2_w: writing DMA Controller 2 at offset %02x = %02x", offset/2, data)); |
| 386 | | i8237_w(get_device_dma8237_2(&space.device()), space, offset / 2, data); |
| 386 | get_device_dma8237_2(&space.device())->i8237_w(space, offset / 2, data); |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | READ8_MEMBER(apollo_state::apollo_dma_2_r){ |
| 390 | | UINT8 data = i8237_r(get_device_dma8237_2(&space.device()), space, offset / 2); |
| 390 | UINT8 data = get_device_dma8237_2(&space.device())->i8237_r(space, offset / 2); |
| 391 | 391 | SLOG1(("apollo_dma_2_r: reading DMA Controller 2 at offset %02x = %02x", offset/2, data)); |
| 392 | 392 | return data; |
| 393 | 393 | } |
| r21984 | r21985 | |
| 565 | 565 | |
| 566 | 566 | static WRITE_LINE_DEVICE_HANDLER( apollo_dma_1_hrq_changed ) { |
| 567 | 567 | // DLOG2(("dma 1 hrq changed state %02x", state)); |
| 568 | | i8237_dreq0_w(get_device_dma8237_2(device), state); |
| 568 | get_device_dma8237_2(device)->i8237_dreq0_w(state); |
| 569 | 569 | |
| 570 | 570 | /* Assert HLDA */ |
| 571 | | i8237_hlda_w(device, state); |
| 571 | dynamic_cast<i8237_device*>(device)->i8237_hlda_w(state); |
| 572 | 572 | |
| 573 | 573 | // cascade mode? |
| 574 | 574 | // i8237_hlda_w(get_device_dma8237_2(device), state); |
| r21984 | r21985 | |
| 578 | 578 | // DLOG2(("dma 2 hrq changed state %02x", state)); |
| 579 | 579 | device->machine().device(MAINCPU)->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 580 | 580 | |
| 581 | | /* Assert HLDA */ |
| 582 | | i8237_hlda_w(device, state); |
| 581 | /* Assert HLDA */ |
| 582 | dynamic_cast<i8237_device*>(device)->i8237_hlda_w(state); |
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | static I8237_INTERFACE( apollo_dma8237_1_config ) |
| r21984 | r21985 | |
| 1429 | 1429 | { |
| 1430 | 1430 | //MLOG1(("machine_reset_apollo")); |
| 1431 | 1431 | |
| 1432 | | dma8237_1 = machine().device(APOLLO_DMA1_TAG); |
| 1433 | | dma8237_2 = machine().device(APOLLO_DMA2_TAG); |
| 1432 | dma8237_1 = machine().device<i8237_device>(APOLLO_DMA1_TAG); |
| 1433 | dma8237_2 = machine().device<i8237_device>(APOLLO_DMA2_TAG); |
| 1434 | 1434 | pic8259_master = machine().device(APOLLO_PIC1_TAG); |
| 1435 | 1435 | pic8259_slave = machine().device(APOLLO_PIC2_TAG); |
| 1436 | 1436 | |
trunk/src/mess/machine/southbridge.c
| r21984 | r21985 | |
| 8 | 8 | #include "cpu/i386/i386.h" |
| 9 | 9 | #include "machine/southbridge.h" |
| 10 | 10 | #include "machine/pc_keyboards.h" |
| 11 | | #include "machine/8237dma.h" |
| 12 | 11 | |
| 13 | 12 | const struct pic8259_interface at_pic8259_master_config = |
| 14 | 13 | { |
| r21984 | r21985 | |
| 45 | 44 | |
| 46 | 45 | I8237_INTERFACE( at_dma8237_1_config ) |
| 47 | 46 | { |
| 48 | | DEVCB_DEVICE_LINE("dma8237_2",i8237_dreq0_w), |
| 47 | DEVCB_DEVICE_LINE_MEMBER("dma8237_2",am9517a_device,dreq0_w), |
| 49 | 48 | DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, southbridge_device, at_dma8237_out_eop), |
| 50 | 49 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, southbridge_device, pc_dma_read_byte), |
| 51 | 50 | DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, southbridge_device, pc_dma_write_byte), |
| r21984 | r21985 | |
| 104 | 103 | DEVCB_DEVICE_LINE_MEMBER("pic8259_slave", pic8259_device, ir7_w), |
| 105 | 104 | |
| 106 | 105 | // dma request |
| 107 | | DEVCB_DEVICE_LINE("dma8237_1", i8237_dreq0_w), |
| 108 | | DEVCB_DEVICE_LINE("dma8237_1", i8237_dreq1_w), |
| 109 | | DEVCB_DEVICE_LINE("dma8237_1", i8237_dreq2_w), |
| 110 | | DEVCB_DEVICE_LINE("dma8237_1", i8237_dreq3_w), |
| 106 | DEVCB_DEVICE_LINE_MEMBER("dma8237_1", am9517a_device, dreq0_w), |
| 107 | DEVCB_DEVICE_LINE_MEMBER("dma8237_1", am9517a_device, dreq1_w), |
| 108 | DEVCB_DEVICE_LINE_MEMBER("dma8237_1", am9517a_device, dreq2_w), |
| 109 | DEVCB_DEVICE_LINE_MEMBER("dma8237_1", am9517a_device, dreq3_w), |
| 111 | 110 | |
| 112 | | DEVCB_DEVICE_LINE("dma8237_2", i8237_dreq1_w), |
| 113 | | DEVCB_DEVICE_LINE("dma8237_2", i8237_dreq2_w), |
| 114 | | DEVCB_DEVICE_LINE("dma8237_2", i8237_dreq3_w), |
| 111 | DEVCB_DEVICE_LINE_MEMBER("dma8237_2", am9517a_device, dreq1_w), |
| 112 | DEVCB_DEVICE_LINE_MEMBER("dma8237_2", am9517a_device, dreq2_w), |
| 113 | DEVCB_DEVICE_LINE_MEMBER("dma8237_2", am9517a_device, dreq3_w), |
| 115 | 114 | }; |
| 116 | 115 | |
| 117 | 116 | static SLOT_INTERFACE_START(pc_isa_onboard) |
| r21984 | r21985 | |
| 194 | 193 | { |
| 195 | 194 | address_space& spaceio = machine().device(":maincpu")->memory().space(AS_IO); |
| 196 | 195 | |
| 197 | | spaceio.install_legacy_readwrite_handler(*m_dma8237_1, 0x0000, 0x001f, FUNC(i8237_r), FUNC(i8237_w), 0xffffffff); |
| 196 | spaceio.install_readwrite_handler(0x0000, 0x001f, read8_delegate(FUNC(am9517a_device::read),&(*m_dma8237_1)), write8_delegate(FUNC(am9517a_device::write),&(*m_dma8237_1)), 0xffffffff); |
| 198 | 197 | spaceio.install_legacy_readwrite_handler(*m_pic8259_master, 0x0020, 0x003f, FUNC(pic8259_r), FUNC(pic8259_w), 0xffffffff); |
| 199 | 198 | spaceio.install_legacy_readwrite_handler(*m_pit8254, 0x0040, 0x005f, FUNC(pit8253_r), FUNC(pit8253_w), 0xffffffff); |
| 200 | 199 | spaceio.install_readwrite_handler(0x0060, 0x0063, read8_delegate(FUNC(southbridge_device::at_keybc_r),this), write8_delegate(FUNC(southbridge_device::at_keybc_w),this), 0xffffffff); |
| r21984 | r21985 | |
| 332 | 331 | m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 333 | 332 | |
| 334 | 333 | /* Assert HLDA */ |
| 335 | | i8237_hlda_w( m_dma8237_2, state ); |
| 334 | m_dma8237_2->hack_w( state ); |
| 336 | 335 | } |
| 337 | 336 | |
| 338 | 337 | READ8_MEMBER(southbridge_device::pc_dma_read_byte) |
| r21984 | r21985 | |
| 424 | 423 | WRITE_LINE_MEMBER( southbridge_device::pc_dack1_w ) { pc_select_dma_channel(1, state); } |
| 425 | 424 | WRITE_LINE_MEMBER( southbridge_device::pc_dack2_w ) { pc_select_dma_channel(2, state); } |
| 426 | 425 | WRITE_LINE_MEMBER( southbridge_device::pc_dack3_w ) { pc_select_dma_channel(3, state); } |
| 427 | | WRITE_LINE_MEMBER( southbridge_device::pc_dack4_w ) { i8237_hlda_w( m_dma8237_1, state ? 0 : 1); } // it's inverted |
| 426 | WRITE_LINE_MEMBER( southbridge_device::pc_dack4_w ) { m_dma8237_1->hack_w( state ? 0 : 1); } // it's inverted |
| 428 | 427 | WRITE_LINE_MEMBER( southbridge_device::pc_dack5_w ) { pc_select_dma_channel(5, state); } |
| 429 | 428 | WRITE_LINE_MEMBER( southbridge_device::pc_dack6_w ) { pc_select_dma_channel(6, state); } |
| 430 | 429 | WRITE_LINE_MEMBER( southbridge_device::pc_dack7_w ) { pc_select_dma_channel(7, state); } |
| r21984 | r21985 | |
| 466 | 465 | |
| 467 | 466 | READ8_MEMBER( southbridge_device::at_dma8237_2_r ) |
| 468 | 467 | { |
| 469 | | return i8237_r( m_dma8237_2, space, offset / 2); |
| 468 | return m_dma8237_2->read( space, offset / 2); |
| 470 | 469 | } |
| 471 | 470 | |
| 472 | 471 | WRITE8_MEMBER( southbridge_device::at_dma8237_2_w ) |
| 473 | 472 | { |
| 474 | | i8237_w( m_dma8237_2, space, offset / 2, data); |
| 473 | m_dma8237_2->write( space, offset / 2, data); |
| 475 | 474 | } |
| 476 | 475 | |
| 477 | 476 | READ8_MEMBER( southbridge_device::at_keybc_r ) |
trunk/src/mess/machine/radio86.c
| r21984 | r21985 | |
| 131 | 131 | m_maincpu->set_input_line(INPUT_LINE_HALT, state); |
| 132 | 132 | |
| 133 | 133 | /* HACK - this should be connected to the BUSACK line of Z80 */ |
| 134 | | i8257_hlda_w(m_dma8257, state); |
| 134 | m_dma8257->i8257_hlda_w(state); |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | static UINT8 memory_read_byte(address_space &space, offs_t address, UINT8 mem_mask) { return space.read_byte(address); } |
| r21984 | r21985 | |
| 237 | 237 | "screen", |
| 238 | 238 | 6, |
| 239 | 239 | 0, |
| 240 | | DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w), |
| 240 | DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w), |
| 241 | 241 | DEVCB_NULL, |
| 242 | 242 | DEVCB_NULL, |
| 243 | 243 | DEVCB_NULL, |
| r21984 | r21985 | |
| 248 | 248 | "screen", |
| 249 | 249 | 6, |
| 250 | 250 | 0, |
| 251 | | DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w), |
| 251 | DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w), |
| 252 | 252 | DEVCB_NULL, |
| 253 | 253 | DEVCB_NULL, |
| 254 | 254 | DEVCB_NULL, |
| r21984 | r21985 | |
| 259 | 259 | "screen", |
| 260 | 260 | 6, |
| 261 | 261 | 0, |
| 262 | | DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w), |
| 262 | DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w), |
| 263 | 263 | DEVCB_NULL, |
| 264 | 264 | DEVCB_NULL, |
| 265 | 265 | DEVCB_NULL, |
| r21984 | r21985 | |
| 270 | 270 | "screen", |
| 271 | 271 | 6, |
| 272 | 272 | 1, |
| 273 | | DEVCB_DEVICE_LINE("dma8257", i8257_drq2_w), |
| 273 | DEVCB_DEVICE_LINE_MEMBER("dma8257", i8257_device, i8257_drq2_w), |
| 274 | 274 | DEVCB_NULL, |
| 275 | 275 | DEVCB_NULL, |
| 276 | 276 | DEVCB_NULL, |
trunk/src/mess/drivers/pc8001.c
| r21984 | r21985 | |
| 176 | 176 | AM_RANGE(0x30, 0x30) AM_MIRROR(0x0f) AM_WRITE(port30_w) |
| 177 | 177 | AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READWRITE(port40_r, port40_w) |
| 178 | 178 | AM_RANGE(0x50, 0x51) AM_DEVREADWRITE(UPD3301_TAG, upd3301_device, read, write) |
| 179 | | AM_RANGE(0x60, 0x68) AM_DEVREADWRITE_LEGACY(I8257_TAG, i8257_r, i8257_w) |
| 179 | AM_RANGE(0x60, 0x68) AM_DEVREADWRITE(I8257_TAG, i8257_device, i8257_r, i8257_w) |
| 180 | 180 | // AM_RANGE(0x70, 0x7f) unused |
| 181 | 181 | // AM_RANGE(0x80, 0x80) AM_MIRROR(0x0f) AM_WRITE(pc8011_ext0_w) |
| 182 | 182 | // AM_RANGE(0x90, 0x90) AM_MIRROR(0x0f) AM_WRITE(pc8011_ext1_w) |
| r21984 | r21985 | |
| 395 | 395 | 8, |
| 396 | 396 | pc8001_display_pixels, |
| 397 | 397 | DEVCB_NULL, |
| 398 | | DEVCB_DEVICE_LINE(I8257_TAG, i8257_drq2_w), |
| 398 | DEVCB_DEVICE_LINE_MEMBER(I8257_TAG, i8257_device, i8257_drq2_w), |
| 399 | 399 | DEVCB_NULL, |
| 400 | 400 | DEVCB_NULL |
| 401 | 401 | }; |
| r21984 | r21985 | |
| 435 | 435 | m_maincpu->set_input_line(INPUT_LINE_HALT, state); |
| 436 | 436 | |
| 437 | 437 | /* HACK - this should be connected to the BUSACK line of Z80 */ |
| 438 | | i8257_hlda_w(m_dma, state); |
| 438 | m_dma->i8257_hlda_w(state); |
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | WRITE8_MEMBER( pc8001_state::dma_mem_w ) |
| r21984 | r21985 | |
| 490 | 490 | m_rtc->oe_w(1); |
| 491 | 491 | |
| 492 | 492 | /* initialize DMA */ |
| 493 | | i8257_ready_w(m_dma, 1); |
| 493 | m_dma->i8257_ready_w(1); |
| 494 | 494 | |
| 495 | 495 | /* setup memory banking */ |
| 496 | 496 | UINT8 *ram = m_ram->pointer(); |
trunk/src/mess/drivers/qx10.c
| r21984 | r21985 | |
| 332 | 332 | |
| 333 | 333 | void qx10_state::drq_w(bool state) |
| 334 | 334 | { |
| 335 | | i8237_dreq0_w(m_dma_1, !state); |
| 335 | m_dma_1->i8237_dreq0_w(!state); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | WRITE8_MEMBER( qx10_state::fdd_motor_w ) |
| r21984 | r21985 | |
| 361 | 361 | */ |
| 362 | 362 | WRITE_LINE_MEMBER(qx10_state::dma_hrq_changed) |
| 363 | 363 | { |
| 364 | | device_t *device = machine().device("8237dma_1"); |
| 364 | i8237_device *device = machine().device<i8237_device>("8237dma_1"); |
| 365 | 365 | /* Assert HLDA */ |
| 366 | | i8237_hlda_w(device, state); |
| 366 | device->i8237_hlda_w(state); |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | READ8_MEMBER( qx10_state::gdc_dack_r ) |
| r21984 | r21985 | |
| 690 | 690 | // AM_RANGE(0x3b, 0x3b) GDC light pen req |
| 691 | 691 | AM_RANGE(0x3c, 0x3c) AM_READWRITE(mc146818_data_r, mc146818_data_w) |
| 692 | 692 | AM_RANGE(0x3d, 0x3d) AM_WRITE(mc146818_offset_w) |
| 693 | | AM_RANGE(0x40, 0x4f) AM_DEVREADWRITE_LEGACY("8237dma_1", i8237_r, i8237_w) |
| 694 | | AM_RANGE(0x50, 0x5f) AM_DEVREADWRITE_LEGACY("8237dma_2", i8237_r, i8237_w) |
| 693 | AM_RANGE(0x40, 0x4f) AM_DEVREADWRITE("8237dma_1", i8237_device, i8237_r, i8237_w) |
| 694 | AM_RANGE(0x50, 0x5f) AM_DEVREADWRITE("8237dma_2", i8237_device, i8237_r, i8237_w) |
| 695 | 695 | // AM_RANGE(0xfc, 0xfd) Multi-Font comms |
| 696 | 696 | ADDRESS_MAP_END |
| 697 | 697 | |
| r21984 | r21985 | |
| 916 | 916 | |
| 917 | 917 | void qx10_state::machine_reset() |
| 918 | 918 | { |
| 919 | | i8237_dreq0_w(m_dma_1, 1); |
| 919 | m_dma_1->i8237_dreq0_w(1); |
| 920 | 920 | |
| 921 | 921 | m_memprom = 0; |
| 922 | 922 | m_memcmos = 0; |
trunk/src/mess/drivers/radio86.c
| r21984 | r21985 | |
| 25 | 25 | AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc) |
| 26 | 26 | //AM_RANGE( 0xa000, 0xa003 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x1ffc) |
| 27 | 27 | AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video |
| 28 | | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w) // DMA |
| 28 | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE("dma8257", i8257_device, i8257_w) // DMA |
| 29 | 29 | AM_RANGE( 0xf000, 0xffff ) AM_ROM // System ROM |
| 30 | 30 | ADDRESS_MAP_END |
| 31 | 31 | |
| r21984 | r21985 | |
| 45 | 45 | AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc) |
| 46 | 46 | AM_RANGE( 0xa000, 0xa003 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) AM_MIRROR(0x1ffc) |
| 47 | 47 | AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video |
| 48 | | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w) // DMA |
| 48 | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE("dma8257", i8257_device, i8257_w) // DMA |
| 49 | 49 | AM_RANGE( 0xf000, 0xffff ) AM_ROM // System ROM |
| 50 | 50 | ADDRESS_MAP_END |
| 51 | 51 | |
| r21984 | r21985 | |
| 58 | 58 | AM_RANGE( 0xf780, 0xf7bf ) AM_DEVREADWRITE("i8275", i8275_device, read, write) // video |
| 59 | 59 | AM_RANGE( 0xf684, 0xf687 ) AM_DEVREADWRITE("ppi8255_2", i8255_device, read, write) |
| 60 | 60 | AM_RANGE( 0xf688, 0xf688 ) AM_WRITE(radio86_pagesel ) |
| 61 | | AM_RANGE( 0xf800, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w) // DMA |
| 61 | AM_RANGE( 0xf800, 0xffff ) AM_DEVWRITE("dma8257", i8257_device, i8257_w) // DMA |
| 62 | 62 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM page 1 |
| 63 | 63 | ADDRESS_MAP_END |
| 64 | 64 | |
| r21984 | r21985 | |
| 70 | 70 | AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc) |
| 71 | 71 | //AM_RANGE( 0xa000, 0xa003 ) AM_DEVREADWRITE_LEGACY("ppi8255_2", i8255a_r, i8255a_w) AM_MIRROR(0x1ffc) |
| 72 | 72 | AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video |
| 73 | | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w) // DMA |
| 73 | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE("dma8257", i8257_device, i8257_w) // DMA |
| 74 | 74 | AM_RANGE( 0xf000, 0xffff ) AM_ROM // System ROM |
| 75 | 75 | ADDRESS_MAP_END |
| 76 | 76 | |
| r21984 | r21985 | |
| 81 | 81 | AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x00fc) |
| 82 | 82 | //AM_RANGE( 0xc100, 0xc103 ) AM_DEVREADWRITE_LEGACY("ppi8255_2", i8255a_r, i8255a_w) AM_MIRROR(0x00fc) |
| 83 | 83 | AM_RANGE( 0xc200, 0xc201 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x00fe) // video |
| 84 | | AM_RANGE( 0xc300, 0xc3ff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w) // DMA |
| 84 | AM_RANGE( 0xc300, 0xc3ff ) AM_DEVWRITE("dma8257", i8257_device, i8257_w) // DMA |
| 85 | 85 | AM_RANGE( 0xf000, 0xffff ) AM_ROM // System ROM |
| 86 | 86 | ADDRESS_MAP_END |
| 87 | 87 | |
| r21984 | r21985 | |
| 91 | 91 | AM_RANGE( 0x8000, 0x8003 ) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) AM_MIRROR(0x1ffc) |
| 92 | 92 | AM_RANGE( 0xa000, 0xbfff ) AM_ROM // Basic ROM |
| 93 | 93 | AM_RANGE( 0xc000, 0xc001 ) AM_DEVREADWRITE("i8275", i8275_device, read, write) AM_MIRROR(0x1ffe) // video |
| 94 | | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE_LEGACY("dma8257", i8257_w) // DMA |
| 94 | AM_RANGE( 0xe000, 0xffff ) AM_DEVWRITE("dma8257", i8257_device, i8257_w) // DMA |
| 95 | 95 | AM_RANGE( 0xf000, 0xffff ) AM_ROM // System ROM |
| 96 | 96 | ADDRESS_MAP_END |
| 97 | 97 | |
trunk/src/mess/drivers/bebox.c
| r21984 | r21985 | |
| 35 | 35 | #include "formats/pc_dsk.h" |
| 36 | 36 | #include "machine/ram.h" |
| 37 | 37 | |
| 38 | | READ8_MEMBER(bebox_state::at_dma8237_1_r) { return i8237_r(machine().device("dma8237_2"), space, offset / 2); } |
| 39 | | WRITE8_MEMBER(bebox_state::at_dma8237_1_w) { i8237_w(machine().device("dma8237_2"), space, offset / 2, data); } |
| 38 | READ8_MEMBER(bebox_state::at_dma8237_1_r) { return machine().device<i8237_device>("dma8237_2")->i8237_r(space, offset / 2); } |
| 39 | WRITE8_MEMBER(bebox_state::at_dma8237_1_w) { machine().device<i8237_device>("dma8237_2")->i8237_w(space, offset / 2, data); } |
| 40 | 40 | |
| 41 | 41 | static ADDRESS_MAP_START( bebox_mem, AS_PROGRAM, 64, bebox_state ) |
| 42 | 42 | AM_RANGE(0x7FFFF0F0, 0x7FFFF0F7) AM_READWRITE(bebox_cpu0_imask_r, bebox_cpu0_imask_w ) |
| r21984 | r21985 | |
| 45 | 45 | AM_RANGE(0x7FFFF3F0, 0x7FFFF3F7) AM_READWRITE(bebox_crossproc_interrupts_r, bebox_crossproc_interrupts_w ) |
| 46 | 46 | AM_RANGE(0x7FFFF4F0, 0x7FFFF4F7) AM_WRITE(bebox_processor_resets_w ) |
| 47 | 47 | |
| 48 | | AM_RANGE(0x80000000, 0x8000001F) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, U64(0xffffffffffffffff) ) |
| 48 | AM_RANGE(0x80000000, 0x8000001F) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, U64(0xffffffffffffffff) ) |
| 49 | 49 | AM_RANGE(0x80000020, 0x8000003F) AM_DEVREADWRITE8_LEGACY("pic8259_master", pic8259_r, pic8259_w, U64(0xffffffffffffffff) ) |
| 50 | 50 | AM_RANGE(0x80000040, 0x8000005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, U64(0xffffffffffffffff) ) |
| 51 | 51 | AM_RANGE(0x80000060, 0x8000006F) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, U64(0xffffffffffffffff) ) |
trunk/src/mess/drivers/dmv.c
| r21984 | r21985 | |
| 196 | 196 | AM_RANGE(0x00, 0x00) AM_WRITE(leds_w) |
| 197 | 197 | AM_RANGE(0x13, 0x13) AM_READ(sys_status_r) |
| 198 | 198 | AM_RANGE(0x14, 0x14) AM_WRITE(fdd_motor_w) |
| 199 | | AM_RANGE(0x20, 0x2f) AM_DEVREADWRITE_LEGACY("dma8237", i8237_r, i8237_w) |
| 199 | AM_RANGE(0x20, 0x2f) AM_DEVREADWRITE("dma8237", i8237_device, i8237_r, i8237_w) |
| 200 | 200 | AM_RANGE(0x40, 0x41) AM_READWRITE(kb_ctrl_mcu_r, kb_ctrl_mcu_w) |
| 201 | 201 | AM_RANGE(0x50, 0x51) AM_DEVICE("upd765", upd765a_device, map) |
| 202 | 202 | AM_RANGE(0xa0, 0xa1) AM_DEVREADWRITE("upd7220", upd7220_device, read, write) |
| r21984 | r21985 | |
| 280 | 280 | m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 281 | 281 | |
| 282 | 282 | // Assert HLDA |
| 283 | | i8237_hlda_w(m_dmac, state); |
| 283 | m_dmac->i8237_hlda_w(state); |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | static UINT8 memory_read_byte(address_space &space, offs_t address, UINT8 mem_mask) { return space.read_byte(address); } |
trunk/src/mame/machine/pcshare.c
| r21984 | r21985 | |
| 157 | 157 | device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 158 | 158 | |
| 159 | 159 | /* Assert HLDA */ |
| 160 | | i8237_hlda_w( device, state ); |
| 160 | dynamic_cast<i8237_device*>(device)->i8237_hlda_w( state ); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | |
| r21984 | r21985 | |
| 326 | 326 | }; |
| 327 | 327 | |
| 328 | 328 | ADDRESS_MAP_START( pcat32_io_common, AS_IO, 32, driver_device ) |
| 329 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 329 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 330 | 330 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 331 | 331 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 332 | 332 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
| 333 | 333 | AM_RANGE(0x0070, 0x007f) AM_RAM //AM_DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffffffff) |
| 334 | 334 | AM_RANGE(0x0080, 0x009f) AM_READWRITE8_LEGACY(dma_page_select_r,dma_page_select_w, 0xffffffff)//TODO |
| 335 | 335 | AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE8_LEGACY("pic8259_2", pic8259_r, pic8259_w, 0xffffffff) |
| 336 | | AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8_LEGACY("dma8237_2", i8237_r, i8237_w, 0xffff) |
| 336 | AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8("dma8237_2", i8237_device, i8237_r, i8237_w, 0xffff) |
| 337 | 337 | ADDRESS_MAP_END |
| 338 | 338 | |
| 339 | 339 | MACHINE_CONFIG_FRAGMENT(pcat_common) |
trunk/src/mame/machine/konppc.c
| r21984 | r21985 | |
| 143 | 143 | const char *dsptag = (cgboard_id == 0) ? "dsp" : "dsp2"; |
| 144 | 144 | const char *pcitag = (cgboard_id == 0) ? "k033906_1" : "k033906_2"; |
| 145 | 145 | device_t *dsp = space.machine().device(dsptag); |
| 146 | | device_t *k033906 = space.machine().device(pcitag); |
| 146 | k033906_device *k033906 = space.machine().device<k033906_device>(pcitag); |
| 147 | 147 | // mame_printf_debug("dsp_cmd_w: (board %d) %08X, %08X, %08X at %08X\n", cgboard_id, data, offset, mem_mask, space.device().safe_pc()); |
| 148 | 148 | |
| 149 | 149 | if (cgboard_id < MAX_CG_BOARDS) |
| r21984 | r21985 | |
| 158 | 158 | dsp_state[cgboard_id] |= 0x10; |
| 159 | 159 | |
| 160 | 160 | if (k033906 != NULL) /* zr107.c has no PCI and some games only have one PCI Bridge */ |
| 161 | | k033906_set_reg(k033906, (data & 0x20000000) ? 1 : 0); |
| 161 | k033906->k033906_set_reg((data & 0x20000000) ? 1 : 0); |
| 162 | 162 | |
| 163 | 163 | if (data & 0x10000000) |
| 164 | 164 | dsp->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE); |
| r21984 | r21985 | |
| 409 | 409 | |
| 410 | 410 | READ32_HANDLER( K033906_0_r ) |
| 411 | 411 | { |
| 412 | | device_t *k033906_1 = space.machine().device("k033906_1"); |
| 412 | k033906_device *k033906_1 = space.machine().device<k033906_device>("k033906_1"); |
| 413 | 413 | if (nwk_device_sel[0] & 0x01) |
| 414 | 414 | return nwk_fifo_r(space, 0); |
| 415 | 415 | else |
| 416 | | return k033906_r(k033906_1, space, offset, mem_mask); |
| 416 | return k033906_1->k033906_r(space, offset, mem_mask); |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | WRITE32_HANDLER( K033906_0_w ) |
| 420 | 420 | { |
| 421 | | device_t *k033906_1 = space.machine().device("k033906_1"); |
| 422 | | k033906_w(k033906_1, space, offset, data, mem_mask); |
| 421 | k033906_device *k033906_1 = space.machine().device<k033906_device>("k033906_1"); |
| 422 | k033906_1->k033906_w(space, offset, data, mem_mask); |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | READ32_HANDLER( K033906_1_r ) |
| 426 | 426 | { |
| 427 | | device_t *k033906_2 = space.machine().device("k033906_2"); |
| 427 | k033906_device *k033906_2 = space.machine().device<k033906_device>("k033906_2"); |
| 428 | 428 | if (nwk_device_sel[1] & 0x01) |
| 429 | 429 | return nwk_fifo_r(space, 1); |
| 430 | 430 | else |
| 431 | | return k033906_r(k033906_2, space, offset, mem_mask); |
| 431 | return k033906_2->k033906_r(space, offset, mem_mask); |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | WRITE32_HANDLER(K033906_1_w) |
| 435 | 435 | { |
| 436 | | device_t *k033906_2 = space.machine().device("k033906_2"); |
| 437 | | k033906_w(k033906_2, space, offset, data, mem_mask); |
| 436 | k033906_device *k033906_2 = space.machine().device<k033906_device>("k033906_2"); |
| 437 | k033906_2->k033906_w(space, offset, data, mem_mask); |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | /*****************************************************************************/ |
trunk/src/mame/drivers/savquest.c
| r21984 | r21985 | |
| 421 | 421 | |
| 422 | 422 | READ8_MEMBER(savquest_state::at_dma8237_2_r) |
| 423 | 423 | { |
| 424 | | device_t *device = machine().device("dma8237_2"); |
| 425 | | return i8237_r(device, space, offset / 2); |
| 424 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 426 | 425 | } |
| 427 | 426 | |
| 428 | 427 | WRITE8_MEMBER(savquest_state::at_dma8237_2_w) |
| 429 | 428 | { |
| 430 | | device_t *device = machine().device("dma8237_2"); |
| 431 | | i8237_w(device, space, offset / 2, data); |
| 429 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 432 | 430 | } |
| 433 | 431 | |
| 434 | 432 | WRITE_LINE_MEMBER(savquest_state::pc_dma_hrq_changed) |
| r21984 | r21985 | |
| 436 | 434 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 437 | 435 | |
| 438 | 436 | /* Assert HLDA */ |
| 439 | | i8237_hlda_w( m_dma8237_1, state ); |
| 437 | m_dma8237_1->i8237_hlda_w( state ); |
| 440 | 438 | } |
| 441 | 439 | |
| 442 | 440 | |
| r21984 | r21985 | |
| 506 | 504 | ADDRESS_MAP_END |
| 507 | 505 | |
| 508 | 506 | static ADDRESS_MAP_START(savquest_io, AS_IO, 32, savquest_state) |
| 509 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 507 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 510 | 508 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 511 | 509 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 512 | 510 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/photoply.c
| r21984 | r21985 | |
| 36 | 36 | device_t *m_pit8253; |
| 37 | 37 | device_t *m_pic8259_1; |
| 38 | 38 | device_t *m_pic8259_2; |
| 39 | | device_t *m_dma8237_1; |
| 40 | | device_t *m_dma8237_2; |
| 39 | i8237_device *m_dma8237_1; |
| 40 | i8237_device *m_dma8237_2; |
| 41 | 41 | DECLARE_READ32_MEMBER(ide_r); |
| 42 | 42 | DECLARE_WRITE32_MEMBER(ide_w); |
| 43 | 43 | DECLARE_READ32_MEMBER(fdc_r); |
| r21984 | r21985 | |
| 72 | 72 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 73 | 73 | |
| 74 | 74 | /* Assert HLDA */ |
| 75 | | i8237_hlda_w( m_dma8237_1, state ); |
| 75 | m_dma8237_1->i8237_hlda_w( state ); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | |
| r21984 | r21985 | |
| 279 | 279 | |
| 280 | 280 | |
| 281 | 281 | static ADDRESS_MAP_START( photoply_io, AS_IO, 32, photoply_state ) |
| 282 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 282 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 283 | 283 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 284 | 284 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 285 | 285 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
| 286 | 286 | AM_RANGE(0x0070, 0x007f) AM_RAM//DEVREADWRITE8("rtc", mc146818_device, read, write, 0xffffffff) |
| 287 | 287 | AM_RANGE(0x0080, 0x009f) AM_READWRITE8(dma_page_select_r,dma_page_select_w, 0xffffffff)//TODO |
| 288 | 288 | AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE8_LEGACY("pic8259_2", pic8259_r, pic8259_w, 0xffffffff) |
| 289 | | AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8_LEGACY("dma8237_2", i8237_r, i8237_w, 0xffff) |
| 289 | AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8("dma8237_2", i8237_device, i8237_r, i8237_w, 0xffff) |
| 290 | 290 | AM_RANGE(0x00e8, 0x00eb) AM_NOP |
| 291 | 291 | AM_RANGE(0x01f0, 0x01f7) AM_READWRITE(ide_r, ide_w) |
| 292 | 292 | AM_RANGE(0x0278, 0x027f) AM_RAM //parallel port 2 |
| r21984 | r21985 | |
| 346 | 346 | m_pit8253 = machine().device( "pit8254" ); |
| 347 | 347 | m_pic8259_1 = machine().device( "pic8259_1" ); |
| 348 | 348 | m_pic8259_2 = machine().device( "pic8259_2" ); |
| 349 | | m_dma8237_1 = machine().device( "dma8237_1" ); |
| 350 | | m_dma8237_2 = machine().device( "dma8237_2" ); |
| 349 | m_dma8237_1 = machine().device<i8237_device>( "dma8237_1" ); |
| 350 | m_dma8237_2 = machine().device<i8237_device>( "dma8237_2" ); |
| 351 | 351 | |
| 352 | 352 | init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, photoply_set_keyb_int); |
| 353 | 353 | } |
trunk/src/mame/drivers/midqslvr.c
| r21984 | r21985 | |
| 463 | 463 | |
| 464 | 464 | READ8_MEMBER(midqslvr_state::at_dma8237_2_r) |
| 465 | 465 | { |
| 466 | | device_t *device = machine().device("dma8237_2"); |
| 467 | | return i8237_r(device, space, offset / 2); |
| 466 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 468 | 467 | } |
| 469 | 468 | |
| 470 | 469 | WRITE8_MEMBER(midqslvr_state::at_dma8237_2_w) |
| 471 | 470 | { |
| 472 | | device_t *device = machine().device("dma8237_2"); |
| 473 | | i8237_w(device, space, offset / 2, data); |
| 471 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 474 | 472 | } |
| 475 | 473 | |
| 476 | 474 | WRITE_LINE_MEMBER(midqslvr_state::pc_dma_hrq_changed) |
| r21984 | r21985 | |
| 478 | 476 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 479 | 477 | |
| 480 | 478 | /* Assert HLDA */ |
| 481 | | i8237_hlda_w( m_dma8237_1, state ); |
| 479 | m_dma8237_1->i8237_hlda_w( state ); |
| 482 | 480 | } |
| 483 | 481 | |
| 484 | 482 | |
| r21984 | r21985 | |
| 548 | 546 | ADDRESS_MAP_END |
| 549 | 547 | |
| 550 | 548 | static ADDRESS_MAP_START(midqslvr_io, AS_IO, 32, midqslvr_state) |
| 551 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 549 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 552 | 550 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 553 | 551 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 554 | 552 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/calchase.c
| r21984 | r21985 | |
| 145 | 145 | device_t *m_pit8254; |
| 146 | 146 | device_t *m_pic8259_1; |
| 147 | 147 | device_t *m_pic8259_2; |
| 148 | | device_t *m_dma8237_1; |
| 149 | | device_t *m_dma8237_2; |
| 148 | i8237_device *m_dma8237_1; |
| 149 | i8237_device *m_dma8237_2; |
| 150 | 150 | |
| 151 | 151 | UINT32 m_idle_skip_ram; |
| 152 | 152 | required_device<cpu_device> m_maincpu; |
| r21984 | r21985 | |
| 190 | 190 | |
| 191 | 191 | READ8_MEMBER(calchase_state::at_dma8237_2_r) |
| 192 | 192 | { |
| 193 | | device_t *device = machine().device("dma8237_2"); |
| 194 | | return i8237_r(device, space, offset / 2); |
| 193 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 195 | 194 | } |
| 196 | 195 | |
| 197 | 196 | WRITE8_MEMBER(calchase_state::at_dma8237_2_w) |
| 198 | 197 | { |
| 199 | | device_t *device = machine().device("dma8237_2"); |
| 200 | | i8237_w(device, space, offset / 2, data); |
| 198 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 201 | 199 | } |
| 202 | 200 | |
| 203 | 201 | READ8_MEMBER(calchase_state::at_page8_r) |
| r21984 | r21985 | |
| 248 | 246 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 249 | 247 | |
| 250 | 248 | /* Assert HLDA */ |
| 251 | | i8237_hlda_w( m_dma8237_1, state ); |
| 249 | m_dma8237_1->i8237_hlda_w(state); |
| 252 | 250 | } |
| 253 | 251 | |
| 254 | 252 | |
| r21984 | r21985 | |
| 579 | 577 | ADDRESS_MAP_END |
| 580 | 578 | |
| 581 | 579 | static ADDRESS_MAP_START( calchase_io, AS_IO, 32, calchase_state ) |
| 582 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 580 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 583 | 581 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 584 | 582 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 585 | 583 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
| r21984 | r21985 | |
| 819 | 817 | m_pit8254 = machine().device( "pit8254" ); |
| 820 | 818 | m_pic8259_1 = machine().device( "pic8259_1" ); |
| 821 | 819 | m_pic8259_2 = machine().device( "pic8259_2" ); |
| 822 | | m_dma8237_1 = machine().device( "dma8237_1" ); |
| 823 | | m_dma8237_2 = machine().device( "dma8237_2" ); |
| 820 | m_dma8237_1 = machine().device<i8237_device>( "dma8237_1" ); |
| 821 | m_dma8237_2 = machine().device<i8237_device>( "dma8237_2" ); |
| 824 | 822 | } |
| 825 | 823 | |
| 826 | 824 | /************************************************************* |
trunk/src/mame/drivers/pcxt.c
| r21984 | r21985 | |
| 426 | 426 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 427 | 427 | |
| 428 | 428 | /* Assert HLDA */ |
| 429 | | i8237_hlda_w( m_dma8237_1, state ); |
| 429 | m_dma8237_1->i8237_hlda_w( state ); |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | |
| r21984 | r21985 | |
| 557 | 557 | |
| 558 | 558 | static ADDRESS_MAP_START( pcxt_io_common, AS_IO, 8, pcxt_state ) |
| 559 | 559 | ADDRESS_MAP_GLOBAL_MASK(0x3ff) |
| 560 | | AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE_LEGACY("dma8237_1", i8237_r, i8237_w ) //8237 DMA Controller |
| 560 | AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE("dma8237_1", i8237_device, i8237_r, i8237_w ) //8237 DMA Controller |
| 561 | 561 | AM_RANGE(0x0020, 0x002f) AM_DEVREADWRITE_LEGACY("pic8259_1", pic8259_r, pic8259_w ) //8259 Interrupt control |
| 562 | 562 | AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w) //8253 PIT |
| 563 | 563 | AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) //PPI 8255 |
trunk/src/mame/drivers/zr107.c
| r21984 | r21985 | |
| 433 | 433 | AM_RANGE(0x78040000, 0x7804000f) AM_READWRITE_LEGACY(K001006_0_r, K001006_0_w) |
| 434 | 434 | AM_RANGE(0x780c0000, 0x780c0007) AM_READWRITE_LEGACY(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| 435 | 435 | AM_RANGE(0x7e000000, 0x7e003fff) AM_READWRITE8(sysreg_r, sysreg_w, 0xffffffff) |
| 436 | | AM_RANGE(0x7e008000, 0x7e009fff) AM_DEVREADWRITE8_LEGACY("k056230", k056230_r, k056230_w, 0xffffffff) /* LANC registers */ |
| 437 | | AM_RANGE(0x7e00a000, 0x7e00bfff) AM_DEVREADWRITE_LEGACY("k056230", lanc_ram_r, lanc_ram_w) /* LANC Buffer RAM (27E) */ |
| 436 | AM_RANGE(0x7e008000, 0x7e009fff) AM_DEVREADWRITE8("k056230", k056230_device, k056230_r, k056230_w, 0xffffffff) /* LANC registers */ |
| 437 | AM_RANGE(0x7e00a000, 0x7e00bfff) AM_DEVREADWRITE("k056230", k056230_device, lanc_ram_r, lanc_ram_w) /* LANC Buffer RAM (27E) */ |
| 438 | 438 | AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVWRITE_LEGACY("k056800", k056800_host_w) |
| 439 | 439 | AM_RANGE(0x7e00c008, 0x7e00c00f) AM_DEVREAD_LEGACY("k056800", k056800_host_r) |
| 440 | 440 | AM_RANGE(0x7f800000, 0x7f9fffff) AM_ROM AM_SHARE("share2") |
| r21984 | r21985 | |
| 461 | 461 | AM_RANGE(0x78080000, 0x7808000f) AM_MIRROR(0x80000000) AM_READWRITE_LEGACY(K001006_1_r, K001006_1_w) |
| 462 | 462 | AM_RANGE(0x780c0000, 0x780c0007) AM_MIRROR(0x80000000) AM_READWRITE_LEGACY(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| 463 | 463 | AM_RANGE(0x7e000000, 0x7e003fff) AM_MIRROR(0x80000000) AM_READWRITE8(sysreg_r, sysreg_w, 0xffffffff) |
| 464 | | AM_RANGE(0x7e008000, 0x7e009fff) AM_MIRROR(0x80000000) AM_DEVREADWRITE8_LEGACY("k056230", k056230_r, k056230_w, 0xffffffff) /* LANC registers */ |
| 465 | | AM_RANGE(0x7e00a000, 0x7e00bfff) AM_MIRROR(0x80000000) AM_DEVREADWRITE_LEGACY("k056230", lanc_ram_r, lanc_ram_w) /* LANC Buffer RAM (27E) */ |
| 464 | AM_RANGE(0x7e008000, 0x7e009fff) AM_MIRROR(0x80000000) AM_DEVREADWRITE8("k056230", k056230_device, k056230_r, k056230_w, 0xffffffff) /* LANC registers */ |
| 465 | AM_RANGE(0x7e00a000, 0x7e00bfff) AM_MIRROR(0x80000000) AM_DEVREADWRITE("k056230", k056230_device, lanc_ram_r, lanc_ram_w) /* LANC Buffer RAM (27E) */ |
| 466 | 466 | AM_RANGE(0x7e00c000, 0x7e00c007) AM_MIRROR(0x80000000) AM_DEVWRITE_LEGACY("k056800", k056800_host_w) |
| 467 | 467 | AM_RANGE(0x7e00c008, 0x7e00c00f) AM_MIRROR(0x80000000) AM_DEVREAD_LEGACY("k056800", k056800_host_r) |
| 468 | 468 | AM_RANGE(0x7f000000, 0x7f3fffff) AM_MIRROR(0x80000000) AM_ROM AM_REGION("user2", 0) |
trunk/src/mame/drivers/gticlub.c
| r21984 | r21985 | |
| 433 | 433 | AM_RANGE(0x78080000, 0x7808000f) AM_READWRITE_LEGACY(K001006_1_r, K001006_1_w) |
| 434 | 434 | AM_RANGE(0x780c0000, 0x780c0003) AM_READWRITE_LEGACY(cgboard_dsp_comm_r_ppc, cgboard_dsp_comm_w_ppc) |
| 435 | 435 | AM_RANGE(0x7e000000, 0x7e003fff) AM_READWRITE8(sysreg_r, sysreg_w, 0xffffffff) |
| 436 | | AM_RANGE(0x7e008000, 0x7e009fff) AM_DEVREADWRITE8_LEGACY("k056230", k056230_r, k056230_w, 0xffffffff) |
| 437 | | AM_RANGE(0x7e00a000, 0x7e00bfff) AM_DEVREADWRITE_LEGACY("k056230", lanc_ram_r, lanc_ram_w) |
| 436 | AM_RANGE(0x7e008000, 0x7e009fff) AM_DEVREADWRITE8("k056230", k056230_device, k056230_r, k056230_w, 0xffffffff) |
| 437 | AM_RANGE(0x7e00a000, 0x7e00bfff) AM_DEVREADWRITE("k056230", k056230_device, lanc_ram_r, lanc_ram_w) |
| 438 | 438 | AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVWRITE_LEGACY("k056800", k056800_host_w) |
| 439 | 439 | AM_RANGE(0x7e00c000, 0x7e00c007) AM_DEVREAD_LEGACY("k056800", k056800_host_r) // Hang Pilot |
| 440 | 440 | AM_RANGE(0x7e00c008, 0x7e00c00f) AM_DEVREAD_LEGACY("k056800", k056800_host_r) |
trunk/src/mame/drivers/taitowlf.c
| r21984 | r21985 | |
| 67 | 67 | required_device<device_t> m_pit8254; |
| 68 | 68 | required_device<device_t> m_pic8259_1; |
| 69 | 69 | required_device<device_t> m_pic8259_2; |
| 70 | | required_device<device_t> m_dma8237_1; |
| 71 | | required_device<device_t> m_dma8237_2; |
| 70 | required_device<i8237_device> m_dma8237_1; |
| 71 | required_device<i8237_device> m_dma8237_2; |
| 72 | 72 | required_memory_region m_region_user1; |
| 73 | 73 | required_memory_region m_region_user5; |
| 74 | 74 | required_memory_bank m_bank1; |
| r21984 | r21985 | |
| 135 | 135 | |
| 136 | 136 | READ8_MEMBER(taitowlf_state::at_dma8237_2_r) |
| 137 | 137 | { |
| 138 | | return i8237_r(m_dma8237_2, space, offset / 2); |
| 138 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | WRITE8_MEMBER(taitowlf_state::at_dma8237_2_w) |
| 142 | 142 | { |
| 143 | | i8237_w(m_dma8237_2, space, offset / 2, data); |
| 143 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | // Intel 82439TX System Controller (MXTC) |
| r21984 | r21985 | |
| 400 | 400 | m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 401 | 401 | |
| 402 | 402 | /* Assert HLDA */ |
| 403 | | i8237_hlda_w( m_dma8237_1, state ); |
| 403 | m_dma8237_1->i8237_hlda_w( state ); |
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | |
| r21984 | r21985 | |
| 487 | 487 | ADDRESS_MAP_END |
| 488 | 488 | |
| 489 | 489 | static ADDRESS_MAP_START(taitowlf_io, AS_IO, 32, taitowlf_state ) |
| 490 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 490 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 491 | 491 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 492 | 492 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 493 | 493 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/funkball.c
| r21984 | r21985 | |
| 337 | 337 | |
| 338 | 338 | READ8_MEMBER(funkball_state::at_dma8237_2_r) |
| 339 | 339 | { |
| 340 | | device_t *device = machine().device("dma8237_2"); |
| 341 | | return i8237_r(device, space, offset / 2); |
| 340 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 342 | 341 | } |
| 343 | 342 | |
| 344 | 343 | WRITE8_MEMBER(funkball_state::at_dma8237_2_w) |
| 345 | 344 | { |
| 346 | | device_t *device = machine().device("dma8237_2"); |
| 347 | | i8237_w(device, space, offset / 2, data); |
| 345 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 348 | 346 | } |
| 349 | 347 | |
| 350 | 348 | WRITE_LINE_MEMBER(funkball_state::pc_dma_hrq_changed) |
| r21984 | r21985 | |
| 352 | 350 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 353 | 351 | |
| 354 | 352 | /* Assert HLDA */ |
| 355 | | i8237_hlda_w( m_dma8237_1, state ); |
| 353 | m_dma8237_1->i8237_hlda_w( state ); |
| 356 | 354 | } |
| 357 | 355 | |
| 358 | 356 | |
| r21984 | r21985 | |
| 588 | 586 | ADDRESS_MAP_END |
| 589 | 587 | |
| 590 | 588 | static ADDRESS_MAP_START(funkball_io, AS_IO, 32, funkball_state) |
| 591 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 589 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 592 | 590 | AM_RANGE(0x0020, 0x003f) AM_READWRITE8(io20_r, io20_w, 0xffffffff) |
| 593 | 591 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 594 | 592 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/gamecstl.c
| r21984 | r21985 | |
| 93 | 93 | device_t *m_pit8254; |
| 94 | 94 | device_t *m_pic8259_1; |
| 95 | 95 | device_t *m_pic8259_2; |
| 96 | | device_t *m_dma8237_1; |
| 97 | | device_t *m_dma8237_2; |
| 96 | i8237_device *m_dma8237_1; |
| 97 | i8237_device *m_dma8237_2; |
| 98 | 98 | DECLARE_WRITE32_MEMBER(pnp_config_w); |
| 99 | 99 | DECLARE_WRITE32_MEMBER(pnp_data_w); |
| 100 | 100 | DECLARE_WRITE32_MEMBER(bios_ram_w); |
| r21984 | r21985 | |
| 191 | 191 | |
| 192 | 192 | READ8_MEMBER(gamecstl_state::at_dma8237_2_r) |
| 193 | 193 | { |
| 194 | | device_t *device = machine().device("dma8237_2"); |
| 195 | | return i8237_r(device, space, offset / 2); |
| 194 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 196 | 195 | } |
| 197 | 196 | |
| 198 | 197 | WRITE8_MEMBER(gamecstl_state::at_dma8237_2_w) |
| 199 | 198 | { |
| 200 | | device_t *device = machine().device("dma8237_2"); |
| 201 | | i8237_w(device, space, offset / 2, data); |
| 199 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 202 | 200 | } |
| 203 | 201 | |
| 204 | 202 | // Intel 82439TX System Controller (MXTC) |
| r21984 | r21985 | |
| 457 | 455 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 458 | 456 | |
| 459 | 457 | /* Assert HLDA */ |
| 460 | | i8237_hlda_w( m_dma8237_1, state ); |
| 458 | m_dma8237_1->i8237_hlda_w( state ); |
| 461 | 459 | } |
| 462 | 460 | |
| 463 | 461 | |
| r21984 | r21985 | |
| 527 | 525 | ADDRESS_MAP_END |
| 528 | 526 | |
| 529 | 527 | static ADDRESS_MAP_START(gamecstl_io, AS_IO, 32, gamecstl_state ) |
| 530 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 528 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 531 | 529 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 532 | 530 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 533 | 531 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
| r21984 | r21985 | |
| 614 | 612 | m_pit8254 = machine().device( "pit8254" ); |
| 615 | 613 | m_pic8259_1 = machine().device( "pic8259_1" ); |
| 616 | 614 | m_pic8259_2 = machine().device( "pic8259_2" ); |
| 617 | | m_dma8237_1 = machine().device( "dma8237_1" ); |
| 618 | | m_dma8237_2 = machine().device( "dma8237_2" ); |
| 615 | m_dma8237_1 = machine().device<i8237_device>( "dma8237_1" ); |
| 616 | m_dma8237_2 = machine().device<i8237_device>( "dma8237_2" ); |
| 619 | 617 | } |
| 620 | 618 | |
| 621 | 619 | void gamecstl_state::machine_reset() |
trunk/src/mame/drivers/gammagic.c
| r21984 | r21985 | |
| 86 | 86 | device_t *m_pit8254; |
| 87 | 87 | device_t *m_pic8259_1; |
| 88 | 88 | device_t *m_pic8259_2; |
| 89 | | device_t *m_dma8237_1; |
| 90 | | device_t *m_dma8237_2; |
| 89 | i8237_device *m_dma8237_1; |
| 90 | i8237_device *m_dma8237_2; |
| 91 | 91 | |
| 92 | 92 | emu_timer *m_atapi_timer; |
| 93 | 93 | //SCSIInstance *m_inserted_cdrom; |
| r21984 | r21985 | |
| 110 | 110 | |
| 111 | 111 | static READ8_DEVICE_HANDLER(at_dma8237_2_r) |
| 112 | 112 | { |
| 113 | | return i8237_r(device, space, offset / 2); |
| 113 | gammagic_state *state = space.machine().driver_data<gammagic_state>(); |
| 114 | return state->m_dma8237_2->i8237_r(space, offset / 2); |
| 114 | 115 | } |
| 115 | 116 | |
| 116 | 117 | static WRITE8_DEVICE_HANDLER(at_dma8237_2_w) |
| 117 | 118 | { |
| 118 | | i8237_w(device, space, offset / 2, data); |
| 119 | gammagic_state *state = space.machine().driver_data<gammagic_state>(); |
| 120 | state->m_dma8237_2->i8237_w(space, offset / 2, data); |
| 119 | 121 | } |
| 120 | 122 | |
| 121 | 123 | static READ8_HANDLER(at_page8_r) |
| r21984 | r21985 | |
| 163 | 165 | |
| 164 | 166 | static WRITE_LINE_DEVICE_HANDLER( pc_dma_hrq_changed ) |
| 165 | 167 | { |
| 168 | gammagic_state *drvstate = device->machine().driver_data<gammagic_state>(); |
| 166 | 169 | device->machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 167 | 170 | |
| 168 | 171 | /* Assert HLDA */ |
| 169 | | i8237_hlda_w( device, state ); |
| 172 | drvstate->m_dma8237_1->i8237_hlda_w( state ); |
| 170 | 173 | } |
| 171 | 174 | |
| 172 | 175 | static READ8_HANDLER( pc_dma_read_byte ) |
| r21984 | r21985 | |
| 552 | 555 | ADDRESS_MAP_END |
| 553 | 556 | |
| 554 | 557 | static ADDRESS_MAP_START( gammagic_io, AS_IO, 32, gammagic_state) |
| 555 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 558 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 556 | 559 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 557 | 560 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 558 | 561 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
| r21984 | r21985 | |
| 636 | 639 | state->m_pit8254 = machine.device( "pit8254" ); |
| 637 | 640 | state->m_pic8259_1 = machine.device( "pic8259_1" ); |
| 638 | 641 | state->m_pic8259_2 = machine.device( "pic8259_2" ); |
| 639 | | state->m_dma8237_1 = machine.device( "dma8237_1" ); |
| 640 | | state->m_dma8237_2 = machine.device( "dma8237_2" ); |
| 642 | state->m_dma8237_1 = machine.device<i8237_device>( "dma8237_1" ); |
| 643 | state->m_dma8237_2 = machine.device<i8237_device>( "dma8237_2" ); |
| 641 | 644 | } |
| 642 | 645 | |
| 643 | 646 | static MACHINE_RESET( gammagic ) |
trunk/src/mame/drivers/queen.c
| r21984 | r21985 | |
| 333 | 333 | |
| 334 | 334 | READ8_MEMBER(queen_state::at_dma8237_2_r) |
| 335 | 335 | { |
| 336 | | device_t *device = machine().device("dma8237_2"); |
| 337 | | return i8237_r(device, space, offset / 2); |
| 336 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 338 | 337 | } |
| 339 | 338 | |
| 340 | 339 | WRITE8_MEMBER(queen_state::at_dma8237_2_w) |
| 341 | 340 | { |
| 342 | | device_t *device = machine().device("dma8237_2"); |
| 343 | | i8237_w(device, space, offset / 2, data); |
| 341 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 344 | 342 | } |
| 345 | 343 | |
| 346 | 344 | WRITE_LINE_MEMBER(queen_state::pc_dma_hrq_changed) |
| r21984 | r21985 | |
| 348 | 346 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 349 | 347 | |
| 350 | 348 | /* Assert HLDA */ |
| 351 | | i8237_hlda_w( m_dma8237_1, state ); |
| 349 | m_dma8237_1->i8237_hlda_w( state ); |
| 352 | 350 | } |
| 353 | 351 | |
| 354 | 352 | |
| r21984 | r21985 | |
| 412 | 410 | ADDRESS_MAP_END |
| 413 | 411 | |
| 414 | 412 | static ADDRESS_MAP_START( queen_io, AS_IO, 32, queen_state ) |
| 415 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 413 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 416 | 414 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 417 | 415 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 418 | 416 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/mediagx.c
| r21984 | r21985 | |
| 443 | 443 | |
| 444 | 444 | READ8_MEMBER(mediagx_state::at_dma8237_2_r) |
| 445 | 445 | { |
| 446 | | device_t *device = machine().device("dma8237_2"); |
| 447 | | return i8237_r(device, space, offset / 2); |
| 446 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 448 | 447 | } |
| 449 | 448 | |
| 450 | 449 | WRITE8_MEMBER(mediagx_state::at_dma8237_2_w) |
| 451 | 450 | { |
| 452 | | device_t *device = machine().device("dma8237_2"); |
| 453 | | i8237_w(device, space, offset / 2, data); |
| 451 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 454 | 452 | } |
| 455 | 453 | |
| 456 | 454 | |
| r21984 | r21985 | |
| 885 | 883 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 886 | 884 | |
| 887 | 885 | /* Assert HLDA */ |
| 888 | | i8237_hlda_w( m_dma8237_1, state ); |
| 886 | m_dma8237_1->i8237_hlda_w( state ); |
| 889 | 887 | } |
| 890 | 888 | |
| 891 | 889 | |
| r21984 | r21985 | |
| 957 | 955 | ADDRESS_MAP_END |
| 958 | 956 | |
| 959 | 957 | static ADDRESS_MAP_START(mediagx_io, AS_IO, 32, mediagx_state ) |
| 960 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 958 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 961 | 959 | AM_RANGE(0x0020, 0x003f) AM_READWRITE8(io20_r, io20_w, 0xffffffff) |
| 962 | 960 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 963 | 961 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/xtom3d.c
| r21984 | r21985 | |
| 455 | 455 | |
| 456 | 456 | READ8_MEMBER(xtom3d_state::at_dma8237_2_r) |
| 457 | 457 | { |
| 458 | | device_t *device = machine().device("dma8237_2"); |
| 459 | | return i8237_r(device, space, offset / 2); |
| 458 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 460 | 459 | } |
| 461 | 460 | |
| 462 | 461 | WRITE8_MEMBER(xtom3d_state::at_dma8237_2_w) |
| 463 | 462 | { |
| 464 | | device_t *device = machine().device("dma8237_2"); |
| 465 | | i8237_w(device, space, offset / 2, data); |
| 463 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 466 | 464 | } |
| 467 | 465 | |
| 468 | 466 | WRITE_LINE_MEMBER(xtom3d_state::pc_dma_hrq_changed) |
| r21984 | r21985 | |
| 470 | 468 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 471 | 469 | |
| 472 | 470 | /* Assert HLDA */ |
| 473 | | i8237_hlda_w( m_dma8237_1, state ); |
| 471 | m_dma8237_1->i8237_hlda_w( state ); |
| 474 | 472 | } |
| 475 | 473 | |
| 476 | 474 | |
| r21984 | r21985 | |
| 539 | 537 | ADDRESS_MAP_END |
| 540 | 538 | |
| 541 | 539 | static ADDRESS_MAP_START(xtom3d_io, AS_IO, 32, xtom3d_state) |
| 542 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 540 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 543 | 541 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 544 | 542 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 545 | 543 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
trunk/src/mame/drivers/voyager.c
| r21984 | r21985 | |
| 43 | 43 | device_t *m_pit8254; |
| 44 | 44 | device_t *m_pic8259_1; |
| 45 | 45 | device_t *m_pic8259_2; |
| 46 | | device_t *m_dma8237_1; |
| 47 | | device_t *m_dma8237_2; |
| 46 | i8237_device *m_dma8237_1; |
| 47 | i8237_device *m_dma8237_2; |
| 48 | 48 | |
| 49 | 49 | UINT32 m_idle_skip_ram; |
| 50 | 50 | required_device<cpu_device> m_maincpu; |
| r21984 | r21985 | |
| 76 | 76 | |
| 77 | 77 | READ8_MEMBER(voyager_state::at_dma8237_2_r) |
| 78 | 78 | { |
| 79 | | device_t *device = machine().device("dma8237_2"); |
| 80 | | return i8237_r(device, space, offset / 2); |
| 79 | return m_dma8237_2->i8237_r(space, offset / 2); |
| 81 | 80 | } |
| 82 | 81 | |
| 83 | 82 | WRITE8_MEMBER(voyager_state::at_dma8237_2_w) |
| 84 | 83 | { |
| 85 | | device_t *device = machine().device("dma8237_2"); |
| 86 | | i8237_w(device, space, offset / 2, data); |
| 84 | m_dma8237_2->i8237_w(space, offset / 2, data); |
| 87 | 85 | } |
| 88 | 86 | |
| 89 | 87 | READ8_MEMBER(voyager_state::at_page8_r) |
| r21984 | r21985 | |
| 134 | 132 | machine().device("maincpu")->execute().set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); |
| 135 | 133 | |
| 136 | 134 | /* Assert HLDA */ |
| 137 | | i8237_hlda_w( m_dma8237_1, state ); |
| 135 | m_dma8237_1->i8237_hlda_w( state ); |
| 138 | 136 | } |
| 139 | 137 | |
| 140 | 138 | |
| r21984 | r21985 | |
| 420 | 418 | ADDRESS_MAP_END |
| 421 | 419 | |
| 422 | 420 | static ADDRESS_MAP_START( voyager_io, AS_IO, 32, voyager_state ) |
| 423 | | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8_LEGACY("dma8237_1", i8237_r, i8237_w, 0xffffffff) |
| 421 | AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("dma8237_1", i8237_device, i8237_r, i8237_w, 0xffffffff) |
| 424 | 422 | AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8_LEGACY("pic8259_1", pic8259_r, pic8259_w, 0xffffffff) |
| 425 | 423 | AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8_LEGACY("pit8254", pit8253_r, pit8253_w, 0xffffffff) |
| 426 | 424 | AM_RANGE(0x0060, 0x006f) AM_READWRITE8_LEGACY(kbdc8042_8_r, kbdc8042_8_w, 0xffffffff) |
| r21984 | r21985 | |
| 657 | 655 | m_pit8254 = machine().device( "pit8254" ); |
| 658 | 656 | m_pic8259_1 = machine().device( "pic8259_1" ); |
| 659 | 657 | m_pic8259_2 = machine().device( "pic8259_2" ); |
| 660 | | m_dma8237_1 = machine().device( "dma8237_1" ); |
| 661 | | m_dma8237_2 = machine().device( "dma8237_2" ); |
| 658 | m_dma8237_1 = machine().device<i8237_device>( "dma8237_1" ); |
| 659 | m_dma8237_2 = machine().device<i8237_device>( "dma8237_2" ); |
| 662 | 660 | } |
| 663 | 661 | |
| 664 | 662 | /************************************************************* |
trunk/src/mame/drivers/dkong.c
| r21984 | r21985 | |
| 556 | 556 | |
| 557 | 557 | WRITE8_MEMBER(dkong_state::p8257_drq_w) |
| 558 | 558 | { |
| 559 | | device_t *device = machine().device("dma8257"); |
| 560 | | i8257_drq0_w(device, data & 0x01); |
| 561 | | i8257_drq1_w(device, data & 0x01); |
| 559 | i8257_device *device = machine().device<i8257_device>("dma8257"); |
| 560 | device->i8257_drq0_w(data & 0x01); |
| 561 | device->i8257_drq1_w(data & 0x01); |
| 562 | 562 | } |
| 563 | 563 | |
| 564 | 564 | READ8_MEMBER(dkong_state::dkong_in2_r) |
| r21984 | r21985 | |
| 758 | 758 | AM_RANGE(0x6000, 0x6bff) AM_RAM |
| 759 | 759 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("sprite_ram") /* sprite set 1 */ |
| 760 | 760 | AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w) AM_SHARE("video_ram") |
| 761 | | AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE_LEGACY("dma8257", i8257_r, i8257_w) /* P8257 control registers */ |
| 761 | AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE("dma8257", i8257_device, i8257_r, i8257_w) /* P8257 control registers */ |
| 762 | 762 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls175.3d") /* IN0, sound CPU intf */ |
| 763 | 763 | AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(radarscp_grid_color_w)/* IN1 */ |
| 764 | 764 | |
| r21984 | r21985 | |
| 780 | 780 | AM_RANGE(0x6c00, 0x6fff) AM_RAM /* DK3 bootleg only */ |
| 781 | 781 | AM_RANGE(0x7000, 0x73ff) AM_RAM AM_SHARE("sprite_ram") /* sprite set 1 */ |
| 782 | 782 | AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w) AM_SHARE("video_ram") |
| 783 | | AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE_LEGACY("dma8257", i8257_r, i8257_w) /* P8257 control registers */ |
| 783 | AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE("dma8257", i8257_device, i8257_r, i8257_w) /* P8257 control registers */ |
| 784 | 784 | |
| 785 | 785 | AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls174.3d") /* IN0, sound interface */ |
| 786 | 786 | |
| r21984 | r21985 | |
| 853 | 853 | AM_RANGE(0x1600, 0x17ff) AM_RAM /* 0x6400 spriteram location */ |
| 854 | 854 | AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(dkong_videoram_w) AM_SHARE("video_ram") /* 0x7400 */ |
| 855 | 855 | AM_RANGE(0x1C00, 0x1f7f) AM_RAM /* 0x6000 */ |
| 856 | | AM_RANGE(0x1f80, 0x1f8f) AM_DEVREADWRITE_LEGACY("dma8257", i8257_r, i8257_w) /* P8257 control registers */ |
| 856 | AM_RANGE(0x1f80, 0x1f8f) AM_DEVREADWRITE("dma8257", i8257_device, i8257_r, i8257_w) /* P8257 control registers */ |
| 857 | 857 | /* 0x6800 not remapped */ |
| 858 | 858 | AM_RANGE(0x2000, 0x2fff) AM_ROM |
| 859 | 859 | AM_RANGE(0x3000, 0x3fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w) |