trunk/src/mame/drivers/8080bw.c
| r23944 | r23945 | |
| 2942 | 2942 | ROM dump came from a collection of old 5 1/4 disks (Apple II) that used to be in the |
| 2943 | 2943 | possession of an arcade operator in the early 80s. |
| 2944 | 2944 | |
| 2945 | | TODO sound to be verified. |
| 2945 | TODO: |
| 2946 | - correct sound (currently same as invaders) |
| 2947 | * sound mutes when a few aliens are left? |
| 2948 | * port 7 write is used too, looks like it's for music similar to indianbt |
| 2949 | Note that bass background hum and sound effects are already basically correct. |
| 2946 | 2950 | |
| 2947 | 2951 | ***************************************************************************************/ |
| 2948 | 2952 | |
| 2949 | | static ADDRESS_MAP_START( galactic_io_map, AS_IO, 8, _8080bw_state ) |
| 2950 | | AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") |
| 2951 | | AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") |
| 2952 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) |
| 2953 | | AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(galactic_sh_port_1_w) |
| 2954 | | AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) |
| 2955 | | AM_RANGE(0x05, 0x05) AM_WRITE(galactic_sh_port_2_w) |
| 2956 | | AM_RANGE(0x06, 0x06) AM_WRITE(watchdog_reset_w) |
| 2957 | | AM_RANGE(0x07, 0x07) AM_WRITE(galactic_07_w) |
| 2958 | | ADDRESS_MAP_END |
| 2959 | | |
| 2960 | | |
| 2961 | | static MACHINE_CONFIG_DERIVED_CLASS( galactic, mw8080bw_root, _8080bw_state ) |
| 2962 | | |
| 2963 | | /* basic machine hardware */ |
| 2964 | | MCFG_CPU_MODIFY("maincpu") |
| 2965 | | MCFG_CPU_IO_MAP(galactic_io_map) |
| 2966 | | MCFG_MACHINE_START_OVERRIDE(_8080bw_state,extra_8080bw) |
| 2967 | | |
| 2968 | | /* add shifter */ |
| 2969 | | MCFG_MB14241_ADD("mb14241") |
| 2970 | | |
| 2971 | | /* sound hardware */ |
| 2972 | | MCFG_FRAGMENT_ADD(invaders_samples_audio) |
| 2973 | | MCFG_DISCRETE_ADD("discrete", 0, galactic) |
| 2974 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 2975 | | |
| 2976 | | /* video hardware */ |
| 2977 | | MCFG_SCREEN_MODIFY("screen") |
| 2978 | | MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_invaders) |
| 2979 | | MACHINE_CONFIG_END |
| 2980 | | |
| 2981 | | |
| 2982 | 2953 | static INPUT_PORTS_START( galactic ) |
| 2983 | 2954 | PORT_START("IN0") |
| 2984 | 2955 | PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // gets read into memory (0x2012) then never used |
| r23944 | r23945 | |
| 4639 | 4610 | GAME( 1980, indianbt, 0, indianbt, indianbt, driver_device, 0, ROT270, "Taito", "Indian Battle", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 4640 | 4611 | GAME( 1983, indianbtbr, indianbt, indianbtbr,indianbtbr,driver_device, 0, ROT270, "Taito do Brasil", "Indian Battle (Brazil)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 4641 | 4612 | GAME( 1980, steelwkr, 0, steelwkr, steelwkr, driver_device, 0, ROT0 , "Taito", "Steel Worker", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) |
| 4642 | | GAMEL(1980?,galactic, 0, galactic, galactic, driver_device, 0, ROT270, "Taito do Brasil", "Galactica - Batalha Espacial", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_galactic ) |
| 4643 | | GAMEL(1980?,spacmiss, galactic, galactic, galactic, driver_device, 0, ROT270, "bootleg?", "Space Missile - Space Fighting Game", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_galactic ) |
| 4613 | GAMEL(1980?,galactic, 0, invaders, galactic, driver_device, 0, ROT270, "Taito do Brasil", "Galactica - Batalha Espacial", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_galactic ) |
| 4614 | GAMEL(1980?,spacmiss, galactic, invaders, galactic, driver_device, 0, ROT270, "bootleg?", "Space Missile - Space Fighting Game", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_galactic ) |
| 4644 | 4615 | |
| 4645 | 4616 | // Misc. manufacturers |
| 4646 | 4617 | GAME( 1979, galxwars, 0, invadpt2, galxwars, driver_device, 0, ROT270, "Universal", "Galaxy Wars (Universal set 1)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/audio/8080bw.c
| r23944 | r23945 | |
| 1314 | 1314 | |
| 1315 | 1315 | m_port_1_last_extra = data; |
| 1316 | 1316 | } |
| 1317 | | |
| 1318 | | |
| 1319 | | /*******************************************************/ |
| 1320 | | /* */ |
| 1321 | | /* "Galactic" and "Space Missile" */ |
| 1322 | | /* Due to no schematics, these sounds are nothing */ |
| 1323 | | /* more than speculation. */ |
| 1324 | | /*******************************************************/ |
| 1325 | | |
| 1326 | | /************************************* |
| 1327 | | * |
| 1328 | | * Discrete Sound |
| 1329 | | * (copied from indianbt) |
| 1330 | | * |
| 1331 | | *************************************/ |
| 1332 | | |
| 1333 | | static const discrete_dac_r1_ladder galactic_music_dac = |
| 1334 | | {3, {0, RES_K(47), RES_K(12)}, 0, 0, 0, CAP_U(0.1)}; |
| 1335 | | |
| 1336 | | #define GALACTIC_MUSIC_CLK (150000) |
| 1337 | | |
| 1338 | | /* Nodes - Inputs */ |
| 1339 | | #define GALACTIC_MUSIC_DATA NODE_01 |
| 1340 | | /* Nodes - Sounds */ |
| 1341 | | #define GALACTIC_MUSIC NODE_11 |
| 1342 | | |
| 1343 | | DISCRETE_SOUND_START(galactic) |
| 1344 | | |
| 1345 | | DISCRETE_INPUT_DATA (GALACTIC_MUSIC_DATA) |
| 1346 | | |
| 1347 | | /****************************************************************************** |
| 1348 | | * |
| 1349 | | * Music Generator |
| 1350 | | * |
| 1351 | | ******************************************************************************/ |
| 1352 | | DISCRETE_NOTE(NODE_20, 1, GALACTIC_MUSIC_CLK, GALACTIC_MUSIC_DATA, 255, 5, DISC_CLK_IS_FREQ) |
| 1353 | | |
| 1354 | | // Convert count to 7492 output |
| 1355 | | DISCRETE_TRANSFORM2(NODE_21, NODE_20, 2, "01>0+") |
| 1356 | | |
| 1357 | | DISCRETE_DAC_R1(NODE_22, NODE_21, DEFAULT_TTL_V_LOGIC_1, &galactic_music_dac) |
| 1358 | | |
| 1359 | | /****************************************************************************** |
| 1360 | | * |
| 1361 | | * Final Mixing and Output |
| 1362 | | * |
| 1363 | | ******************************************************************************/ |
| 1364 | | DISCRETE_CRFILTER(NODE_90, NODE_22, RES_K(10), CAP_U(0.1)) |
| 1365 | | |
| 1366 | | DISCRETE_OUTPUT(NODE_90, 21000) |
| 1367 | | |
| 1368 | | DISCRETE_SOUND_END |
| 1369 | | |
| 1370 | | WRITE8_MEMBER( _8080bw_state::galactic_07_w ) |
| 1371 | | { |
| 1372 | | discrete_sound_w(m_discrete, space, GALACTIC_MUSIC_DATA, data | 0xc0); |
| 1373 | | } |
| 1374 | | |
| 1375 | | WRITE8_MEMBER(_8080bw_state::galactic_sh_port_1_w) |
| 1376 | | { |
| 1377 | | UINT8 rising_bits = data & ~m_port_1_last_extra; |
| 1378 | | |
| 1379 | | if (rising_bits & 0x02) m_samples->start(2, 2); /* Killed an enemy */ |
| 1380 | | if (rising_bits & 0x04) m_samples->start(1, 1); /* Lost a life */ |
| 1381 | | |
| 1382 | | m_port_1_last_extra = data; |
| 1383 | | } |
| 1384 | | |
| 1385 | | // bits 0-3 could make a variable background tone |
| 1386 | | WRITE8_MEMBER(_8080bw_state::galactic_sh_port_2_w) |
| 1387 | | { |
| 1388 | | UINT8 rising_bits = data & ~m_port_2_last_extra; |
| 1389 | | |
| 1390 | | if (rising_bits & 0x10) m_samples->start(0, 0); /* Shoot */ |
| 1391 | | |
| 1392 | | m_flip_screen = BIT(data, 5) & ioport(CABINET_PORT_TAG)->read(); |
| 1393 | | |
| 1394 | | m_port_2_last_extra = data; |
| 1395 | | } |