src/emu/cpu/tms32051/dis32051.c
| r15671 | r15672 | |
| 462 | 462 | |
| 463 | 463 | print("bcnd %04X", FETCH()); |
| 464 | 464 | |
| 465 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 465 | if (*(zl_condition_codes[zl]) != 0) |
| 466 | 466 | { |
| 467 | 467 | print(", %s", zl_condition_codes[zl]); |
| 468 | 468 | } |
| 469 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 469 | if (*(cv_condition_codes[cv]) != 0) |
| 470 | 470 | { |
| 471 | 471 | print(", %s", cv_condition_codes[cv]); |
| 472 | 472 | } |
| 473 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 473 | if (*(tp_condition_codes[tp]) != 0) |
| 474 | 474 | { |
| 475 | 475 | print(", %s", tp_condition_codes[tp]); |
| 476 | 476 | } |
| r15671 | r15672 | |
| 489 | 489 | |
| 490 | 490 | print("xc %d", n); |
| 491 | 491 | |
| 492 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 492 | if (*(zl_condition_codes[zl]) != 0) |
| 493 | 493 | { |
| 494 | 494 | print(", %s", zl_condition_codes[zl]); |
| 495 | 495 | } |
| 496 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 496 | if (*(cv_condition_codes[cv]) != 0) |
| 497 | 497 | { |
| 498 | 498 | print(", %s", cv_condition_codes[cv]); |
| 499 | 499 | } |
| 500 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 500 | if (*(tp_condition_codes[tp]) != 0) |
| 501 | 501 | { |
| 502 | 502 | print(", %s", tp_condition_codes[tp]); |
| 503 | 503 | } |
| r15671 | r15672 | |
| 514 | 514 | |
| 515 | 515 | print("cc %04X", FETCH()); |
| 516 | 516 | |
| 517 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 517 | if (*(zl_condition_codes[zl]) != 0) |
| 518 | 518 | { |
| 519 | 519 | print(", %s", zl_condition_codes[zl]); |
| 520 | 520 | } |
| 521 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 521 | if (*(cv_condition_codes[cv]) != 0) |
| 522 | 522 | { |
| 523 | 523 | print(", %s", cv_condition_codes[cv]); |
| 524 | 524 | } |
| 525 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 525 | if (*(tp_condition_codes[tp]) != 0) |
| 526 | 526 | { |
| 527 | 527 | print(", %s", tp_condition_codes[tp]); |
| 528 | 528 | } |
| r15671 | r15672 | |
| 539 | 539 | |
| 540 | 540 | print("retc "); |
| 541 | 541 | |
| 542 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 542 | if (*(zl_condition_codes[zl]) != 0) |
| 543 | 543 | { |
| 544 | 544 | print(", %s", zl_condition_codes[zl]); |
| 545 | 545 | } |
| 546 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 546 | if (*(cv_condition_codes[cv]) != 0) |
| 547 | 547 | { |
| 548 | 548 | print(", %s", cv_condition_codes[cv]); |
| 549 | 549 | } |
| 550 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 550 | if (*(tp_condition_codes[tp]) != 0) |
| 551 | 551 | { |
| 552 | 552 | print(", %s", tp_condition_codes[tp]); |
| 553 | 553 | } |
| r15671 | r15672 | |
| 567 | 567 | |
| 568 | 568 | print("bcndd %04X", FETCH()); |
| 569 | 569 | |
| 570 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 570 | if (*(zl_condition_codes[zl]) != 0) |
| 571 | 571 | { |
| 572 | 572 | print(", %s", zl_condition_codes[zl]); |
| 573 | 573 | } |
| 574 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 574 | if (*(cv_condition_codes[cv]) != 0) |
| 575 | 575 | { |
| 576 | 576 | print(", %s", cv_condition_codes[cv]); |
| 577 | 577 | } |
| 578 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 578 | if (*(tp_condition_codes[tp]) != 0) |
| 579 | 579 | { |
| 580 | 580 | print(", %s", tp_condition_codes[tp]); |
| 581 | 581 | } |
| r15671 | r15672 | |
| 592 | 592 | |
| 593 | 593 | print("ccd %04X", FETCH()); |
| 594 | 594 | |
| 595 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 595 | if (*(zl_condition_codes[zl]) != 0) |
| 596 | 596 | { |
| 597 | 597 | print(", %s", zl_condition_codes[zl]); |
| 598 | 598 | } |
| 599 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 599 | if (*(cv_condition_codes[cv]) != 0) |
| 600 | 600 | { |
| 601 | 601 | print(", %s", cv_condition_codes[cv]); |
| 602 | 602 | } |
| 603 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 603 | if (*(tp_condition_codes[tp]) != 0) |
| 604 | 604 | { |
| 605 | 605 | print(", %s", tp_condition_codes[tp]); |
| 606 | 606 | } |
| r15671 | r15672 | |
| 617 | 617 | |
| 618 | 618 | print("retcd "); |
| 619 | 619 | |
| 620 | | if (strlen(zl_condition_codes[zl]) > 0) |
| 620 | if (*(zl_condition_codes[zl]) != 0) |
| 621 | 621 | { |
| 622 | 622 | print(", %s", zl_condition_codes[zl]); |
| 623 | 623 | } |
| 624 | | if (strlen(cv_condition_codes[cv]) > 0) |
| 624 | if (*(cv_condition_codes[cv]) != 0) |
| 625 | 625 | { |
| 626 | 626 | print(", %s", cv_condition_codes[cv]); |
| 627 | 627 | } |
| 628 | | if (strlen(tp_condition_codes[tp]) > 0) |
| 628 | if (*(tp_condition_codes[tp]) != 0) |
| 629 | 629 | { |
| 630 | 630 | print(", %s", tp_condition_codes[tp]); |
| 631 | 631 | } |
src/emu/clifront.c
| r15671 | r15672 | |
| 154 | 154 | // first parse options to be able to get software from it |
| 155 | 155 | astring option_errors; |
| 156 | 156 | m_options.parse_command_line(argc, argv, option_errors); |
| 157 | | if (strlen(m_options.software_name()) > 0) |
| 157 | if (*(m_options.software_name()) != 0) |
| 158 | 158 | { |
| 159 | 159 | const game_driver *system = m_options.system(); |
| 160 | | if (system == NULL && strlen(m_options.system_name()) > 0) |
| 160 | if (system == NULL && *(m_options.system_name()) != 0) |
| 161 | 161 | throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name()); |
| 162 | 162 | |
| 163 | 163 | machine_config config(*system, m_options); |
| r15671 | r15672 | |
| 193 | 193 | { |
| 194 | 194 | const char *option = m_options.value(image->brief_instance_name()); |
| 195 | 195 | // mount only if not already mounted |
| 196 | | if (strlen(option) == 0) |
| 196 | if (*option == 0) |
| 197 | 197 | { |
| 198 | 198 | astring val; |
| 199 | 199 | val.printf("%s:%s:%s",swlist->list_name(),m_options.software_name(),swpart->name); |
| r15671 | r15672 | |
| 224 | 224 | if (!m_options.parse_command_line(argc, argv, option_errors)) |
| 225 | 225 | { |
| 226 | 226 | // if we failed, check for no command and a system name first; in that case error on the name |
| 227 | | if (strlen(m_options.command()) == 0 && m_options.system() == NULL && strlen(m_options.system_name()) > 0) |
| 227 | if (*(m_options.command()) == 0 && m_options.system() == NULL && *(m_options.system_name()) != 0) |
| 228 | 228 | throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name()); |
| 229 | 229 | |
| 230 | 230 | // otherwise, error on the options |
| r15671 | r15672 | |
| 238 | 238 | core_filename_extract_base(exename, argv[0], true); |
| 239 | 239 | |
| 240 | 240 | // if we have a command, execute that |
| 241 | | if (strlen(m_options.command()) != 0) |
| 241 | if (*(m_options.command()) != 0) |
| 242 | 242 | execute_commands(exename); |
| 243 | 243 | |
| 244 | 244 | // otherwise, check for a valid system |
| r15671 | r15672 | |
| 246 | 246 | { |
| 247 | 247 | // if we can't find it, give an appropriate error |
| 248 | 248 | const game_driver *system = m_options.system(); |
| 249 | | if (system == NULL && strlen(m_options.system_name()) > 0) |
| 249 | if (system == NULL && *(m_options.system_name()) != 0) |
| 250 | 250 | throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name()); |
| 251 | 251 | // otherwise just run the game |
| 252 | 252 | m_result = mame_execute(m_options, m_osd); |
| r15671 | r15672 | |
| 262 | 262 | |
| 263 | 263 | // if a game was specified, wasn't a wildcard, and our error indicates this was the |
| 264 | 264 | // reason for failure, offer some suggestions |
| 265 | | if (m_result == MAMERR_NO_SUCH_GAME && strlen(m_options.system_name()) > 0 && strchr(m_options.system_name(), '*') == NULL && m_options.system() == NULL) |
| 265 | if (m_result == MAMERR_NO_SUCH_GAME && *(m_options.system_name()) != 0 && strchr(m_options.system_name(), '*') == NULL && m_options.system() == NULL) |
| 266 | 266 | { |
| 267 | 267 | // get the top 10 approximate matches |
| 268 | 268 | driver_enumerator drivlist(m_options); |
| r15671 | r15672 | |
| 806 | 806 | device_iterator iter(config.root_device()); |
| 807 | 807 | for (device_t *dev = iter.first(); dev != NULL; dev = iter.next()) |
| 808 | 808 | { |
| 809 | | if (dev->owner() != NULL && (strlen(dev->shortname())>0) && dev->rom_region() != NULL && (device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE)) { |
| 809 | if (dev->owner() != NULL && (*(dev->shortname()) != 0) && dev->rom_region() != NULL && (device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE)) { |
| 810 | 810 | if (mame_strwildcmp(gamename, dev->shortname()) == 0) |
| 811 | 811 | { |
| 812 | 812 | matched++; |