Previous 15994 Revisions Next

r8560 Wednesday 21st July, 2010 at 08:45:42 UTC by Miodrag Milanović
Removed usage of deprecated devtag_get_device call.
[src/mess/drivers]pasopia.c pv2000.c

src/mess/drivers/pasopia.c
r8559r8560
190190   {
191191      res &= p7_vram[offset | 0x8000];
192192      attr_latch = p7_vram[offset | 0xc000];
193      i8255a_w(devtag_get_device(space->machine, "ppi8255_0"), 1,  (attr_latch << 4) | (attr_latch & 0x7));
193      i8255a_w(space->machine->device("ppi8255_0"), 1,  (attr_latch << 4) | (attr_latch & 0x7));
194194   }
195195
196196   return res;
r8559r8560
215215         p7_vram[offset | 0x8000] = (plane_reg & 4) ? data : 0xff;
216216         attr_latch = attr_wrap ? attr_latch : attr_data;
217217         p7_vram[offset | 0xc000] = attr_latch;
218         i8255a_w(devtag_get_device(space->machine, "ppi8255_0"), 1, (attr_latch << 4) | (attr_latch & 0x7));
218         i8255a_w(space->machine->device("ppi8255_0"), 1, (attr_latch << 4) | (attr_latch & 0x7));
219219      }
220220   }
221221}
r8559r8560
327327   if(offset == 0)
328328   {
329329      addr_latch = data;
330      mc6845_address_w(devtag_get_device(space->machine, "crtc"), 0,data);
330      mc6845_address_w(space->machine->device("crtc"), 0,data);
331331   }
332332   else
333333   {
r8559r8560
337337      else if(addr_latch == 0x0f)
338338         cursor_addr = (cursor_addr & 0x3f00) | (data & 0xff);
339339
340      mc6845_register_w(devtag_get_device(space->machine, "crtc"), 0,data);
340      mc6845_register_w(space->machine->device("crtc"), 0,data);
341341   }
342342}
343343
r8559r8560
356356
357357   io_port = offset & 0xff; //trim down to 8-bit bus
358358
359   if(io_port >= 0x08 && io_port <= 0x0b)       { return i8255a_r(devtag_get_device(space->machine, "ppi8255_0"), (io_port-0x08) & 3); }
360   else if(io_port >= 0x0c && io_port <= 0x0f) { return i8255a_r(devtag_get_device(space->machine, "ppi8255_1"), (io_port-0x0c) & 3); }
359   if(io_port >= 0x08 && io_port <= 0x0b)       { return i8255a_r(space->machine->device("ppi8255_0"), (io_port-0x08) & 3); }
360   else if(io_port >= 0x0c && io_port <= 0x0f) { return i8255a_r(space->machine->device("ppi8255_1"), (io_port-0x0c) & 3); }
361361//   else if(io_port == 0x10 || io_port == 0x11) { M6845 read }
362362   else if(io_port >= 0x18 && io_port <= 0x1b) { return pac2_r(space, io_port-0x1b);  }
363   else if(io_port >= 0x20 && io_port <= 0x23) { return i8255a_r(devtag_get_device(space->machine, "ppi8255_2"), (io_port-0x20) & 3); }
364   else if(io_port >= 0x28 && io_port <= 0x2b) { return z80ctc_r(devtag_get_device(space->machine, "ctc"), io_port-0x28);  }
365   else if(io_port >= 0x30 && io_port <= 0x33) { return z80pio_cd_ba_r(devtag_get_device(space->machine, "z80pio_0"), (io_port-0x30) & 3); }
363   else if(io_port >= 0x20 && io_port <= 0x23) { return i8255a_r(space->machine->device("ppi8255_2"), (io_port-0x20) & 3); }
364   else if(io_port >= 0x28 && io_port <= 0x2b) { return z80ctc_r(space->machine->device("ctc"), io_port-0x28);  }
365   else if(io_port >= 0x30 && io_port <= 0x33) { return z80pio_cd_ba_r(space->machine->device("z80pio_0"), (io_port-0x30) & 3); }
366366//   else if(io_port == 0x3a)                  { SN1 }
367367//   else if(io_port == 0x3b)                  { SN2 }
368368//   else if(io_port == 0x3c)                  { bankswitch }
r8559r8560
388388
389389   io_port = offset & 0xff; //trim down to 8-bit bus
390390
391   if(io_port >= 0x08 && io_port <= 0x0b)       { i8255a_w(devtag_get_device(space->machine, "ppi8255_0"), (io_port-0x08) & 3, data); }
392   else if(io_port >= 0x0c && io_port <= 0x0f) { i8255a_w(devtag_get_device(space->machine, "ppi8255_1"), (io_port-0x0c) & 3, data); }
391   if(io_port >= 0x08 && io_port <= 0x0b)       { i8255a_w(space->machine->device("ppi8255_0"), (io_port-0x08) & 3, data); }
392   else if(io_port >= 0x0c && io_port <= 0x0f) { i8255a_w(space->machine->device("ppi8255_1"), (io_port-0x0c) & 3, data); }
393393   else if(io_port >= 0x10 && io_port <= 0x11) { pasopia7_6845_w(space, io_port-0x10, data); }
394394   else if(io_port >= 0x18 && io_port <= 0x1b) { pac2_w(space, io_port-0x1b, data);  }
395   else if(io_port >= 0x20 && io_port <= 0x23) { i8255a_w(devtag_get_device(space->machine, "ppi8255_2"), (io_port-0x20) & 3, data); }
396   else if(io_port >= 0x28 && io_port <= 0x2b) { z80ctc_w(devtag_get_device(space->machine, "ctc"), io_port-0x28,data);  }
397   else if(io_port >= 0x30 && io_port <= 0x33) { z80pio_cd_ba_w(devtag_get_device(space->machine, "z80pio_0"), (io_port-0x30) & 3, data); }
398   else if(io_port == 0x3a)                  { sn76496_w(devtag_get_device(space->machine, "sn1"), 0, data); }
399   else if(io_port == 0x3b)                  { sn76496_w(devtag_get_device(space->machine, "sn2"), 0, data); }
395   else if(io_port >= 0x20 && io_port <= 0x23) { i8255a_w(space->machine->device("ppi8255_2"), (io_port-0x20) & 3, data); }
396   else if(io_port >= 0x28 && io_port <= 0x2b) { z80ctc_w(space->machine->device("ctc"), io_port-0x28,data);  }
397   else if(io_port >= 0x30 && io_port <= 0x33) { z80pio_cd_ba_w(space->machine->device("z80pio_0"), (io_port-0x30) & 3, data); }
398   else if(io_port == 0x3a)                  { sn76496_w(space->machine->device("sn1"), 0, data); }
399   else if(io_port == 0x3b)                  { sn76496_w(space->machine->device("sn2"), 0, data); }
400400   else if(io_port == 0x3c)                  { pasopia7_memory_ctrl_w(space,0, data); }
401401//   else if(io_port >= 0xe0 && io_port <= 0xe6) { fdc }
402402   else
r8559r8560
556556//   printf("SYSTEM MISC %02x\n",data);
557557
558558//   if(data & 1)
559//      i8255a_w(devtag_get_device(device->machine, "ppi8255_2"), 1, 0);
559//      i8255a_w(device->machine->device("ppi8255_2"), 1, 0);
560560
561561}
562562
src/mess/drivers/pv2000.c
r8559r8560
368368   state->key_pressed = 0;
369369   state->keyb_column = 0;
370370
371   cpu_set_input_line_vector(devtag_get_device(machine, "maincpu"), INPUT_LINE_IRQ0, 0xff);
371   cpu_set_input_line_vector(machine->device("maincpu"), INPUT_LINE_IRQ0, 0xff);
372372   memset(&memory_region(machine, "maincpu")[0x7000], 0xff, 0x1000);   // initialize RAM
373373}
374374

Previous 15994 Revisions Next


© 1998-2018 The MESS Team