trunk/src/mame/audio/8080bw.c
| r19698 | r19699 | |
| 66 | 66 | if (rising_bits & 0x08) m_samples->start(4, 6); /* FLEET */ |
| 67 | 67 | if (rising_bits & 0x10) m_samples->start(3, 7); /* SAUCER HIT */ |
| 68 | 68 | |
| 69 | | m_c8080bw_flip_screen = BIT(data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 69 | m_flip_screen = BIT(data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 70 | 70 | |
| 71 | 71 | m_port_2_last_extra = data; |
| 72 | 72 | } |
| r19698 | r19699 | |
| 89 | 89 | if (rising_bits & 0x08) m_samples->start(4, 6); /* FLEET */ |
| 90 | 90 | if (rising_bits & 0x10) m_samples->start(3, 7); /* SAUCER HIT */ |
| 91 | 91 | |
| 92 | | m_c8080bw_flip_screen = BIT(~data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 92 | m_flip_screen = BIT(~data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 93 | 93 | |
| 94 | 94 | m_port_2_last_extra = data; |
| 95 | 95 | } |
| r19698 | r19699 | |
| 174 | 174 | if (rising_bits & 0x10) m_samples->start(3, 6); /* Shooting Star and Rescue Ship sounds */ |
| 175 | 175 | if ((~data & 0x10) && (m_port_2_last_extra & 0x10)) m_samples->stop(3); /* This makes the rescue ship sound beep on and off */ |
| 176 | 176 | |
| 177 | | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 177 | m_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 178 | 178 | |
| 179 | 179 | m_port_2_last_extra = data; |
| 180 | 180 | } |
| r19698 | r19699 | |
| 276 | 276 | if (data & 0x04) m_samples->start(0, 4); /* Plane is dropping new balloons at start of level */ |
| 277 | 277 | if (rising_bits & 0x10) m_samples->start(2, 2); /* Balloon hit and bomb drops */ |
| 278 | 278 | |
| 279 | | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 279 | m_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 280 | 280 | |
| 281 | 281 | m_port_2_last_extra = data; |
| 282 | 282 | } |
| r19698 | r19699 | |
| 352 | 352 | if (rising_bits & 0x08) m_samples->start(5, 0); /* Grabber, Lasso caught something */ |
| 353 | 353 | if (rising_bits & 0x10) m_samples->start(3, 7); /* Lasso sound */ |
| 354 | 354 | |
| 355 | | m_c8080bw_flip_screen = BIT(data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 355 | m_flip_screen = BIT(data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 356 | 356 | |
| 357 | 357 | m_port_2_last_extra = data; |
| 358 | 358 | } |
| r19698 | r19699 | |
| 706 | 706 | |
| 707 | 707 | coin_lockout_global_w(machine(), data & 0x04); /* SX8 */ |
| 708 | 708 | |
| 709 | | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport("IN2")->read(), 2); /* SX11 */ |
| 709 | m_flip_screen = BIT(data, 5) & BIT(ioport("IN2")->read(), 2); /* SX11 */ |
| 710 | 710 | |
| 711 | 711 | /* 0x01 - SX6 - Plane Down */ |
| 712 | 712 | discrete_sound_w(m_discrete, space, POLARIS_SX6_EN, data & 0x01); |
| r19698 | r19699 | |
| 941 | 941 | m_schaser_background_disable = BIT(data, 3); |
| 942 | 942 | m_schaser_background_select = BIT(data, 4); |
| 943 | 943 | |
| 944 | | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport("IN2")->read(), 6); |
| 944 | m_flip_screen = BIT(data, 5) & BIT(ioport("IN2")->read(), 6); |
| 945 | 945 | |
| 946 | 946 | m_port_2_last_extra = data; |
| 947 | 947 | } |
| r19698 | r19699 | |
| 1025 | 1025 | 20 - flip screen */ |
| 1026 | 1026 | |
| 1027 | 1027 | m_screen_red = BIT(data, 4); |
| 1028 | | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 1028 | m_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 1029 | 1029 | |
| 1030 | 1030 | // no sound-related writes? |
| 1031 | 1031 | } |
| r19698 | r19699 | |
| 1144 | 1144 | |
| 1145 | 1145 | m_color_map = data & 0x40; |
| 1146 | 1146 | |
| 1147 | | m_c8080bw_flip_screen = (data & 0x20) && (ioport("IN2")->read() & 0x04); |
| 1147 | m_flip_screen = (data & 0x20) && (ioport("IN2")->read() & 0x04); |
| 1148 | 1148 | |
| 1149 | 1149 | m_port_2_last_extra = data; |
| 1150 | 1150 | } |
| r19698 | r19699 | |
| 1176 | 1176 | |
| 1177 | 1177 | machine().sound().system_enable(data & 0x10); |
| 1178 | 1178 | |
| 1179 | | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 1179 | m_flip_screen = BIT(data, 5) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 1180 | 1180 | } |
| 1181 | 1181 | |
| 1182 | 1182 | |
| r19698 | r19699 | |
| 1212 | 1212 | |
| 1213 | 1213 | if (rising_bits & 0x10) m_samples->start(2, 7); /* Game Over */ |
| 1214 | 1214 | |
| 1215 | | m_c8080bw_flip_screen = data & 0x20; |
| 1215 | m_flip_screen = data & 0x20; |
| 1216 | 1216 | |
| 1217 | 1217 | m_port_2_last_extra = data; |
| 1218 | 1218 | } |
| r19698 | r19699 | |
| 1261 | 1261 | |
| 1262 | 1262 | WRITE8_MEMBER( _8080bw_state::darthvdr_00_w ) |
| 1263 | 1263 | { |
| 1264 | | m_invaders_flip_screen = BIT(data, 0) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 1264 | m_flip_screen = BIT(data, 0) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 1265 | 1265 | } |
| 1266 | 1266 | |
| 1267 | 1267 | WRITE8_MEMBER( _8080bw_state::darthvdr_08_w ) |
trunk/src/mame/video/8080bw.c
| r19698 | r19699 | |
| 15 | 15 | |
| 16 | 16 | MACHINE_START_MEMBER(_8080bw_state,extra_8080bw_vh) |
| 17 | 17 | { |
| 18 | | save_item(NAME(m_c8080bw_flip_screen)); |
| 18 | save_item(NAME(m_flip_screen)); |
| 19 | 19 | save_item(NAME(m_color_map)); |
| 20 | 20 | save_item(NAME(m_screen_red)); |
| 21 | 21 | |
| r19698 | r19699 | |
| 67 | 67 | |
| 68 | 68 | if (y >= MW8080BW_VCOUNTER_START_NO_VBLANK) |
| 69 | 69 | { |
| 70 | | if (state->m_c8080bw_flip_screen) |
| 70 | if (state->m_flip_screen) |
| 71 | 71 | bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pens[color]; |
| 72 | 72 | else |
| 73 | 73 | bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pens[color]; |
| r19698 | r19699 | |
| 101 | 101 | |
| 102 | 102 | for (y = MW8080BW_VCOUNTER_START_NO_VBLANK; y != 0; y++) |
| 103 | 103 | { |
| 104 | | if (state->m_c8080bw_flip_screen) |
| 104 | if (state->m_flip_screen) |
| 105 | 105 | bitmap.pix32(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + x)) = pens[color]; |
| 106 | 106 | else |
| 107 | 107 | bitmap.pix32(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + x) = pens[color]; |
| r19698 | r19699 | |
| 454 | 454 | |
| 455 | 455 | for (i = 0; i < 8; i++) |
| 456 | 456 | { |
| 457 | | if (m_c8080bw_flip_screen) |
| 457 | if (m_flip_screen) |
| 458 | 458 | bitmap.pix32(191-y, 255-(x|i)) = pens[BIT(data, 7)]; |
| 459 | 459 | else |
| 460 | 460 | bitmap.pix32(y, x|i) = pens[BIT(data, 7)]; |
| r19698 | r19699 | |
| 477 | 477 | |
| 478 | 478 | UINT8 y = offs >> 5; |
| 479 | 479 | UINT8 x = offs << 3; |
| 480 | | UINT8 flipx = m_invaders_flip_screen ? 7 : 0; |
| 480 | UINT8 flipx = m_flip_screen ? 7 : 0; |
| 481 | 481 | |
| 482 | 482 | UINT8 data = m_main_ram[offs+0x400]; |
| 483 | 483 | |
trunk/src/mame/drivers/8080bw.c
| r19698 | r19699 | |
| 777 | 777 | READ8_MEMBER(_8080bw_state::invrvnge_02_r) |
| 778 | 778 | { |
| 779 | 779 | UINT8 data = ioport("IN2")->read(); |
| 780 | | if (m_c8080bw_flip_screen) return data; |
| 780 | if (m_flip_screen) return data; |
| 781 | 781 | return (data & 0x8f) | (ioport("IN1")->read() & 0x70); |
| 782 | 782 | } |
| 783 | 783 | |
| r19698 | r19699 | |
| 1319 | 1319 | READ8_MEMBER(_8080bw_state::schasercv_02_r) |
| 1320 | 1320 | { |
| 1321 | 1321 | UINT8 data = ioport("IN2")->read(); |
| 1322 | | if (m_c8080bw_flip_screen) return data; |
| 1322 | if (m_flip_screen) return data; |
| 1323 | 1323 | UINT8 in1 = ioport("IN1")->read(); |
| 1324 | 1324 | return (data & 0x89) | (in1 & 0x70) | (BIT(in1, 3) << 1) | (BIT(in1, 7) << 2); |
| 1325 | 1325 | } |
| r19698 | r19699 | |
| 1643 | 1643 | READ8_MEMBER(_8080bw_state::polaris_port00_r) |
| 1644 | 1644 | { |
| 1645 | 1645 | UINT8 data = ioport("IN0")->read(); |
| 1646 | | if (m_c8080bw_flip_screen) return data; |
| 1646 | if (m_flip_screen) return data; |
| 1647 | 1647 | return (data & 7) | (ioport("IN1")->read() & 0xf8); |
| 1648 | 1648 | } |
| 1649 | 1649 | |
| r19698 | r19699 | |
| 2235 | 2235 | READ8_MEMBER(_8080bw_state::shuttlei_ff_r) |
| 2236 | 2236 | { |
| 2237 | 2237 | UINT8 data = ioport("INPUTS")->read(); |
| 2238 | | if (!m_c8080bw_flip_screen) return data; |
| 2238 | if (!m_flip_screen) return data; |
| 2239 | 2239 | return (data & 0x3b) | ioport("P2")->read(); |
| 2240 | 2240 | } |
| 2241 | 2241 | |
| r19698 | r19699 | |
| 2246 | 2246 | These may be for indicator lamps under the start buttons. |
| 2247 | 2247 | bit 2 goes high while player 2 is playing */ |
| 2248 | 2248 | |
| 2249 | | m_c8080bw_flip_screen = BIT(data, 2) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 2249 | m_flip_screen = BIT(data, 2) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); |
| 2250 | 2250 | } |
| 2251 | 2251 | |
| 2252 | 2252 | static ADDRESS_MAP_START( shuttlei_map, AS_PROGRAM, 8, _8080bw_state ) |
| r19698 | r19699 | |
| 2330 | 2330 | READ8_MEMBER(_8080bw_state::darthvdr_01_r) |
| 2331 | 2331 | { |
| 2332 | 2332 | UINT8 data = ioport("P2")->read(); |
| 2333 | | if (m_invaders_flip_screen) return data; |
| 2333 | if (m_flip_screen) return data; |
| 2334 | 2334 | return (data & 0xe1) | (ioport("P1")->read() & 0x0e); |
| 2335 | 2335 | } |
| 2336 | 2336 | |