src/mame/machine/megadriv.c
| r10453 | r10454 | |
| 5039 | 5039 | |
| 5040 | 5040 | static WRITE16_HANDLER( segacd_comms_flags_subcpu_w ) |
| 5041 | 5041 | { |
| 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 | |
| 5042 | 5047 | if (ACCESSING_BITS_0_7) |
| 5043 | 5048 | { |
| 5044 | 5049 | segacd_comms_flags = (segacd_comms_flags & 0xff00) | (data & 0x00ff); |
| 5045 | 5050 | space->machine->scheduler().synchronize(); |
| 5046 | 5051 | } |
| 5047 | 5052 | |
| 5048 | | if (ACCESSING_BITS_8_15) |
| 5053 | if (ACCESSING_BITS_8_15) // Dragon's Lair |
| 5049 | 5054 | { |
| 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(); |
| 5054 | 5057 | } |
| 5055 | 5058 | } |
| 5056 | 5059 | |
| 5057 | 5060 | static WRITE16_HANDLER( segacd_comms_flags_maincpu_w ) |
| 5058 | 5061 | { |
| 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 | |
| 5059 | 5067 | if (ACCESSING_BITS_0_7) |
| 5060 | 5068 | { |
| 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(); |
| 5066 | 5071 | } |
| 5067 | 5072 | |
| 5068 | 5073 | if (ACCESSING_BITS_8_15) |