src/mess/drivers/pc.c
| r871 | r872 | |
| 86 | 86 | #define GAMEBLASTER |
| 87 | 87 | |
| 88 | 88 | |
| 89 | static READ8_HANDLER( pc_YM3812_0_r ) |
| 90 | { |
| 91 | if ((offset % 1) == 0) |
| 92 | return YM3812_status_port_0_r(0); |
| 93 | else |
| 94 | return 0x00; |
| 95 | } |
| 89 | 96 | |
| 90 | | static READ16_HANDLER( pc16le_YM3812_status_port_0_r ) { return read16le_with_read8_handler(YM3812_status_port_0_r, offset, mem_mask); } |
| 91 | | static WRITE16_HANDLER( pc16le_YM3812_control_port_0_w ) { write16le_with_write8_handler(YM3812_control_port_0_w, offset, data, mem_mask); } |
| 92 | | static WRITE16_HANDLER( pc16le_YM3812_write_port_0_w ) { write16le_with_write8_handler(YM3812_write_port_0_w, offset, data, mem_mask); } |
| 97 | static WRITE8_HANDLER( pc_YM3812_0_w ) |
| 98 | { |
| 99 | if ((offset % 1) == 0) |
| 100 | YM3812_control_port_0_w(0, data); |
| 101 | else |
| 102 | YM3812_write_port_0_w(0, data); |
| 103 | } |
| 104 | |
| 105 | static READ16_HANDLER( pc16le_YM3812_0_r ) { return read16le_with_read8_handler(pc_YM3812_0_r, offset, mem_mask); } |
| 106 | static WRITE16_HANDLER( pc16le_YM3812_0_w ) { write16le_with_write8_handler(pc_YM3812_0_w, offset, data, mem_mask); } |
| 107 | |
| 93 | 108 | static WRITE16_HANDLER( pc16le_SN76496_0_w ) { write16le_with_write8_handler(SN76496_0_w, offset, data, mem_mask); } |
| 94 | 109 | |
| 95 | 110 | // IO Expansion, only a little bit for ibm bios self tests |
| r871 | r872 | |
| 136 | 151 | AM_RANGE(0x0340, 0x0357) AM_READ(return8_FF) /* anonymous bios should not recogniced realtimeclock */ |
| 137 | 152 | AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_parallelport1_r, pc_parallelport1_w) |
| 138 | 153 | #ifdef ADLIB |
| 139 | | AM_RANGE(0x0388, 0x0388) AM_READWRITE(YM3812_status_port_0_r, YM3812_control_port_0_w) |
| 140 | | AM_RANGE(0x0389, 0x0389) AM_WRITE( YM3812_write_port_0_w) |
| 154 | AM_RANGE(0x0388, 0x0389) AM_READWRITE(pc_YM3812_0_r, pc_YM3812_0_w) |
| 141 | 155 | #endif |
| 142 | 156 | AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc_parallelport0_r, pc_parallelport0_w) |
| 143 | 157 | AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_2_r, uart8250_2_w) |
| r871 | r872 | |
| 166 | 180 | AM_RANGE(0x0340, 0x0357) AM_READ(return16_FFFF) /* anonymous bios should not recogniced realtimeclock */ |
| 167 | 181 | AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc16le_parallelport1_r, pc16le_parallelport1_w) |
| 168 | 182 | #ifdef ADLIB |
| 169 | | AM_RANGE(0x0388, 0x0388) AM_READWRITE(pc16le_YM3812_status_port_0_r, pc16le_YM3812_control_port_0_w) |
| 170 | | AM_RANGE(0x0389, 0x0389) AM_WRITE( pc16le_YM3812_write_port_0_w) |
| 183 | AM_RANGE(0x0388, 0x0389) AM_READWRITE(pc16le_YM3812_0_r, pc16le_YM3812_0_w) |
| 171 | 184 | #endif |
| 172 | | AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 185 | AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 173 | 186 | AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_16le_2_r, uart8250_16le_2_w) |
| 174 | 187 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc16le_fdc_r, pc16le_fdc_w) |
| 175 | 188 | AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_16le_0_r, uart8250_16le_0_w) |
| r871 | r872 | |
| 205 | 218 | AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc_HDC2_r, pc_HDC2_w) |
| 206 | 219 | AM_RANGE(0x0378, 0x037b) AM_READWRITE(pc_parallelport1_r, pc_parallelport1_w) |
| 207 | 220 | #ifdef ADLIB |
| 208 | | AM_RANGE(0x0388, 0x0388) AM_READWRITE(YM3812_status_port_0_r, YM3812_control_port_0_w) |
| 209 | | AM_RANGE(0x0389, 0x0389) AM_WRITE( YM3812_write_port_0_w) |
| 221 | AM_RANGE(0x0388, 0x0389) AM_READWRITE(pc_YM3812_0_r, pc_YM3812_0_w) |
| 210 | 222 | #endif |
| 211 | | // AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 223 | // AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 212 | 224 | AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_2_r, uart8250_2_w) |
| 213 | 225 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc_fdc_r, pc_fdc_w) |
| 214 | 226 | AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_0_r, uart8250_0_w) |
| r871 | r872 | |
| 255 | 267 | AM_RANGE(0x0020, 0x0021) AM_READWRITE(pic8259_16le_0_r, pic8259_16le_0_w) |
| 256 | 268 | AM_RANGE(0x0040, 0x0043) AM_READWRITE(pit8253_16le_0_r, pit8253_16le_0_w) |
| 257 | 269 | AM_RANGE(0x0060, 0x0065) AM_READWRITE(pc1640_16le_port60_r, pc1640_16le_port60_w) |
| 258 | | AM_RANGE(0x0078, 0x0078) AM_READWRITE(pc1640_16le_mouse_x_r, pc1640_16le_mouse_x_w) |
| 259 | | AM_RANGE(0x007a, 0x007a) AM_READWRITE(pc1640_16le_mouse_y_r, pc1640_16le_mouse_y_w) |
| 270 | AM_RANGE(0x0078, 0x0079) AM_READWRITE(pc1640_16le_mouse_x_r, pc1640_16le_mouse_x_w) |
| 271 | AM_RANGE(0x007a, 0x007b) AM_READWRITE(pc1640_16le_mouse_y_r, pc1640_16le_mouse_y_w) |
| 260 | 272 | AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page16le_r, pc_page16le_w) |
| 261 | 273 | AM_RANGE(0x0200, 0x0207) AM_READWRITE(pc16le_JOY_r, pc16le_JOY_w) |
| 262 | 274 | AM_RANGE(0x0278, 0x027b) AM_READWRITE(pc16le_parallelport2_r, pc16le_parallelport2_w) |
| r871 | r872 | |
| 265 | 277 | AM_RANGE(0x0320, 0x0323) AM_READWRITE(pc16le_HDC1_r, pc16le_HDC1_w) |
| 266 | 278 | AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc16le_HDC2_r, pc16le_HDC2_w) |
| 267 | 279 | AM_RANGE(0x0378, 0x037b) AM_READWRITE(pc200_16le_port378_r, pc16le_parallelport1_w) |
| 268 | | AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 280 | AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 269 | 281 | AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_16le_2_r, uart8250_16le_2_w) |
| 270 | 282 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc16le_fdc_r, pc16le_fdc_w) |
| 271 | 283 | AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_16le_0_r, uart8250_16le_0_w) |
| r871 | r872 | |
| 289 | 301 | AM_RANGE(0x0040, 0x0043) AM_READWRITE(pit8253_16le_0_r, pit8253_16le_0_w) |
| 290 | 302 | AM_RANGE(0x0060, 0x0065) AM_READWRITE(pc1640_16le_port60_r, pc1640_16le_port60_w) |
| 291 | 303 | AM_RANGE(0x0070, 0x0071) AM_READWRITE(mc146818_port16le_r, mc146818_port16le_w) |
| 292 | | AM_RANGE(0x0078, 0x0078) AM_READWRITE(pc1640_16le_mouse_x_r, pc1640_16le_mouse_x_w) |
| 293 | | AM_RANGE(0x007a, 0x007a) AM_READWRITE(pc1640_16le_mouse_y_r, pc1640_16le_mouse_y_w) |
| 304 | AM_RANGE(0x0078, 0x0079) AM_READWRITE(pc1640_16le_mouse_x_r, pc1640_16le_mouse_x_w) |
| 305 | AM_RANGE(0x007a, 0x007b) AM_READWRITE(pc1640_16le_mouse_y_r, pc1640_16le_mouse_y_w) |
| 294 | 306 | AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page16le_r, pc_page16le_w) |
| 295 | 307 | AM_RANGE(0x0200, 0x0207) AM_READWRITE(pc16le_JOY_r, pc16le_JOY_w) |
| 296 | 308 | AM_RANGE(0x0278, 0x027b) AM_READWRITE(pc16le_parallelport2_r, pc16le_parallelport2_w) |
| r871 | r872 | |
| 299 | 311 | AM_RANGE(0x0320, 0x0323) AM_READWRITE(pc16le_HDC1_r, pc16le_HDC1_w) |
| 300 | 312 | AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc16le_HDC2_r, pc16le_HDC2_w) |
| 301 | 313 | AM_RANGE(0x0378, 0x037b) AM_READWRITE(pc1640_16le_port378_r, pc16le_parallelport1_w) |
| 302 | | AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 314 | AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r, pc16le_parallelport0_w) |
| 303 | 315 | AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_16le_2_r, uart8250_16le_2_w) |
| 304 | 316 | AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc16le_fdc_r, pc16le_fdc_w) |
| 305 | 317 | AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_16le_0_r, uart8250_16le_0_w) |