trunk/src/mame/drivers/8080bw.c
| r18940 | r18941 | |
| 1269 | 1269 | /* */ |
| 1270 | 1270 | /* Taito "Lupin III" */ |
| 1271 | 1271 | /* */ |
| 1272 | | /* The rom at 5000 is optional. It contains code for colour ram, and the tune that plays */ |
| 1273 | | /* in the "wife vs man" scene. If you remove this rom, bits 0 and 1 of port 0 must */ |
| 1274 | | /* be set High. The colour will then be determined by the 2 proms instead. Bit 6 */ |
| 1272 | /* The rom at 5000 is optional. It contains code for colour ram, and all tunes except */ |
| 1273 | /* when the moneybag has been stolen. If you remove this rom, bits 0 and 1 of port 0 */ |
| 1274 | /* must be set High. The colour will then be determined by the 2 proms instead. Bit 6 */ |
| 1275 | 1275 | /* of port 5 will select which prom to use. */ |
| 1276 | 1276 | /* */ |
| 1277 | 1277 | /* Differences between the 2 sets: */ |
| r18940 | r18941 | |
| 1283 | 1283 | /*******************************************************************************************/ |
| 1284 | 1284 | |
| 1285 | 1285 | static ADDRESS_MAP_START( lupin3_io_map, AS_IO, 8, _8080bw_state ) |
| 1286 | | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 1286 | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(lupin3_00_w) |
| 1287 | 1287 | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 1288 | 1288 | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE_LEGACY("mb14241", mb14241_shift_count_w) |
| 1289 | 1289 | AM_RANGE(0x03, 0x03) AM_DEVREAD_LEGACY("mb14241", mb14241_shift_result_r) AM_WRITE(lupin3_sh_port_1_w) |
| r18940 | r18941 | |
| 1365 | 1365 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_indianbt) |
| 1366 | 1366 | |
| 1367 | 1367 | /* sound hardware */ |
| 1368 | | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 1368 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1369 | |
| 1370 | MCFG_SOUND_ADD("snsnd", SN76477, 0) |
| 1371 | MCFG_SOUND_CONFIG(lupin3_sn76477_interface) |
| 1372 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) |
| 1373 | |
| 1374 | MCFG_SAMPLES_ADD("samples", lupin3_samples_interface) |
| 1375 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1376 | |
| 1377 | MCFG_SOUND_ADD("discrete", DISCRETE, 0) |
| 1378 | MCFG_SOUND_CONFIG_DISCRETE(indianbt) |
| 1379 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1369 | 1380 | MACHINE_CONFIG_END |
| 1370 | 1381 | |
| 1371 | 1382 | static MACHINE_CONFIG_DERIVED_CLASS( lupin3a, mw8080bw_root, _8080bw_state ) |
| r18940 | r18941 | |
| 1384 | 1395 | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_lupin3) |
| 1385 | 1396 | |
| 1386 | 1397 | /* sound hardware */ |
| 1387 | | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 1398 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 1399 | |
| 1400 | MCFG_SOUND_ADD("snsnd", SN76477, 0) |
| 1401 | MCFG_SOUND_CONFIG(lupin3_sn76477_interface) |
| 1402 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) |
| 1403 | |
| 1404 | MCFG_SAMPLES_ADD("samples", lupin3_samples_interface) |
| 1405 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1406 | |
| 1407 | MCFG_SOUND_ADD("discrete", DISCRETE, 0) |
| 1408 | MCFG_SOUND_CONFIG_DISCRETE(indianbt) |
| 1409 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 1388 | 1410 | MACHINE_CONFIG_END |
| 1389 | 1411 | |
| 1390 | 1412 | |
trunk/src/mame/audio/8080bw.c
| r18940 | r18941 | |
| 1026 | 1026 | /* Correct samples not available */ |
| 1027 | 1027 | /*****************************************/ |
| 1028 | 1028 | |
| 1029 | const sn76477_interface lupin3_sn76477_interface = |
| 1030 | { |
| 1031 | 0, /* 4 noise_res (N/C) */ |
| 1032 | 0, /* 5 filter_res (N/C) */ |
| 1033 | 0, /* 6 filter_cap (N/C) */ |
| 1034 | 0, /* 7 decay_res (N/C) */ |
| 1035 | 0, /* 8 attack_decay_cap (N/C) */ |
| 1036 | RES_K(100), /* 10 attack_res */ |
| 1037 | RES_K(56), /* 11 amplitude_res */ |
| 1038 | RES_K(10), /* 12 feedback_res */ |
| 1039 | 0, /* 16 vco_voltage (N/C) */ |
| 1040 | CAP_U(0.1), /* 17 vco_cap */ |
| 1041 | RES_K(8.2), /* 18 vco_res */ |
| 1042 | 5.0, /* 19 pitch_voltage */ |
| 1043 | RES_K(120), /* 20 slf_res */ |
| 1044 | CAP_U(1.0), /* 21 slf_cap */ |
| 1045 | 0, /* 23 oneshot_cap (N/C) */ |
| 1046 | 0, /* 24 oneshot_res (N/C) */ |
| 1047 | 1, /* 22 vco */ |
| 1048 | 0, /* 26 mixer A */ |
| 1049 | 0, /* 25 mixer B */ |
| 1050 | 0, /* 27 mixer C */ |
| 1051 | 1, /* 1 envelope 1 */ |
| 1052 | 0, /* 28 envelope 2 */ |
| 1053 | 1 /* 9 enable (variable) */ |
| 1054 | }; |
| 1055 | |
| 1056 | static const char *const lupin3_sample_names[] = |
| 1057 | { |
| 1058 | "*lupin3", |
| 1059 | "cap", /* go to jail */ |
| 1060 | "bark", /* dog barking */ |
| 1061 | "walk1", /* walk, get money */ |
| 1062 | "walk2", /* walk, get money */ |
| 1063 | "warp", /* translocate, deposit money */ |
| 1064 | "extend", /* bonus man */ |
| 1065 | "kick", /* lands on top of building, wife kicks man */ |
| 1066 | 0 |
| 1067 | }; |
| 1068 | |
| 1069 | |
| 1070 | const samples_interface lupin3_samples_interface = |
| 1071 | { |
| 1072 | 4, /* 4 channels */ |
| 1073 | lupin3_sample_names |
| 1074 | }; |
| 1075 | |
| 1076 | WRITE8_MEMBER( _8080bw_state::lupin3_00_w ) |
| 1077 | { |
| 1078 | discrete_sound_w(m_discrete, space, INDIANBT_MUSIC_DATA, data); |
| 1079 | } |
| 1080 | |
| 1029 | 1081 | WRITE8_MEMBER(_8080bw_state::lupin3_sh_port_1_w) |
| 1030 | 1082 | { |
| 1031 | 1083 | UINT8 rising_bits = data & ~m_port_1_last_extra; |
| 1084 | static UINT8 lupin3_step = 2; |
| 1032 | 1085 | |
| 1033 | | if (rising_bits & 0x01) m_samples->start(0, 6); /* Walking, get money */ |
| 1086 | if (rising_bits & 0x01) |
| 1087 | { |
| 1088 | m_samples->start(0, lupin3_step); /* Walking, steal money */ |
| 1089 | lupin3_step ^= 1; |
| 1090 | } |
| 1034 | 1091 | |
| 1035 | 1092 | sn76477_enable_w(m_sn, data & 0x02 ? 0:1); /* Helicopter */ |
| 1036 | 1093 | |
| 1037 | | if (rising_bits & 0x04) m_samples->start(0, 7); /* Translocate */ |
| 1038 | | if (rising_bits & 0x08) m_samples->start(0, 1); /* Jail */ |
| 1039 | | if (rising_bits & 0x10) m_samples->start(3, 8); /* Bonus Man */ |
| 1094 | if (rising_bits & 0x04) m_samples->start(1, 4); /* Translocate */ |
| 1095 | if (rising_bits & 0x08) m_samples->start(0, 0); /* Jail */ |
| 1096 | if (rising_bits & 0x10) m_samples->start(2, 5); /* Bonus Man */ |
| 1040 | 1097 | |
| 1098 | //machine().sound().system_enable(data & 0x20); |
| 1099 | |
| 1100 | //coin_lockout_global_w(machine(), data & 0x80); |
| 1101 | |
| 1041 | 1102 | m_port_1_last_extra = data; |
| 1042 | 1103 | } |
| 1043 | 1104 | |
| r18940 | r18941 | |
| 1045 | 1106 | { |
| 1046 | 1107 | UINT8 rising_bits = data & ~m_port_2_last_extra; |
| 1047 | 1108 | |
| 1048 | | if (rising_bits & 0x01) m_samples->start(0, 3); /* Lands on top of building, wife kicks man */ |
| 1049 | | if (rising_bits & 0x02) m_samples->start(1, 2); /* deposit money, start intermission, end game */ |
| 1050 | | if (rising_bits & 0x04) m_samples->start(2, 5); /* deposit money, start intermission, Slides down rope */ |
| 1051 | | if (rising_bits & 0x08) m_samples->start(3, 0); /* start intermission, end game */ |
| 1052 | | //if (rising_bits & 0x10) m_samples->start(3, 9); /* Dog barking */ |
| 1109 | if (rising_bits & 0x01) m_samples->start(0, 6); /* Lands on top of building, wife kicks man */ |
| 1110 | //if (rising_bits & 0x02) m_samples->start(3, 7); /* deposit money, start intermission, end game */ |
| 1111 | //if (rising_bits & 0x04) m_samples->start(4, 7); /* deposit money, start intermission, Slides down rope */ |
| 1112 | //if (rising_bits & 0x08) m_samples->start(5, 7); /* start intermission, end game */ |
| 1113 | if (rising_bits & 0x10) m_samples->start(3, 1); /* Dog barking */ |
| 1053 | 1114 | |
| 1054 | 1115 | m_color_map = data & 0x40; |
| 1055 | 1116 | |