Previous 15994 Revisions Next

r3783 Monday 8th December, 2008 at 14:35:43 UTC by Miodrag Milanović
[C64][C128] Regression fix
[src/mess/drivers]c128.c c64.c
[src/mess/machine]c64.c

src/mess/machine/c64.c
r3782r3783
282282static UINT8 c64_cia0_port_b_r (const device_config *device)
283283{
284284    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"));
286286
287287    if (!(cia0porta & 0x80)) value &= c64_keyline[7];
288288    if (!(cia0porta & 0x40)) value &= c64_keyline[6];
r3782r3783
354354
355355void c64_vic_interrupt (int level)
356356{
357   const device_config *cia_0 = device_list_find_by_tag(Machine->config->devicelist, CIA6526R1, "cia_0");
357358#if 1
358359   if (level != vicirq)
359360   {
360      c64_irq (Machine, level || cia_get_irq(0));
361      c64_irq (Machine, level || cia_get_irq(cia_0));
361362      vicirq = level;
362363   }
363364#endif
r3782r3783
531532
532533   else if (offset == 0xc00)
533534      {
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] );
535536         return cia_r(cia_0, offset);
536537      }
537538
538539   else if (offset == 0xc01)
539540      {
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] );
541542         return cia_r(cia_0, offset);
542543      }
543544
r3782r3783
866867int c64_paddle_read (int which)
867868{
868869   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"));
870871   int controller1 = input_port_read(Machine, "CTRLSEL") & 0x07;
871872   int controller2 = input_port_read(Machine, "CTRLSEL") & 0x70;
872873
src/mess/drivers/c128.c
r3782r3783
251251   AM_RANGE(0xd400, 0xd4ff) AM_READWRITE(sid6581_0_port_r, sid6581_0_port_w)
252252   AM_RANGE(0xd500, 0xd5ff) AM_READWRITE(c128_mmu8722_port_r, c128_mmu8722_port_w)
253253   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)
256256/*  AM_RANGE(0xdf00, 0xdfff) AM_READWRITE(dma_port_r, dma_port_w) */
257257ADDRESS_MAP_END
258258
src/mess/drivers/c64.c
r3782r3783
349349   AM_RANGE(0xd000, 0xd3ff) AM_READWRITE(vic2_port_r, vic2_port_w)
350350   AM_RANGE(0xd400, 0xd7ff) AM_READWRITE(sid6581_0_port_r, sid6581_0_port_w)
351351   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)
353353   AM_RANGE(0xe000, 0xffff) AM_ROM AM_BASE(&c64_romh)            /* ram or kernel rom */
354354ADDRESS_MAP_END
355355

Previous 15994 Revisions Next


© 1998-2018 The MESS Team