Previous 15994 Revisions Next

r10454 Tuesday 15th February, 2011 at 19:46:31 UTC by Angelo Salese
[MEGACD]: Fixed write comms flag routing, fixes Dragon's Lair booting
[src/mame/machine]megadriv.c

src/mame/machine/megadriv.c
r10453r10454
50395039
50405040static WRITE16_HANDLER( segacd_comms_flags_subcpu_w )
50415041{
5042   if (ACCESSING_BITS_0_7 && ACCESSING_BITS_8_15)
5043   {
5044      printf("sub cpu attempting to word write data to comms flags %04x!\n",data);
5045   }
5046
50425047   if (ACCESSING_BITS_0_7)
50435048   {
50445049      segacd_comms_flags = (segacd_comms_flags & 0xff00) | (data & 0x00ff);
50455050      space->machine->scheduler().synchronize();
50465051   }
50475052
5048   if (ACCESSING_BITS_8_15)
5053   if (ACCESSING_BITS_8_15) // Dragon's Lair
50495054   {
5050      if (data & 0xff00)
5051      {
5052         printf("sub cpu attempting to write non-zero data to read-only comms flags!\n");
5053      }
5055      segacd_comms_flags = (segacd_comms_flags & 0xff00) | ((data >> 8) & 0x00ff);
5056      space->machine->scheduler().synchronize();
50545057   }
50555058}
50565059
50575060static WRITE16_HANDLER( segacd_comms_flags_maincpu_w )
50585061{
5062   if (ACCESSING_BITS_0_7 && ACCESSING_BITS_8_15)
5063   {
5064      printf("main cpu attempting to word write data to comms flags %04x!\n",data);
5065   }
5066
50595067   if (ACCESSING_BITS_0_7)
50605068   {
5061      if (data & 0x00ff)
5062      {
5063         printf("main cpu attempting to write non-zero data to read-only comms flags!\n");
5064      }
5065
5069      segacd_comms_flags = (segacd_comms_flags & 0x00ff) | ((data << 8) & 0xff00);
5070      space->machine->scheduler().synchronize();
50665071   }
50675072
50685073   if (ACCESSING_BITS_8_15)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team