trunk/src/devices/bus/isa/3c505.cpp
| r253559 | r253560 | |
| 26 | 26 | #define LOG1(d,x) { if (verbose > 0) LOG(d,x)} |
| 27 | 27 | #define LOG2(d,x) { if (verbose > 1) LOG(d,x)} |
| 28 | 28 | |
| 29 | | #define MAINCPU "maincpu" |
| 30 | | |
| 31 | 29 | #ifdef LSB_FIRST |
| 32 | 30 | static UINT16 uint16_to_le(UINT16 value) |
| 33 | 31 | { |
| r253559 | r253560 | |
| 424 | 422 | { |
| 425 | 423 | static char statebuf[64]; /* string buffer containing state description */ |
| 426 | 424 | |
| 427 | | device_t *cpu = machine().device(MAINCPU); |
| 425 | device_t *cpu = machine().firstcpu; |
| 428 | 426 | osd_ticks_t t = osd_ticks(); |
| 429 | 427 | int s = t / osd_ticks_per_second(); |
| 430 | 428 | int ms = (t % osd_ticks_per_second()) / 1000; |
| r253559 | r253560 | |
| 442 | 440 | return statebuf; |
| 443 | 441 | } |
| 444 | 442 | |
| 443 | /*------------------------------------------------- |
| 444 | logerror - log an error message (w/o device tags) |
| 445 | -------------------------------------------------*/ |
| 446 | |
| 447 | void threecom3c505_device::logerror(const char *format, ...) const |
| 448 | { |
| 449 | va_list arg; |
| 450 | va_start(arg, format); |
| 451 | machine().vlogerror(format, arg); |
| 452 | va_end(arg); |
| 453 | } |
| 454 | |
| 445 | 455 | //************************************************************************** |
| 446 | 456 | // data_buffer |
| 447 | 457 | //************************************************************************** |
| r253559 | r253560 | |
| 855 | 865 | |
| 856 | 866 | void threecom3c505_device::set_command_pending(int state) |
| 857 | 867 | { |
| 858 | | LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d%s", |
| 859 | | m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending, state ? "" :"\n")); |
| 868 | LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d", |
| 869 | m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending)); |
| 860 | 870 | |
| 861 | 871 | //- verbose = onoff ? 1 : 2; |
| 862 | 872 | |
| r253559 | r253560 | |
| 1657 | 1667 | |
| 1658 | 1668 | int threecom3c505_device::tx_data(device_t *device, const UINT8 data[], int length) |
| 1659 | 1669 | { |
| 1660 | | LOG1(device,("threecom3c505_device::tx_data length=%d", length)); |
| 1670 | LOG1(this,("threecom3c505_device::tx_data length=%d", length)); |
| 1661 | 1671 | return 1; |
| 1662 | 1672 | } |
| 1663 | 1673 | |
trunk/src/devices/bus/isa/omti8621.cpp
| r253559 | r253560 | |
| 73 | 73 | virtual void device_reset() override; |
| 74 | 74 | |
| 75 | 75 | void omti_disk_config(UINT16 disk_type); |
| 76 | |
| 77 | private: |
| 78 | void logerror(const char *format, ...) const; |
| 79 | |
| 76 | 80 | public: |
| 77 | 81 | UINT16 m_type; |
| 78 | 82 | UINT16 m_cylinders; |
| r253559 | r253560 | |
| 685 | 689 | memset(disk->m_esdi_defect_list+6, 0xff, 5); // end of defect list |
| 686 | 690 | } |
| 687 | 691 | |
| 692 | /*------------------------------------------------- |
| 693 | logerror - log an error message (w/o device tags) |
| 694 | -------------------------------------------------*/ |
| 695 | |
| 696 | void omti8621_device::logerror(const char *format, ...) const |
| 697 | { |
| 698 | va_list arg; |
| 699 | va_start(arg, format); |
| 700 | machine().vlogerror(format, arg); |
| 701 | va_end(arg); |
| 702 | } |
| 703 | |
| 688 | 704 | /*************************************************************************** |
| 689 | 705 | log_command - log command from a command descriptor block |
| 690 | 706 | ***************************************************************************/ |
| r253559 | r253560 | |
| 693 | 709 | { |
| 694 | 710 | if (verbose > 0) { |
| 695 | 711 | int i; |
| 696 | | char sb[100]; |
| 697 | | std::string text(cpu_context(this)); |
| 698 | | text += ": OMTI command "; |
| 712 | logerror("%s: OMTI command ", cpu_context(this)); |
| 699 | 713 | switch (cdb[0]) { |
| 700 | 714 | case OMTI_CMD_TEST_DRIVE_READY: // 0x00 |
| 701 | | text += "Test Drive Ready"; |
| 715 | logerror("Test Drive Ready"); |
| 702 | 716 | break; |
| 703 | 717 | case OMTI_CMD_RECALIBRATE: // 0x01 |
| 704 | | text += "Recalibrate"; |
| 718 | logerror("Recalibrate"); |
| 705 | 719 | break; |
| 706 | 720 | case OMTI_CMD_REQUEST_SENSE: // 0x03 |
| 707 | | text += "Request Sense"; |
| 721 | logerror("Request Sense"); |
| 708 | 722 | break; |
| 709 | 723 | case OMTI_CMD_READ_VERIFY: // 0x05 |
| 710 | | text += "Read Verify"; |
| 724 | logerror("Read Verify"); |
| 711 | 725 | break; |
| 712 | 726 | case OMTI_CMD_FORMAT_TRACK: // 0x06 |
| 713 | | text += "Format Track"; |
| 727 | logerror("Format Track"); |
| 714 | 728 | break; |
| 715 | 729 | case OMTI_CMD_FORMAT_BAD_TRACK: // 0x07 |
| 716 | | text += "Format Bad Track"; |
| 730 | logerror("Format Bad Track"); |
| 717 | 731 | break; |
| 718 | 732 | case OMTI_CMD_READ: // 0x08 |
| 719 | | text += "Read"; |
| 733 | logerror("Read"); |
| 720 | 734 | break; |
| 721 | 735 | case OMTI_CMD_WRITE: // 0x0A |
| 722 | | text += "Write"; |
| 736 | logerror("Write"); |
| 723 | 737 | break; |
| 724 | 738 | case OMTI_CMD_SEEK: // 0x0B |
| 725 | | text += "Seek"; |
| 739 | logerror("Seek"); |
| 726 | 740 | break; |
| 727 | 741 | case OMTI_CMD_READ_SECTOR_BUFFER: // 0x0E |
| 728 | | text += "Read Sector Buffer"; |
| 742 | logerror("Read Sector Buffer"); |
| 729 | 743 | break; |
| 730 | 744 | case OMTI_CMD_WRITE_SECTOR_BUFFER: // 0x0F |
| 731 | | text += "Write Sector Buffer"; |
| 745 | logerror("Write Sector Buffer"); |
| 732 | 746 | break; |
| 733 | 747 | case OMTI_CMD_ASSIGN_ALTERNATE_TRACK: // 0x11 |
| 734 | | text += "Assign Alternate Track"; |
| 748 | logerror("Assign Alternate Track"); |
| 735 | 749 | break; |
| 736 | 750 | case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E |
| 737 | | text += "Read Data to Buffer"; |
| 751 | logerror("Read Data to Buffer"); |
| 738 | 752 | break; |
| 739 | 753 | case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F |
| 740 | | text += "Write Data from Buffer"; |
| 754 | logerror("Write Data from Buffer"); |
| 741 | 755 | break; |
| 742 | 756 | case OMTI_CMD_COPY: // 0x20 |
| 743 | | text += "Copy"; |
| 757 | logerror("Copy"); |
| 744 | 758 | break; |
| 745 | 759 | case OMTI_CMD_READ_ESDI_DEFECT_LIST: // 0x37 |
| 746 | | text += "Read ESDI Defect List"; |
| 760 | logerror("Read ESDI Defect List"); |
| 747 | 761 | break; |
| 748 | 762 | case OMTI_CMD_RAM_DIAGNOSTICS: // 0xE0 |
| 749 | | text += "RAM. Diagnostic"; |
| 763 | logerror("RAM. Diagnostic"); |
| 750 | 764 | break; |
| 751 | 765 | case OMTI_CMD_CONTROLLER_INT_DIAGNOSTIC: // 0xE4 |
| 752 | | text += "Controller Int. Diagnostic"; |
| 766 | logerror("Controller Int. Diagnostic"); |
| 753 | 767 | break; |
| 754 | 768 | case OMTI_CMD_READ_LONG: // 0xE5 |
| 755 | | text += "Read Long"; |
| 769 | logerror("Read Long"); |
| 756 | 770 | break; |
| 757 | 771 | case OMTI_CMD_WRITE_LONG: // 0xE6 |
| 758 | | text += "Write Long"; |
| 772 | logerror("Write Long"); |
| 759 | 773 | break; |
| 760 | 774 | case OMTI_CMD_READ_CONFIGURATION: // 0xEC |
| 761 | | text += "Read Configuration"; |
| 775 | logerror("Read Configuration"); |
| 762 | 776 | break; |
| 763 | 777 | case OMTI_CMD_INVALID_COMMAND: // 0xFF |
| 764 | | text += "Invalid Command"; |
| 778 | logerror("Invalid Command"); |
| 765 | 779 | break; |
| 766 | 780 | default: |
| 767 | | text += "!!! Unexpected Command !!!"; |
| 781 | logerror("!!! Unexpected Command !!!"); |
| 768 | 782 | } |
| 769 | 783 | // logerror(" (%02x, length=%02x)", cdb[0], cdb_length); |
| 770 | 784 | for (i = 0; i < cdb_length; i++) { |
| 771 | | sprintf(sb, " %02x", cdb[i]); |
| 772 | | text += sb; |
| 785 | logerror(" %02x", cdb[i]); |
| 773 | 786 | } |
| 774 | 787 | |
| 775 | 788 | switch (cdb[0]) { |
| r253559 | r253560 | |
| 780 | 793 | case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E |
| 781 | 794 | case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F |
| 782 | 795 | case OMTI_CMD_COPY: // 0x20 |
| 783 | | sprintf(sb, " (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]); |
| 784 | | text += sb; |
| 796 | logerror(" (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]); |
| 785 | 797 | break; |
| 786 | 798 | } |
| 787 | | text += "\n"; |
| 788 | | logerror(text.c_str()); |
| 799 | logerror("\n"); |
| 789 | 800 | } |
| 790 | 801 | } |
| 791 | 802 | |
| r253559 | r253560 | |
| 795 | 806 | |
| 796 | 807 | void omti8621_device::log_data() |
| 797 | 808 | { |
| 798 | | if (verbose > 0) |
| 799 | | { |
| 809 | if (verbose > 0) { |
| 800 | 810 | int i; |
| 801 | | char sb[100]; |
| 802 | | sprintf(sb, "%s: OMTI data (length=%02x)", cpu_context(this), |
| 811 | logerror("%s: OMTI data (length=%02x)", cpu_context(this), |
| 803 | 812 | data_length); |
| 804 | | std::string text(sb); |
| 805 | | for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++) |
| 806 | | { |
| 807 | | sprintf(sb, " %02x", data_buffer[i]); |
| 808 | | text += sb; |
| 813 | for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++) { |
| 814 | logerror(" %02x", data_buffer[i]); |
| 809 | 815 | } |
| 810 | 816 | |
| 811 | | if (i < data_length) |
| 812 | | { |
| 813 | | text += " ..."; |
| 817 | if (i < data_length) { |
| 818 | logerror(" ..."); |
| 814 | 819 | } |
| 815 | | text += "\n"; |
| 816 | | logerror(text.c_str()); |
| 820 | logerror("\n"); |
| 817 | 821 | } |
| 818 | 822 | } |
| 819 | 823 | |
| r253559 | r253560 | |
| 1351 | 1355 | } |
| 1352 | 1356 | |
| 1353 | 1357 | /*------------------------------------------------- |
| 1358 | logerror - log an error message (w/o device tags) |
| 1359 | -------------------------------------------------*/ |
| 1360 | |
| 1361 | void omti_disk_image_device::logerror(const char *format, ...) const |
| 1362 | { |
| 1363 | va_list arg; |
| 1364 | va_start(arg, format); |
| 1365 | machine().vlogerror(format, arg); |
| 1366 | va_end(arg); |
| 1367 | } |
| 1368 | |
| 1369 | /*------------------------------------------------- |
| 1354 | 1370 | device start callback |
| 1355 | 1371 | -------------------------------------------------*/ |
| 1356 | 1372 | |
trunk/src/devices/bus/isa/sc499.cpp
| r253559 | r253560 | |
| 409 | 409 | { |
| 410 | 410 | static char statebuf[64]; /* string buffer containing state description */ |
| 411 | 411 | |
| 412 | device_t *cpu = machine().firstcpu; |
| 412 | 413 | osd_ticks_t t = osd_ticks(); |
| 413 | 414 | int s = t / osd_ticks_per_second(); |
| 414 | 415 | int ms = (t % osd_ticks_per_second()) / 1000; |
| 415 | 416 | |
| 416 | | sprintf(statebuf, "%d.%03d%s:", s, ms, tag()); |
| 417 | | |
| 417 | /* if we have an executing CPU, output data */ |
| 418 | if (cpu != nullptr) |
| 419 | { |
| 420 | sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(), |
| 421 | cpu->safe_pcbase(), tag()); |
| 422 | } |
| 423 | else |
| 424 | { |
| 425 | sprintf(statebuf, "%d.%03d", s, ms); |
| 426 | } |
| 418 | 427 | return statebuf; |
| 419 | 428 | } |
| 420 | 429 | |
| 421 | 430 | /*------------------------------------------------- |
| 431 | logerror - log an error message (w/o device tags) |
| 432 | -------------------------------------------------*/ |
| 433 | |
| 434 | void sc499_device::logerror(const char *format, ...) const |
| 435 | { |
| 436 | va_list arg; |
| 437 | va_start(arg, format); |
| 438 | machine().vlogerror(format, arg); |
| 439 | va_end(arg); |
| 440 | } |
| 441 | |
| 442 | /*------------------------------------------------- |
| 422 | 443 | tape_status_clear - clear bits in tape status |
| 423 | 444 | -------------------------------------------------*/ |
| 424 | 445 | |
trunk/src/mame/video/apollo.cpp
| r253559 | r253560 | |
| 1711 | 1711 | MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER) |
| 1712 | 1712 | MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 1713 | 1713 | MCFG_SCREEN_REFRESH_RATE(76) |
| 1714 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(657)) |
| 1714 | MCFG_SCREEN_RAW_PARAMS(68000000, 1343, 0, 1024, 841, 0, 800) |
| 1715 | 1715 | MCFG_SCREEN_SIZE(1024, 800) |
| 1716 | 1716 | MCFG_SCREEN_VISIBLE_AREA(0, 1023, 0, 799) |
| 1717 | 1717 | MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_15i, screen_update) |
| r253559 | r253560 | |
| 1895 | 1895 | MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER) |
| 1896 | 1896 | MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 1897 | 1897 | MCFG_SCREEN_REFRESH_RATE(64) |
| 1898 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(616)) |
| 1898 | MCFG_SCREEN_RAW_PARAMS(120000000, 1728, 0, 1280, 1066, 0, 1024) |
| 1899 | 1899 | MCFG_SCREEN_SIZE(1280, 1024) |
| 1900 | 1900 | MCFG_SCREEN_VISIBLE_AREA(0, 1279, 0, 1023) |
| 1901 | 1901 | MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_19i, screen_update) |