Previous 15994 Revisions Next

r6341 Sunday 8th November, 2009 at 21:05:20 UTC by Curt Coder
[ABC80X] Fixed crash.
[src/emu]devcb.c
[src/mess/machine]conkort.c

src/emu/devcb.c
r6340r6341
226226   else if (config->type >= DEVCB_TYPE_MEMORY(ADDRESS_SPACE_PROGRAM) && config->type < DEVCB_TYPE_MEMORY(ADDRESS_SPACES) && config->readspace != NULL)
227227   {
228228      FPTR space = (FPTR)config->type - (FPTR)DEVCB_TYPE_MEMORY(ADDRESS_SPACE_PROGRAM);
229      const device_config *cpu = cputag_get_cpu(device->machine, config->tag);
229      const device_config *cpu;
230230
231      if (device->owner != NULL)
232         cpu = device_find_child_by_tag(device->owner, config->tag);
233      else
234         cpu = cputag_get_cpu(device->machine, config->tag);
235
231236      if (cpu == NULL)
232237         fatalerror("devcb_resolve_read8: unable to find CPU '%s' (requested by %s '%s')", config->tag, device_get_name(device), device->tag);
233238      resolved->target = memory_find_address_space(cpu, space);
r6340r6341
279284   if (config->type >= DEVCB_TYPE_MEMORY(ADDRESS_SPACE_PROGRAM) && config->type < DEVCB_TYPE_MEMORY(ADDRESS_SPACES) && config->writespace != NULL)
280285   {
281286      FPTR space = (FPTR)config->type - (FPTR)DEVCB_TYPE_MEMORY(ADDRESS_SPACE_PROGRAM);
282      const device_config *cpu = cputag_get_cpu(device->machine, config->tag);
287      const device_config *cpu;
283288
289      if (device->owner != NULL)
290         cpu = device_find_child_by_tag(device->owner, config->tag);
291      else
292         cpu = cputag_get_cpu(device->machine, config->tag);
293
284294      if (cpu == NULL)
285295         fatalerror("devcb_resolve_write8: unable to find CPU '%s' (requested by %s '%s')", config->tag, device_get_name(device), device->tag);
286296      resolved->target = memory_find_address_space(cpu, space);
src/mess/machine/conkort.c
r6340r6341
632632
633633static Z80DMA_INTERFACE( dma_intf )
634634{
635   DEVCB_CPU_INPUT_LINE("conkort:5a", INPUT_LINE_HALT),
636   DEVCB_CPU_INPUT_LINE("conkort:5a", INPUT_LINE_IRQ0),
635   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_HALT),
636   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
637637   DEVCB_NULL,
638   DEVCB_MEMORY_HANDLER("conkort:5a", PROGRAM, memory_read_byte),
639   DEVCB_MEMORY_HANDLER("conkort:5a", PROGRAM, memory_write_byte),
640   DEVCB_MEMORY_HANDLER("conkort:5a", IO, memory_read_byte),
641   DEVCB_MEMORY_HANDLER("conkort:5a", IO, memory_write_byte)
638   DEVCB_MEMORY_HANDLER(Z80_TAG, PROGRAM, memory_read_byte),
639   DEVCB_MEMORY_HANDLER(Z80_TAG, PROGRAM, memory_write_byte),
640   DEVCB_MEMORY_HANDLER(Z80_TAG, IO, memory_read_byte),
641   DEVCB_MEMORY_HANDLER(Z80_TAG, IO, memory_write_byte)
642642};
643643
644644static const z80_daisy_chain fast_daisy_chain[] =
r6340r6341
652652static WRITE_LINE_DEVICE_HANDLER( slow_wd1791_intrq_w )
653653{
654654   slow_t *conkort = get_safe_token_machine_slow(device->machine);
655
655656   conkort->fdc_irq = state;
656657}
657658
r6340r6341
659660{
660661   DEVCB_LINE(slow_wd1791_intrq_w),
661662   DEVCB_NULL,
662   {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
663   { FLOPPY_0, FLOPPY_1, NULL, NULL }
663664};
664665
665666/* FD1793 */
666667
667static WRITE_LINE_DEVICE_HANDLER( fast_wd1793_drq_w )
668{
669   fast_t *conkort = get_safe_token_machine_fast(device->machine);
670   z80dma_rdy_w(conkort->z80dma, state);
671}
672
673668static const wd17xx_interface fast_wd17xx_interface =
674669{
675670   DEVCB_NULL,
676   DEVCB_LINE(fast_wd1793_drq_w),
677   {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3}
671   DEVCB_DEVICE_LINE(Z80DMA_TAG, z80dma_rdy_w),
672   { FLOPPY_0, FLOPPY_1, NULL, NULL }
678673};
679674
680675/* Machine Driver */
r6340r6341
836831
837832static DEVICE_RESET( luxor_55_21046 )
838833{
834   floppy_drive_set_motor_state(get_floppy_image(device->machine, 0), 1);
835   floppy_drive_set_motor_state(get_floppy_image(device->machine, 1), 1);
836   floppy_drive_set_ready_state(get_floppy_image(device->machine, 0), 1, 1);
837   floppy_drive_set_ready_state(get_floppy_image(device->machine, 1), 1, 1);
839838}
840839
841840/*-------------------------------------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team