src/mess/drivers/samcoupe.c
| r4252 | r4253 | |
| 60 | 60 | #include "cpu/z80/z80.h" |
| 61 | 61 | #include "machine/wd17xx.h" |
| 62 | 62 | #include "machine/msm6242.h" |
| 63 | #include "machine/ctronics.h" |
| 63 | 64 | #include "sound/saa1099.h" |
| 64 | 65 | #include "sound/speaker.h" |
| 65 | 66 | |
| r4252 | r4253 | |
| 296 | 297 | } |
| 297 | 298 | |
| 298 | 299 | |
| 300 | static READ8_HANDLER( samcoupe_lpt1_busy_r ) |
| 301 | { |
| 302 | const device_config *printer = devtag_get_device(space->machine, CENTRONICS, "lpt1"); |
| 303 | return centronics_busy_r(printer); |
| 304 | } |
| 299 | 305 | |
| 306 | |
| 307 | static WRITE8_HANDLER( samcoupe_lpt1_strobe_w ) |
| 308 | { |
| 309 | const device_config *printer = devtag_get_device(space->machine, CENTRONICS, "lpt1"); |
| 310 | centronics_strobe_w(printer, data); |
| 311 | } |
| 312 | |
| 313 | |
| 314 | static READ8_HANDLER( samcoupe_lpt2_busy_r ) |
| 315 | { |
| 316 | const device_config *printer = devtag_get_device(space->machine, CENTRONICS, "lpt2"); |
| 317 | return centronics_busy_r(printer); |
| 318 | } |
| 319 | |
| 320 | |
| 321 | static WRITE8_HANDLER( samcoupe_lpt2_strobe_w ) |
| 322 | { |
| 323 | const device_config *printer = devtag_get_device(space->machine, CENTRONICS, "lpt2"); |
| 324 | centronics_strobe_w(printer, data); |
| 325 | } |
| 326 | |
| 327 | |
| 328 | |
| 300 | 329 | /************************************* |
| 301 | 330 | * |
| 302 | 331 | * Address maps |
| r4252 | r4253 | |
| 314 | 343 | static ADDRESS_MAP_START( samcoupe_io, ADDRESS_SPACE_IO, 8 ) |
| 315 | 344 | AM_RANGE(0x80, 0x81) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_WRITE(samcoupe_ext_mem_w) |
| 316 | 345 | AM_RANGE(0xe0, 0xe7) AM_MIRROR(0xff10) AM_MASK(0xffff) AM_READWRITE(samcoupe_disk_r, samcoupe_disk_w) |
| 346 | AM_RANGE(0xe8, 0xe8) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE(CENTRONICS, "lpt1", centronics_data_w) |
| 347 | AM_RANGE(0xe9, 0xe9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lpt1_busy_r, samcoupe_lpt1_strobe_w) |
| 348 | AM_RANGE(0xea, 0xea) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_DEVWRITE(CENTRONICS, "lpt2", centronics_data_w) |
| 349 | AM_RANGE(0xeb, 0xeb) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lpt2_busy_r, samcoupe_lpt2_strobe_w) |
| 317 | 350 | AM_RANGE(0xf8, 0xf8) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_pen_r, samcoupe_clut_w) |
| 318 | 351 | AM_RANGE(0xf9, 0xf9) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_status_r, samcoupe_line_int_w) |
| 319 | 352 | AM_RANGE(0xfa, 0xfa) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_lmpr_r, samcoupe_lmpr_w) |
| r4252 | r4253 | |
| 539 | 572 | |
| 540 | 573 | /* devices */ |
| 541 | 574 | MDRV_DRIVER_DATA(coupe_asic) |
| 575 | MDRV_CENTRONICS_ADD("lpt1", standard_centronics) |
| 576 | MDRV_CENTRONICS_ADD("lpt2", standard_centronics) |
| 542 | 577 | MDRV_MSM6242_ADD("sambus_clock") |
| 543 | 578 | |
| 544 | 579 | /* sound hardware */ |