trunk/src/mame/drivers/segas18.c
r241662 | r241663 | |
73 | 73 | switch (m_romboard) |
74 | 74 | { |
75 | 75 | case ROM_BOARD_171_SHADOW: break; // ??? |
| 76 | case ROM_BOARD_837_7525: |
76 | 77 | case ROM_BOARD_171_5874: |
77 | 78 | case ROM_BOARD_171_5987: mapper.map_as_handler(0x00000, 0x00010, 0xfffff0, read16_delegate(FUNC(segas18_state::genesis_vdp_r), this), write16_delegate(FUNC(segas18_state::genesis_vdp_w), this)); break; |
78 | 79 | default: assert(false); |
r241662 | r241663 | |
89 | 90 | else |
90 | 91 | mapper.map_as_rom(0x00000,0x100000, 0xf00000, "rom1base",0x100000, write16_delegate(FUNC(segas18_state::rom_5987_bank_w), this)); |
91 | 92 | break; |
| 93 | case ROM_BOARD_837_7525: mapper.map_as_rom(0x00000, 0x80000, 0xf80000, "rom1base", 0x80000, write16_delegate(FUNC(segas18_state::rom_837_7525_bank_w), this)); |
| 94 | |
92 | 95 | default: assert(false); |
93 | 96 | } |
94 | 97 | break; |
r241662 | r241663 | |
98 | 101 | { |
99 | 102 | case ROM_BOARD_171_SHADOW: |
100 | 103 | case ROM_BOARD_171_5874: mapper.map_as_rom(0x00000, 0x80000, 0xf80000, "rom0base", 0x00000, write16_delegate()); break; |
| 104 | case ROM_BOARD_837_7525: |
101 | 105 | case ROM_BOARD_171_5987: if (romsize <= 0x100000) |
102 | 106 | mapper.map_as_rom(0x00000, 0x80000, 0xf80000, "rom0base", 0x00000, write16_delegate()); |
103 | 107 | else |
r241662 | r241663 | |
390 | 394 | } |
391 | 395 | } |
392 | 396 | |
| 397 | WRITE16_MEMBER( segas18_state::rom_837_7525_bank_w ) |
| 398 | { |
| 399 | if (!ACCESSING_BITS_0_7) |
| 400 | return; |
393 | 401 | |
| 402 | offset &= 0xf; |
| 403 | data &= 0xff; |
394 | 404 | |
| 405 | // tile banking |
| 406 | if (offset < 8) |
| 407 | { |
| 408 | // int maxbanks = m_gfxdecode->gfx(0)->elements() / 1024; |
| 409 | data &= 0x9f; |
| 410 | |
| 411 | if (data & 0x80) data += 0x20; |
| 412 | data &= 0x3f; |
| 413 | |
| 414 | m_segaic16vid->segaic16_tilemap_set_bank(0, offset, data); |
| 415 | } |
| 416 | |
| 417 | // sprite banking |
| 418 | else |
| 419 | { |
| 420 | //printf("%02x %02x\n", offset, data); |
| 421 | // not needed? |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | |
395 | 426 | /************************************* |
396 | 427 | * |
397 | 428 | * D.D.Crew Custom I/O |
r241662 | r241663 | |
1185 | 1216 | |
1186 | 1217 | |
1187 | 1218 | |
| 1219 | static INPUT_PORTS_START( hamaway ) |
| 1220 | PORT_INCLUDE( system18_generic ) |
| 1221 | |
| 1222 | PORT_MODIFY("DSW") |
| 1223 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 1224 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 1225 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1226 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 1227 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 1228 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1229 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 1230 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 1231 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1232 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 1233 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1234 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1235 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 1236 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1237 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1238 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 1239 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1240 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1241 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 1242 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 1243 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1244 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 1245 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 1246 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1247 | INPUT_PORTS_END |
| 1248 | |
| 1249 | |
1188 | 1250 | /************************************* |
1189 | 1251 | * |
1190 | 1252 | * Graphics definitions |
r241662 | r241663 | |
1228 | 1290 | * |
1229 | 1291 | *************************************/ |
1230 | 1292 | |
| 1293 | WRITE_LINE_MEMBER(segas18_state::ym3438_irq_handler) |
| 1294 | { |
| 1295 | if (state) |
| 1296 | m_soundcpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE ); |
| 1297 | else |
| 1298 | m_soundcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE ); |
| 1299 | } |
| 1300 | |
| 1301 | |
1231 | 1302 | static MACHINE_CONFIG_START( system18, segas18_state ) |
1232 | 1303 | |
1233 | 1304 | // basic machine hardware |
r241662 | r241663 | |
1276 | 1347 | |
1277 | 1348 | MCFG_SOUND_ADD("ym1", YM3438, 8000000) |
1278 | 1349 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
| 1350 | MCFG_YM2612_IRQ_HANDLER(WRITELINE(segas18_state, ym3438_irq_handler)) |
1279 | 1351 | |
1280 | 1352 | MCFG_SOUND_ADD("ym2", YM3438, 8000000) |
1281 | 1353 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) |
r241662 | r241663 | |
2261 | 2333 | ROM_LOAD( "mpr-14722.c4", 0x190000, 0x80000, CRC(1bd081f8) SHA1(e5b0b5d8334486f813d7c430bb7fce3f69605a21) ) |
2262 | 2334 | ROM_END |
2263 | 2335 | |
| 2336 | /************************************************************************************************************************** |
| 2337 | Hammer Away, Sega System 18 |
| 2338 | CPU: M68000 |
| 2339 | ROM Board: 837-7525 |
| 2340 | */ |
2264 | 2341 | |
| 2342 | ROM_START( hamaway ) |
| 2343 | ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code |
| 2344 | ROM_LOAD16_BYTE( "4.bin", 0x000000, 0x40000, CRC(cc0981e1) SHA1(63528bd36f27e62fdf40715101e6d05b73e48f16) ) // 1xxxxxxxxxxxxxxxxx = 0xFF |
| 2345 | ROM_LOAD16_BYTE( "6.bin", 0x000001, 0x40000, CRC(e8599ee6) SHA1(3e32b025403aecbaecfcdd0325e4acd676e99c4e) ) // 1xxxxxxxxxxxxxxxxx = 0xFF |
| 2346 | ROM_LOAD16_BYTE( "5.bin", 0x080000, 0x40000, CRC(fdb247fd) SHA1(ee9db799fb5de27f81904f8ef792203415b6d4a6) ) |
| 2347 | ROM_LOAD16_BYTE( "7.bin", 0x080001, 0x40000, CRC(63711470) SHA1(6c4be3a0cf0f897c34ef0b3bf549f52b185bb915) ) |
2265 | 2348 | |
| 2349 | ROM_REGION( 0x180000, "gfx1", 0 ) // tiles |
| 2350 | ROM_LOAD( "c10.bin", 0x000000, 0x40000, CRC(c55cb5cf) SHA1(396179632b29ac5f8b7f8f3c91d7cf834e548bdf) ) |
| 2351 | ROM_LOAD( "1.bin", 0x040000, 0x40000, CRC(33be003f) SHA1(134fa6b3347c306d9e30882dfcf24632b49f85ea) ) |
| 2352 | ROM_LOAD( "c11.bin", 0x080000, 0x40000, CRC(37787915) SHA1(c8d251be6c41de3aed2da6da70aa87071b70b1f6) ) |
| 2353 | ROM_LOAD( "2.bin", 0x0c0000, 0x40000, CRC(60ca5c9f) SHA1(6358ea00125a5e3f55acf73aeb9c36b1db6e711e) ) |
| 2354 | ROM_LOAD( "c12.bin", 0x100000, 0x40000, CRC(f12f1cf3) SHA1(45e883029c58e617a2a20ac1ab5c5f598c95f4bd) ) |
| 2355 | ROM_LOAD( "3.bin", 0x140000, 0x40000, CRC(520aa7ae) SHA1(9584206aedd8be5ce9dca0ed370f8fe77aabaf76) ) |
| 2356 | |
| 2357 | ROM_REGION16_BE( 0x200000, "sprites", ROMREGION_ERASEFF ) // sprites |
| 2358 | ROM_LOAD16_BYTE( "c17.bin", 0x000001, 0x40000, CRC(aa28d7aa) SHA1(3dd5d95b05e408c023f9bd77753c37080714239d) ) |
| 2359 | ROM_LOAD16_BYTE( "10.bin", 0x000000, 0x40000, CRC(c4c95161) SHA1(2e313a4ca9506f53a2062b4a8e5ba7b381ba93ae) ) |
| 2360 | ROM_LOAD16_BYTE( "c18.bin", 0x080001, 0x40000, CRC(0f8fe8bb) SHA1(e6f68442b8d4def29b106458496a47344f70d511) ) |
| 2361 | ROM_LOAD16_BYTE( "11.bin", 0x080000, 0x40000, CRC(2b5eacbc) SHA1(ba3690501588b9c88a31022b44bc3c82b44ae26b) ) |
| 2362 | ROM_LOAD16_BYTE( "c19.bin", 0x100001, 0x40000, CRC(3c616caa) SHA1(d48a6239b7a52ac13971f7513a65a17af492bfdf) ) // 11xxxxxxxxxxxxxxxx = 0xFF |
| 2363 | ROM_LOAD16_BYTE( "12.bin", 0x100000, 0x40000, CRC(c7bbd579) SHA1(ab87bfdad66ea241cb23c9bbfea05f5a1574d6c9) ) // 1ST AND 2ND HALF IDENTICAL (but ok, because pairing ROM has no data in the 2nd half anyway) |
| 2364 | |
| 2365 | ROM_REGION( 0x210000, "soundcpu", ROMREGION_ERASEFF ) // sound CPU |
| 2366 | ROM_LOAD( "c16.bin", 0x010000, 0x40000, CRC(913cc18c) SHA1(4bf4ec14937586c3ae77fcad57dcb21f6433ef81) ) |
| 2367 | ROM_LOAD( "c15.bin", 0x090000, 0x40000, CRC(b53694fc) SHA1(0e42be2730abce1b52ea94a9fe61cbd1c9a0ccae) ) |
| 2368 | ROM_END |
| 2369 | |
| 2370 | |
2266 | 2371 | /************************************* |
2267 | 2372 | * |
2268 | 2373 | * Generic driver initialization |
r241662 | r241663 | |
2284 | 2389 | init_generic(ROM_BOARD_171_5987); |
2285 | 2390 | } |
2286 | 2391 | |
| 2392 | DRIVER_INIT_MEMBER(segas18_state,hamaway) |
| 2393 | { |
| 2394 | init_generic(ROM_BOARD_837_7525); |
| 2395 | } |
2287 | 2396 | |
2288 | 2397 | |
2289 | 2398 | /************************************* |
r241662 | r241663 | |
2348 | 2457 | GAME( 1989, shdancer1, shdancer, system18, shdancer, segas18_state,generic_shad, ROT0, "Sega", "Shadow Dancer (US)", 0 ) |
2349 | 2458 | GAME( 1992, wwallyj, 0, system18_fd1094, wwally, segas18_state,wwally, ROT0, "Sega", "Wally wo Sagase! (rev B, Japan, FD1094 317-0197B)", 0) // the roms do contain an english logo so maybe there is a world / us set too |
2350 | 2459 | GAME( 1992, wwallyja, wwallyj, system18_fd1094, wwally, segas18_state,wwally, ROT0, "Sega", "Wally wo Sagase! (rev A, Japan, FD1094 317-0197A)", 0 ) |
| 2460 | GAME( 1991, hamaway, 0, system18, hamaway, segas18_state,hamaway, ROT90, "Sega / Santos", "Hammer Away (prototype)", 0 ) |