trunk/src/mame/audio/8080bw.c
| r19547 | r19548 | |
| 897 | 897 | if (!m_schaser_effect_555_is_low) |
| 898 | 898 | { |
| 899 | 899 | m_schaser_effect_555_time_remain = m_schaser_effect_555_timer->time_left(); |
| 900 | | m_schaser_effect_555_time_remain_savable = m_schaser_effect_555_time_remain.as_double(); |
| 900 | m_schaser_effect_555_time_remain_savable = m_schaser_effect_555_time_remain.as_double(); |
| 901 | 901 | m_schaser_effect_555_timer->adjust(attotime::never); |
| 902 | 902 | } |
| 903 | 903 | } |
| 904 | 904 | m_schaser_last_effect = effect; |
| 905 | 905 | } |
| 906 | 906 | |
| 907 | | m_schaser_explosion = (data >> 5) & 0x01; |
| 907 | m_schaser_explosion = BIT(data, 5); |
| 908 | 908 | if (m_schaser_explosion) |
| 909 | 909 | { |
| 910 | 910 | sn76477_amplitude_res_w(m_sn, 1.0 / (1.0/RES_K(200) + 1.0/RES_K(68))); |
| r19547 | r19548 | |
| 929 | 929 | |
| 930 | 930 | //printf( "schaser_sh_port_2_w: %02x\n", data ); |
| 931 | 931 | |
| 932 | | discrete_sound_w(m_discrete, space, SCHASER_MUSIC_BIT, data & 0x01); |
| 932 | discrete_sound_w(m_discrete, space, SCHASER_MUSIC_BIT, BIT(data, 0)); |
| 933 | 933 | |
| 934 | | discrete_sound_w(m_discrete, space, SCHASER_SND_EN, data & 0x02); |
| 935 | | machine().sound().system_enable(data & 0x02); |
| 934 | discrete_sound_w(m_discrete, space, SCHASER_SND_EN, BIT(data, 1)); |
| 935 | machine().sound().system_enable(BIT(data, 1)); |
| 936 | 936 | |
| 937 | | coin_lockout_global_w(machine(), data & 0x04); |
| 937 | coin_lockout_global_w(machine(), BIT(data, 2)); |
| 938 | 938 | |
| 939 | | m_schaser_background_disable = (data >> 3) & 0x01; |
| 940 | | m_schaser_background_select = (data >> 4) & 0x01; |
| 939 | m_schaser_background_disable = BIT(data, 3); |
| 940 | m_schaser_background_select = BIT(data, 4); |
| 941 | 941 | |
| 942 | | m_c8080bw_flip_screen = (data & 0x20) && (ioport(CABINET_PORT_TAG)->read() & 0x01); |
| 942 | m_c8080bw_flip_screen = BIT(data, 5) & BIT(ioport("IN2")->read(), 6); |
| 943 | 943 | |
| 944 | 944 | m_port_2_last_extra = data; |
| 945 | 945 | } |
trunk/src/mame/drivers/8080bw.c
| r19547 | r19548 | |
| 1176 | 1176 | // Name Reset - if name of high scorer was rude, owner can press this button |
| 1177 | 1177 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Name Reset") PORT_CODE(KEYCODE_F1) |
| 1178 | 1178 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT ) |
| 1179 | | PORT_DIPNAME( 0x40, 0x00, "Number of Controllers" ) PORT_DIPLOCATION("SW1:6") |
| 1180 | | PORT_DIPSETTING( 0x00, "1" ) |
| 1181 | | PORT_DIPSETTING( 0x40, "2" ) |
| 1179 | PORT_DIPNAME( 0x40, 0x00, "Cabinet" ) PORT_DIPLOCATION("SW1:6") |
| 1180 | PORT_DIPSETTING( 0x00, "Upright" ) |
| 1181 | PORT_DIPSETTING( 0x40, "Cocktail" ) |
| 1182 | 1182 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 1183 | 1183 | |
| 1184 | | // port 3 (all 8 bits) connected to custom chip MB14241 driven by out port 2 and 4 |
| 1185 | | // To get cocktail mode, turn this on, and choose 2 controllers. |
| 1186 | | INVADERS_CAB_TYPE_PORT /* Dummy port for cocktail mode */ |
| 1187 | | |
| 1188 | 1184 | PORT_START("VR1") |
| 1189 | 1185 | PORT_ADJUSTER( 70, "VR1 - Music Volume" ) |
| 1190 | 1186 | |
| r19547 | r19548 | |
| 1247 | 1243 | /* */ |
| 1248 | 1244 | /*******************************************************/ |
| 1249 | 1245 | |
| 1246 | |
| 1247 | READ8_MEMBER( _8080bw_state::schasercv_02_r ) |
| 1248 | { |
| 1249 | UINT8 data = ioport("IN2")->read(); |
| 1250 | if (m_c8080bw_flip_screen) return data; |
| 1251 | UINT8 in1 = ioport("IN1")->read(); |
| 1252 | return (data & 0x89) | (in1 & 0x70) | (BIT(in1, 3) << 1) | (BIT(in1, 7) << 2); |
| 1253 | } |
| 1254 | |
| 1250 | 1255 | static ADDRESS_MAP_START( schasercv_io_map, AS_IO, 8, _8080bw_state ) |
| 1251 | 1256 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 1252 | 1257 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 1253 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 1258 | AM_RANGE(0x02, 0x02) AM_READ(schasercv_02_r) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 1254 | 1259 | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(schasercv_sh_port_1_w) |
| 1255 | 1260 | AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_data_w) |
| 1256 | 1261 | AM_RANGE(0x05, 0x05) AM_WRITE(schasercv_sh_port_2_w) |