src/mess/machine/c64.c
| r3782 | r3783 | |
| 282 | 282 | static UINT8 c64_cia0_port_b_r (const device_config *device) |
| 283 | 283 | { |
| 284 | 284 | UINT8 value = 0xff; |
| 285 | | UINT8 cia0porta = cia_get_output_a(0); |
| 285 | UINT8 cia0porta = cia_get_output_a(device_list_find_by_tag(device->machine->config->devicelist, CIA6526R1, "cia_0")); |
| 286 | 286 | |
| 287 | 287 | if (!(cia0porta & 0x80)) value &= c64_keyline[7]; |
| 288 | 288 | if (!(cia0porta & 0x40)) value &= c64_keyline[6]; |
| r3782 | r3783 | |
| 354 | 354 | |
| 355 | 355 | void c64_vic_interrupt (int level) |
| 356 | 356 | { |
| 357 | const device_config *cia_0 = device_list_find_by_tag(Machine->config->devicelist, CIA6526R1, "cia_0"); |
| 357 | 358 | #if 1 |
| 358 | 359 | if (level != vicirq) |
| 359 | 360 | { |
| 360 | | c64_irq (Machine, level || cia_get_irq(0)); |
| 361 | c64_irq (Machine, level || cia_get_irq(cia_0)); |
| 361 | 362 | vicirq = level; |
| 362 | 363 | } |
| 363 | 364 | #endif |
| r3782 | r3783 | |
| 531 | 532 | |
| 532 | 533 | else if (offset == 0xc00) |
| 533 | 534 | { |
| 534 | | cia_set_port_mask_value(0, 0, input_port_read(space->machine, "CTRLSEL") & 0x80 ? c64_keyline[8] : c64_keyline[9] ); |
| 535 | cia_set_port_mask_value(cia_0, 0, input_port_read(space->machine, "CTRLSEL") & 0x80 ? c64_keyline[8] : c64_keyline[9] ); |
| 535 | 536 | return cia_r(cia_0, offset); |
| 536 | 537 | } |
| 537 | 538 | |
| 538 | 539 | else if (offset == 0xc01) |
| 539 | 540 | { |
| 540 | | cia_set_port_mask_value(0, 1, input_port_read(space->machine, "CTRLSEL") & 0x80 ? c64_keyline[9] : c64_keyline[8] ); |
| 541 | cia_set_port_mask_value(cia_0, 1, input_port_read(space->machine, "CTRLSEL") & 0x80 ? c64_keyline[9] : c64_keyline[8] ); |
| 541 | 542 | return cia_r(cia_0, offset); |
| 542 | 543 | } |
| 543 | 544 | |
| r3782 | r3783 | |
| 866 | 867 | int c64_paddle_read (int which) |
| 867 | 868 | { |
| 868 | 869 | int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp; |
| 869 | | UINT8 cia0porta = cia_get_output_a(0); |
| 870 | UINT8 cia0porta = cia_get_output_a(device_list_find_by_tag(Machine->config->devicelist, CIA6526R1, "cia_0")); |
| 870 | 871 | int controller1 = input_port_read(Machine, "CTRLSEL") & 0x07; |
| 871 | 872 | int controller2 = input_port_read(Machine, "CTRLSEL") & 0x70; |
| 872 | 873 | |
src/mess/drivers/c128.c
| r3782 | r3783 | |
| 251 | 251 | AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(sid6581_0_port_r, sid6581_0_port_w) |
| 252 | 252 | AM_RANGE(0xd500, 0xd5ff) AM_READWRITE(c128_mmu8722_port_r, c128_mmu8722_port_w) |
| 253 | 253 | AM_RANGE(0xd600, 0xd7ff) AM_READWRITE(vdc8563_port_r, vdc8563_port_w) |
| 254 | | AM_RANGE(0xdc00, 0xdcff) AM_DEVREADWRITE(CIA6526R1, "cia", cia_r, cia_w) |
| 255 | | AM_RANGE(0xdd00, 0xddff) AM_DEVREADWRITE(CIA6526R1, "cia", cia_r, cia_w) |
| 254 | AM_RANGE(0xdc00, 0xdcff) AM_DEVREADWRITE(CIA6526R1, "cia_0", cia_r, cia_w) |
| 255 | AM_RANGE(0xdd00, 0xddff) AM_DEVREADWRITE(CIA6526R1, "cia_1", cia_r, cia_w) |
| 256 | 256 | /* AM_RANGE(0xdf00, 0xdfff) AM_READWRITE(dma_port_r, dma_port_w) */ |
| 257 | 257 | ADDRESS_MAP_END |
| 258 | 258 | |
src/mess/drivers/c64.c
| r3782 | r3783 | |
| 349 | 349 | AM_RANGE(0xd000, 0xd3ff) AM_READWRITE(vic2_port_r, vic2_port_w) |
| 350 | 350 | AM_RANGE(0xd400, 0xd7ff) AM_READWRITE(sid6581_0_port_r, sid6581_0_port_w) |
| 351 | 351 | AM_RANGE(0xd800, 0xdbff) AM_READWRITE(SMH_RAM, c64_colorram_write) AM_BASE(&c64_colorram) /* colorram */ |
| 352 | | AM_RANGE(0xdc00, 0xdcff) AM_DEVREADWRITE(CIA6526R1, "cia", cia_r, cia_w) |
| 352 | AM_RANGE(0xdc00, 0xdcff) AM_DEVREADWRITE(CIA6526R1, "cia_0", cia_r, cia_w) |
| 353 | 353 | AM_RANGE(0xe000, 0xffff) AM_ROM AM_BASE(&c64_romh) /* ram or kernel rom */ |
| 354 | 354 | ADDRESS_MAP_END |
| 355 | 355 | |