Previous 15994 Revisions Next

r8127 Friday 21st May, 2010 at 13:42:36 UTC by Fabio Priuli
Fixed bug 1951
[src/mess/machine]pmd85.c

src/mess/machine/pmd85.c
r8126r8127
291291
292292   for (i = 0; i < 8; i++)
293293   {
294      if (!(pmd85_ppi_port_outputs[0][0] & (1 << i)))
294      if (!BIT(pmd85_ppi_port_outputs[0][0], i))
295295         data &= input_port_read(device->machine, keynames[i]);
296296   }
297297   return data;
r8126r8127
305305static WRITE8_DEVICE_HANDLER ( mato_ppi_0_portc_w )
306306{
307307   pmd85_ppi_port_outputs[0][2] = data;
308   set_led_status(device->machine, PMD85_LED_2, (data & 0x08) ? 1 : 0);
309   set_led_status(device->machine, PMD85_LED_3, (data & 0x04) ? 1 : 0);
308   set_led_status(device->machine, PMD85_LED_2, BIT(data, 3));
309   set_led_status(device->machine, PMD85_LED_3, BIT(data, 2));
310310}
311311
312312/*******************************************************************************
r8126r8127
446446
447447static READ8_DEVICE_HANDLER ( pmd85_ppi_3_porta_r )
448448{
449   return memory_region(device->machine, "user1")[pmd85_ppi_port_outputs[3][1]|(pmd85_ppi_port_outputs[3][2]<<8)];
449   if (memory_region(device->machine, "user1") != NULL)
450      return memory_region(device->machine, "user1")[pmd85_ppi_port_outputs[3][1] | (pmd85_ppi_port_outputs[3][2] << 8)];
451   else
452      return 0;
450453}
451454
452455static READ8_DEVICE_HANDLER ( pmd85_ppi_3_portb_r )
r8126r8127
526529                     switch (offset & 0x80)
527530                     {
528531                        case 0x80:   /* ROM module 8255 */
529                              return i8255a_r(devtag_get_device(space->machine, "ppi8255_3"), offset & 0x03);
532//                              return i8255a_r(devtag_get_device(space->machine, "ppi8255_3"), offset & 0x03);
533                           break;
530534                     }
531535                  }
532536                  break;
r8126r8127
915919
916920MACHINE_RESET( pmd85 )
917921{
922   int i, j;
923
918924   /* checking for Rom Module */
919925   switch (pmd85_model)
920926   {
921927      case PMD85_1:
922928      case PMD85_2A:
923929      case PMD85_3:
924     case C2717:
930      case C2717:
925931         pmd85_rom_module_present = (input_port_read(machine, "DSW0") & 0x01) ? 1 : 0;
926932         break;
927933      case ALFA:
928934      case MATO:
929935         break;
930936   }
937   
938   for (i = 0; i < 4; i++)
939      for (j = 0; j < 3; j++)
940         pmd85_ppi_port_outputs[i][j] = 0;
931941
932942   /* memory initialization */
933943   memset(messram_get_ptr(devtag_get_device(machine, "messram")), 0, sizeof(unsigned char)*0x10000);
934944   pmd85_startup_mem_map = 1;
935945   pmd85_update_memory(machine);
936946
937   timer_set(machine, attotime_zero, NULL, 0, setup_machine_state );
947   timer_set(machine, attotime_zero, NULL, 0, setup_machine_state);
938948
939949   memory_set_direct_update_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), pmd85_opbaseoverride);
940950}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team