Previous 15994 Revisions Next

r2803 Monday 2nd June, 2008 at 12:42:26 UTC by Roberto Zandonà
[C128] fix joystick
[src/mess/machine]c128.c

src/mess/machine/c128.c
r2802r2803
133133
134134static READ8_HANDLER( c128_read_io )
135135{
136   switch ((offset&0xf00)>>8) {
137   case 0:case 1: case 2: case 3:
136   if (offset < 0x400)
138137      return vic2_port_r (machine, offset & 0x3ff);
139   case 4:
138   else if (offset < 0x500)
140139      return sid6581_0_port_r (machine, offset & 0xff);
141   case 5:
140   else if (offset < 0x600)
142141      return c128_mmu8722_port_r (machine, offset & 0xff);
143   case 6:case 7:
142   else if (offset < 0x800)
144143      return vdc8563_port_r (machine, offset & 0xff);
145   case 8: case 9: case 0xa: case 0xb:
144   else if (offset < 0xc00)
146145      return c64_colorram[offset & 0x3ff];
147   case 0xc:
146   else if (offset == 0xc00)
147      {
148         cia_set_port_mask_value(0, 0, input_port_read(Machine, "DSW0") & 0x0100 ? c64_keyline[8] : c64_keyline[9] );
149         return cia_0_r(machine, offset);
150      }
151   else if (offset == 0xc01)
152      {
153         cia_set_port_mask_value(0, 1, input_port_read(Machine, "DSW0") & 0x0100 ? c64_keyline[9] : c64_keyline[8] );
154         return cia_0_r(machine, offset);
155      }
156   else if (offset < 0xd00)
148157      return cia_0_r(machine, offset);
149   case 0xd:
158   else if (offset < 0xe00)
150159      return cia_1_r(machine, offset);
151   case 0xf:
160   else if ((offset >= 0xf00) & (offset <= 0xfff))
152161      return c128_dma8726_port_r(machine, offset&0xff);
153   case 0xe:default:
154      DBG_LOG (1, "io read", ("%.3x\n", offset));
155      return 0xff;
156   }
162   DBG_LOG (1, "io read", ("%.3x\n", offset));
163   return 0xff;
157164}
158165
159166void c128_bankswitch_64 (running_machine *machine, int reset)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team