src/mess/drivers/mephisto.c
| r10603 | r10604 | |
| 53 | 53 | |
| 54 | 54 | */ |
| 55 | 55 | |
| 56 | /* Mephisto 4 Turbo Kit 18mhz - (mm4tk) |
| 57 | This is a replacement rom combining the turbo kit initial rom with the original MM IV. |
| 58 | The Turbo Kit powers up to it's tiny rom, copies itself to ram, banks in normal rom, |
| 59 | copies that to faster SRAM, then patches the checksum and the LED blink delays. |
| 60 | If someone else wants to code up the power up banking, feel free |
| 61 | |
| 62 | There is an undumped MM V Turbo Kit, which will be the exact same except for location of |
| 63 | the patches. The mm5tk just needs the normal mm5 ROM swapped out for that one to |
| 64 | blinks the LEDs a little slower. |
| 65 | |
| 66 | -- Cowering (2011) |
| 67 | */ |
| 68 | |
| 69 | |
| 56 | 70 | #include "emu.h" |
| 57 | 71 | #include "cpu/m6502/m6502.h" |
| 58 | 72 | // #include "sound/dac.h" |
| r10603 | r10604 | |
| 72 | 86 | UINT8 led_status; |
| 73 | 87 | UINT8 *ram; |
| 74 | 88 | UINT8 led7; |
| 89 | UINT8 allowNMI; |
| 75 | 90 | }; |
| 76 | 91 | |
| 77 | 92 | |
| r10603 | r10604 | |
| 86 | 101 | state->lcd_shift_counter&=3; |
| 87 | 102 | } |
| 88 | 103 | |
| 104 | static WRITE8_HANDLER ( mephisto_NMI ) |
| 105 | { |
| 106 | |
| 107 | mephisto_state *state = space->machine->driver_data<mephisto_state>(); |
| 108 | state->allowNMI = 1; |
| 109 | } |
| 110 | |
| 89 | 111 | static READ8_HANDLER(read_keys) |
| 90 | 112 | { |
| 91 | 113 | mephisto_state *state = space->machine->driver_data<mephisto_state>(); |
| r10603 | r10604 | |
| 157 | 179 | AM_RANGE( 0x3400, 0x3407) AM_WRITE( write_led ) // Status LEDs+ buzzer |
| 158 | 180 | AM_RANGE( 0x2400, 0x2407) AM_WRITE ( mboard_write_LED_8 ) // Chessboard |
| 159 | 181 | AM_RANGE( 0x2800, 0x2800) AM_WRITE ( mboard_write_board_8) // Chessboard |
| 160 | | AM_RANGE( 0x3800, 0x3800) AM_RAM // unknwon write access |
| 182 | AM_RANGE( 0x3800, 0x3800) AM_WRITE ( mephisto_NMI ) // NMI enable |
| 161 | 183 | AM_RANGE( 0x3000, 0x3000) AM_READ( mboard_read_board_8 ) // Chessboard |
| 162 | 184 | AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library |
| 163 | 185 | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| r10603 | r10604 | |
| 320 | 342 | { |
| 321 | 343 | mephisto_state *state = timer.machine->driver_data<mephisto_state>(); |
| 322 | 344 | device_t *speaker = timer.machine->device("beep"); |
| 323 | | cputag_set_input_line(timer.machine, "maincpu", INPUT_LINE_NMI,PULSE_LINE); |
| 324 | | // dac_data_w(0,state->led_status&64?128:0); |
| 345 | if (state->allowNMI) { |
| 346 | state->allowNMI = 0; |
| 347 | cputag_set_input_line(timer.machine, "maincpu", INPUT_LINE_NMI,PULSE_LINE); |
| 348 | } |
| 325 | 349 | beep_set_state(speaker,state->led_status&64?1:0); |
| 326 | 350 | } |
| 327 | 351 | |
| r10603 | r10604 | |
| 339 | 363 | { |
| 340 | 364 | mephisto_state *state = machine->driver_data<mephisto_state>(); |
| 341 | 365 | state->lcd_shift_counter=3; |
| 342 | | |
| 366 | state->allowNMI = 1; |
| 343 | 367 | mboard_savestate_register(machine); |
| 344 | 368 | } |
| 345 | 369 | |
| r10603 | r10604 | |
| 357 | 381 | { |
| 358 | 382 | mephisto_state *state = machine->driver_data<mephisto_state>(); |
| 359 | 383 | state->lcd_shift_counter = 3; |
| 360 | | |
| 384 | state->allowNMI = 1; |
| 361 | 385 | mboard_set_border_pieces(); |
| 362 | 386 | mboard_set_board(); |
| 363 | 387 | |
| r10603 | r10604 | |
| 367 | 391 | output_set_value("MM",1); |
| 368 | 392 | else if (!strcmp(machine->m_game.name,"mm4") ) |
| 369 | 393 | output_set_value("MM",2); |
| 394 | else if (!strcmp(machine->m_game.name,"mm4tk") ) |
| 395 | output_set_value("MM",5); |
| 396 | else if (!strcmp(machine->m_game.name,"mm5tk") ) |
| 397 | output_set_value("MM",5); |
| 370 | 398 | else if (!strcmp(machine->m_game.name,"mm5") ) |
| 371 | 399 | output_set_value("MM",3); |
| 372 | 400 | else if (!strcmp(machine->m_game.name,"mm50") ) |
| r10603 | r10604 | |
| 398 | 426 | |
| 399 | 427 | static MACHINE_CONFIG_DERIVED( rebel5, mephisto ) |
| 400 | 428 | /* basic machine hardware */ |
| 401 | | // MCFG_IMPORT_FROM( mephisto ) |
| 402 | 429 | MCFG_CPU_MODIFY("maincpu") |
| 403 | 430 | MCFG_CPU_PROGRAM_MAP(rebel5_mem) |
| 404 | 431 | //beep_set_frequency(0, 4000); |
| 405 | 432 | MACHINE_CONFIG_END |
| 406 | 433 | |
| 407 | 434 | static MACHINE_CONFIG_DERIVED( mm2, mephisto ) |
| 408 | | // MCFG_IMPORT_FROM( mephisto ) |
| 409 | 435 | MCFG_CPU_REPLACE("maincpu", M65C02, 3700000) |
| 410 | 436 | MCFG_CPU_PROGRAM_MAP(mm2_mem) |
| 411 | 437 | MCFG_MACHINE_START( mm2 ) |
| r10603 | r10604 | |
| 414 | 440 | MCFG_TIMER_ADD_PERIODIC("irq_timer", update_irq, attotime::from_hz(450)) |
| 415 | 441 | MACHINE_CONFIG_END |
| 416 | 442 | |
| 443 | static MACHINE_CONFIG_DERIVED( mm4tk, mephisto ) |
| 444 | MCFG_CPU_MODIFY("maincpu") |
| 445 | MCFG_CPU_REPLACE("maincpu", M65C02, 18000000) |
| 446 | MCFG_CPU_PROGRAM_MAP(mephisto_mem) |
| 447 | MACHINE_CONFIG_END |
| 417 | 448 | |
| 418 | 449 | ROM_START(rebel5) |
| 419 | 450 | ROM_REGION(0x10000,"maincpu",0) |
| r10603 | r10604 | |
| 434 | 465 | ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(2)) |
| 435 | 466 | ROM_END |
| 436 | 467 | |
| 468 | ROM_START(mm4tk) |
| 469 | ROM_REGION(0x10000,"maincpu",0) |
| 470 | ROM_LOAD("mm4tk.rom", 0x8000, 0x8000, CRC(51cb36a4) SHA1(9e184b4e85bb721e794b88d8657ae8d2ff5a24af)) |
| 471 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 472 | ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" ) |
| 473 | ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(0)) |
| 474 | ROM_END |
| 475 | |
| 476 | ROM_START(mm5tk) |
| 477 | ROM_REGION(0x10000,"maincpu",0) |
| 478 | ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048)) |
| 479 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 480 | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 481 | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(0)) |
| 482 | ROM_END |
| 483 | |
| 437 | 484 | ROM_START(mm5) |
| 438 | 485 | ROM_REGION(0x10000,"maincpu",0) |
| 439 | 486 | ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048)) |
| r10603 | r10604 | |
| 466 | 513 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 467 | 514 | |
| 468 | 515 | CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 4 Schach Computer", GAME_SUPPORTS_SAVE ) |
| 516 | CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto, "Hegener & Glaser", "Mephisto 4 Schach Computer Turbo Kit + HG440", GAME_SUPPORTS_SAVE ) |
| 469 | 517 | CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schach Computer", GAME_SUPPORTS_SAVE ) |
| 518 | CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schach Computer Turbo Kit + HG550", GAME_SUPPORTS_SAVE ) |
| 470 | 519 | CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schach Computer", GAME_SUPPORTS_SAVE ) |
| 471 | 520 | CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto, "Hegener & Glaser", "Mephisto Rebel 5 Schach Computer", GAME_SUPPORTS_SAVE ) |
| 472 | 521 | CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto, "Hegener & Glaser", "Mephisto MM2 Schach Computer", GAME_SUPPORTS_SAVE ) |