branches/alto2/src/emu/machine/diablo_hd.c
| r26172 | r26173 | |
| 103 | 103 | { |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | /** |
| 107 | * @brief diablo_hd_device destructor |
| 108 | * Free all m_cache and m_bits pages and the arrays |
| 109 | */ |
| 106 | 110 | diablo_hd_device::~diablo_hd_device() |
| 107 | 111 | { |
| 108 | 112 | for (int page = 0; page < m_pages; page++) { |
| r26172 | r26173 | |
| 121 | 125 | } |
| 122 | 126 | } |
| 123 | 127 | |
| 124 | | void diablo_hd_device::set_sector_callback(void *cookie, void (*callback)(void *, int)) |
| 125 | | { |
| 126 | | LOG_DRIVE((0,"[DHD] %s cookie=%p callback=%p\n", __FUNCTION__, cookie, callback)); |
| 127 | | m_sector_callback_cookie = cookie; |
| 128 | | m_sector_callback = callback; |
| 129 | | } |
| 130 | | |
| 131 | 128 | #if DIABLO_DEBUG |
| 132 | 129 | void diablo_hd_device::logprintf(int level, const char* format, ...) |
| 133 | 130 | { |
| r26172 | r26173 | |
| 140 | 137 | } |
| 141 | 138 | #endif |
| 142 | 139 | |
| 140 | void diablo_hd_device::set_sector_callback(void *cookie, void (*callback)(void *, int)) |
| 141 | { |
| 142 | LOG_DRIVE((0,"[DHD] %s cookie=%p callback=%p\n", __FUNCTION__, cookie, callback)); |
| 143 | m_sector_callback_cookie = cookie; |
| 144 | m_sector_callback = callback; |
| 145 | } |
| 146 | |
| 143 | 147 | #define DIABLO31_ROTATION_TIME attotime::from_msec(39.9999) //!< DIABLO 31 rotation time is approx. 40ms |
| 144 | 148 | #define DIABLO31_SECTOR_TIME attotime::from_msec(39.9999/12) //!< DIABLO 31 sector time |
| 145 | 149 | /** |
| r26172 | r26173 | |
| 246 | 250 | UINT8 data[2*DIABLO_DATA_WORDS]; //!< sector data words |
| 247 | 251 | } diablo_sector_t; |
| 248 | 252 | |
| 249 | | /** @brief write a bit into an array of UINT32 */ |
| 253 | /** |
| 254 | * @brief write a bit into an array of UINT32 |
| 255 | * @param bits pointer to array of bits |
| 256 | * @param dst destination index |
| 257 | * @param bit bit value |
| 258 | * @return next destination index |
| 259 | */ |
| 250 | 260 | static inline size_t WRBIT(UINT32* bits, size_t dst, int bit) |
| 251 | 261 | { |
| 252 | 262 | if (bit) { |
| r26172 | r26173 | |
| 257 | 267 | return ++dst; |
| 258 | 268 | } |
| 259 | 269 | |
| 260 | | /** @brief read a bit from an array of UINT32 */ |
| 270 | /** |
| 271 | * @brief read a bit from an array of UINT32 |
| 272 | * @param bits pointer to array of bits |
| 273 | * @param src source index |
| 274 | * @param bit reference to the bit to set |
| 275 | * @return next source index |
| 276 | */ |
| 261 | 277 | static inline size_t RDBIT(UINT32* bits, size_t src, int& bit) |
| 262 | 278 | { |
| 263 | 279 | bit = (bits[src/32] >> (src % 32)) & 1; |
| r26172 | r26173 | |
| 415 | 431 | * @brief expand a sector into an array of clock and data bits |
| 416 | 432 | * |
| 417 | 433 | * @param page page number (0 to DRIVE_PAGES-1) |
| 434 | * @return pointer to the newly allocated array of bits |
| 418 | 435 | */ |
| 419 | 436 | UINT32* diablo_hd_device::expand_sector() |
| 420 | 437 | { |
| r26172 | r26173 | |
| 529 | 546 | * @brief find a sync bit in an array of clock and data bits |
| 530 | 547 | * |
| 531 | 548 | * @param bits pointer to the sector's bits |
| 532 | | * @param src source offset into bits (bit number) |
| 549 | * @param src source index into bits (bit number) |
| 533 | 550 | * @param size number of words to scan for a sync word |
| 534 | | * @return next source offset for reading |
| 551 | * @return next source index for reading |
| 535 | 552 | */ |
| 536 | 553 | size_t diablo_hd_device::squeeze_sync(UINT32 *bits, size_t src, size_t size) |
| 537 | 554 | { |
| r26172 | r26173 | |
| 565 | 582 | * @brief find a 16 x 0 bits sequence in an array of clock and data bits |
| 566 | 583 | * |
| 567 | 584 | * @param bits pointer to the sector's bits |
| 568 | | * @param src source offset into bits (bit number) |
| 585 | * @param src source index into bits (bit number) |
| 569 | 586 | * @param size number of words to scan for a sync word |
| 570 | | * @return next source offset for reading |
| 587 | * @return next source index for reading |
| 571 | 588 | */ |
| 572 | 589 | size_t diablo_hd_device::squeeze_unsync(UINT32 *bits, size_t src, size_t size) |
| 573 | 590 | { |
| r26172 | r26173 | |
| 600 | 617 | * @brief squeeze an array of clock and data bits into a sector's record |
| 601 | 618 | * |
| 602 | 619 | * @param bits pointer to the sector's bits |
| 603 | | * @param src source offset into bits (bit number) |
| 620 | * @param src source index into bits (bit number) |
| 604 | 621 | * @param field pointer to the record data (bytes) |
| 605 | 622 | * @param size size of the record in bytes |
| 606 | | * @return next source offset for reading |
| 623 | * @return next source index for reading |
| 607 | 624 | */ |
| 608 | 625 | size_t diablo_hd_device::squeeze_record(UINT32 *bits, size_t src, UINT8 *field, size_t size) |
| 609 | 626 | { |
| r26172 | r26173 | |
| 630 | 647 | * @brief squeeze an array of 32 clock and data bits into a checksum word |
| 631 | 648 | * |
| 632 | 649 | * @param bits pointer to the sector's bits |
| 633 | | * @param src source offset into bits (bit number) |
| 650 | * @param src source index into bits (bit number) |
| 634 | 651 | * @param cksum pointer to an int to receive the checksum word |
| 635 | | * @return next source offset for reading |
| 652 | * @return next source index for reading |
| 636 | 653 | */ |
| 637 | 654 | size_t diablo_hd_device::squeeze_cksum(UINT32 *bits, size_t src, int *cksum) |
| 638 | 655 | { |
| r26172 | r26173 | |
| 654 | 671 | /** |
| 655 | 672 | * @brief squeeze a array of clock and data bits into a sector's data |
| 656 | 673 | * |
| 657 | | * Find and squeeze header, label and data and verify for |
| 658 | | * zero checksums (starting with 0521) |
| 674 | * Find and squeeze header, label and data fields and verify for |
| 675 | * zero checksums, starting with a value of 0521. |
| 659 | 676 | * Write the page back to the media and free the bitmap |
| 660 | 677 | */ |
| 661 | 678 | void diablo_hd_device::squeeze_sector() |
| r26172 | r26173 | |
| 773 | 790 | |
| 774 | 791 | /** |
| 775 | 792 | * @brief return number of bitclk edges for a sector |
| 776 | | * @return number of bitclk edges for a sector |
| 793 | * @return number of bitclks for a sector |
| 777 | 794 | */ |
| 778 | 795 | int diablo_hd_device::bits_per_sector() const |
| 779 | 796 | { |
| r26172 | r26173 | |
| 791 | 808 | |
| 792 | 809 | /** |
| 793 | 810 | * @brief return the number of a drive unit |
| 794 | | * @return the unit number |
| 811 | * @return the unit number of this instance |
| 795 | 812 | */ |
| 796 | 813 | int diablo_hd_device::unit() const |
| 797 | 814 | { |
| r26172 | r26173 | |
| 847 | 864 | * @brief return the current sector mark status of a drive |
| 848 | 865 | * |
| 849 | 866 | * The sector mark is derived from the offset into the current sector. |
| 867 | * It is deasserted except for a short time (a few micro seconds) |
| 868 | * around each new sector. |
| 850 | 869 | * |
| 851 | 870 | * @return the current sector mark for the drive (0:active 1:inactive) |
| 852 | 871 | */ |
| r26172 | r26173 | |
| 862 | 881 | |
| 863 | 882 | /** |
| 864 | 883 | * @brief return the address acknowledge state |
| 865 | | * @return the address acknowledge state (0:active 1:inactive) |
| 884 | * @return address acknowledge state (0:active 1:inactive) |
| 866 | 885 | */ |
| 867 | 886 | int diablo_hd_device::get_addx_acknowledge_0() const |
| 868 | 887 | { |
| r26172 | r26173 | |
| 871 | 890 | |
| 872 | 891 | /** |
| 873 | 892 | * @brief return the log address interlock state |
| 874 | | * @return the log address interlock state (0:active 1:inactive) |
| 893 | * @return log address interlock state (0:active 1:inactive) |
| 875 | 894 | */ |
| 876 | 895 | int diablo_hd_device::get_log_addx_interlock_0() const |
| 877 | 896 | { |
| r26172 | r26173 | |
| 880 | 899 | |
| 881 | 900 | /** |
| 882 | 901 | * @brief return the seek incomplete state |
| 883 | | * @return the address acknowledge state (0:active 1:inactive) |
| 902 | * @return address acknowledge state (0:active 1:inactive) |
| 884 | 903 | */ |
| 885 | 904 | int diablo_hd_device::get_seek_incomplete_0() const |
| 886 | 905 | { |
| r26172 | r26173 | |
| 892 | 911 | * |
| 893 | 912 | * Note: The bus lines are active low |
| 894 | 913 | * The value on the BUS needs an XOR with DIABLO_CYLINDER_MASK |
| 914 | * to resemble the physical line levels. |
| 895 | 915 | * |
| 896 | | * @return the current cylinder number for the drive |
| 916 | * @return current cylinder number for the drive |
| 897 | 917 | */ |
| 898 | 918 | int diablo_hd_device::get_cylinder() const |
| 899 | 919 | { |
| r26172 | r26173 | |
| 905 | 925 | * |
| 906 | 926 | * Note: The bus lines are active low |
| 907 | 927 | * The value on the BUS needs an XOR with DIABLO_HEAD_MASK |
| 928 | * to resemble the physical line levels. |
| 908 | 929 | * |
| 909 | | * @return the currently selected head for the drive |
| 930 | * @return currently selected head for the drive |
| 910 | 931 | */ |
| 911 | 932 | int diablo_hd_device::get_head() const |
| 912 | 933 | { |
| r26172 | r26173 | |
| 918 | 939 | * |
| 919 | 940 | * The current sector number is derived from the time since the |
| 920 | 941 | * most recent track rotation started. |
| 921 | | * It counts modulo DIABLO_SPT |
| 942 | * It counts modulo DIABLO_SPT (12). |
| 922 | 943 | * |
| 923 | 944 | * Note: The bus lines are active low |
| 924 | 945 | * The value on the BUS needs an XOR with DIABLO_SECTOR_MASK |
| 946 | * to resemble the physical line levels. |
| 925 | 947 | * |
| 926 | | * @return the current sector for the drive |
| 948 | * @return current sector for the drive |
| 927 | 949 | */ |
| 928 | 950 | int diablo_hd_device::get_sector() const |
| 929 | 951 | { |
| r26172 | r26173 | |
| 933 | 955 | /** |
| 934 | 956 | * @brief return the current page of a drive unit |
| 935 | 957 | * |
| 936 | | * The current page number is derived from the cylinder, head, |
| 937 | | * and sector numbers. |
| 958 | * The current page number is derived from the cylinder, head, and sector numbers. |
| 959 | * This is a convenience function. |
| 960 | * There is no such signal on the BUS. |
| 938 | 961 | * |
| 939 | 962 | * @return the current page for the drive |
| 940 | 963 | */ |
| r26172 | r26173 | |
| 1131 | 1154 | int bit = 0; |
| 1132 | 1155 | |
| 1133 | 1156 | if (m_rdgate_0) { |
| 1134 | | LOG_DRIVE((9,"[DHD] %s: unit #%d rdgate not asserted\n", __FUNCTION__, m_unit)); |
| 1157 | LOG_DRIVE((0,"[DHD] %s: unit #%d rdgate not asserted\n", __FUNCTION__, m_unit)); |
| 1135 | 1158 | return 1; // read gate is not asserted (active 0) |
| 1136 | 1159 | } |
| 1137 | 1160 | |
branches/alto2/src/emu/cpu/alto2/a2disk.c
| r26172 | r26173 | |
| 1060 | 1060 | int i; |
| 1061 | 1061 | UINT8 s0, s1; |
| 1062 | 1062 | |
| 1063 | | LOG((LOG_DISK,8," >>> KWD timing bitclk:%d datin:%d sect4:%d\n", bitclk, datin, m_dsk.sect4)); |
| 1063 | LOG((LOG_DISK,8," >>> KWD timing bitclk:%d datin:%d block:%d SECT[4]:%d\n", bitclk, datin, block, m_dsk.sect4)); |
| 1064 | |
| 1064 | 1065 | if (m_dsk.sect4 != dhd->get_sector_mark_0()) { |
| 1065 | 1066 | // SECT[4] transition |
| 1066 | 1067 | m_dsk.sect4 = dhd->get_sector_mark_0(); |
| r26172 | r26173 | |
| 1076 | 1077 | } |
| 1077 | 1078 | } |
| 1078 | 1079 | if (0 != m_dsk.seclate && m_dsk.bitclk && !bitclk) { |
| 1079 | | // if SECLATE is 1, the counter will count or load: |
| 1080 | // if SECLATE is 1, the counter will count or load: |
| 1080 | 1081 | if ((m_dsk.shiftin & (1 << 16)) && !WFFO) { |
| 1081 | 1082 | /* |
| 1082 | 1083 | * If HIORDBIT is 1 at the falling edge of BITCLK, it sets the |
| r26172 | r26173 | |
| 1101 | 1102 | */ |
| 1102 | 1103 | m_dsk.bitcount = (m_dsk.bitcount + 1) % 16; |
| 1103 | 1104 | m_dsk.carry = m_dsk.bitcount == 15; |
| 1104 | | LOG((LOG_DISK,7," WFFO:1 count bitcount:%2d\n", m_dsk.bitcount)); |
| 1105 | LOG((LOG_DISK,6," WFFO:1 count bitcount:%2d\n", m_dsk.bitcount)); |
| 1105 | 1106 | } else { |
| 1106 | 1107 | /* |
| 1107 | 1108 | * If BUS[4] (WFFO) was 0, both J and K' will be 0, and Q |
| r26172 | r26173 | |
| 1109 | 1110 | */ |
| 1110 | 1111 | m_dsk.bitcount = 15; |
| 1111 | 1112 | m_dsk.carry = 1; |
| 1112 | | LOG((LOG_DISK,7," WFFO:0 load bitcount:%2d\n", m_dsk.bitcount)); |
| 1113 | LOG((LOG_DISK,6," WFFO:0 load bitcount:%2d\n", m_dsk.bitcount)); |
| 1113 | 1114 | } |
| 1114 | 1115 | } else if (!m_dsk.bitclk && bitclk) { |
| 1115 | | m_dsk.shiftin = (m_dsk.shiftin << 1) | datin; // clock the shift register on the rising edge of bitclk |
| 1116 | // rising edge of bitclk |
| 1117 | m_dsk.shiftin = (m_dsk.shiftin << 1) | datin; // clock the input shift register |
| 1116 | 1118 | m_dsk.shiftout = m_dsk.shiftout << 1; // and the output shift register too |
| 1117 | 1119 | } |
| 1118 | 1120 | |
| r26172 | r26173 | |
| 1413 | 1415 | if (m_dsk.ff_22b & JKFF_Q) { |
| 1414 | 1416 | if (0 == (m_task_wakeup & (1 << task_ksec))) { |
| 1415 | 1417 | LOG((LOG_DISK,6," STSKENA:1; WAKEST':0 wake KSEC\n")); |
| 1416 | | m_task_wakeup |= 1 << task_kwd; |
| 1418 | m_task_wakeup |= 1 << task_ksec; |
| 1417 | 1419 | } |
| 1418 | | } else { |
| 1420 | } |
| 1421 | if (m_dsk.ff_22b & JKFF_Q0) { |
| 1419 | 1422 | if (0 != (m_task_wakeup & (1 << task_ksec))) { |
| 1420 | 1423 | LOG((LOG_DISK,6," STSKENA:0; WAKEST':1\n")); |
| 1421 | | m_task_wakeup &= ~(1 << task_kwd); |
| 1424 | m_task_wakeup &= ~(1 << task_ksec); |
| 1422 | 1425 | } |
| 1423 | 1426 | } |
| 1424 | 1427 | |
| r26172 | r26173 | |
| 1459 | 1462 | |
| 1460 | 1463 | // check if write and erase gate, or read gate are changed |
| 1461 | 1464 | if ((m_task_wakeup & (1 << task_ksec)) || GET_KCOM_XFEROFF(m_dsk.kcom) || m_dsk.kfer) { |
| 1465 | #if ALTO2_DEBUG |
| 1466 | if (0 == m_dsk.egate || 0 == m_dsk.wrgate || 0 == m_dsk.rdgate) { |
| 1467 | // log the reason why gates are deasserted |
| 1468 | LOG((LOG_DISK,6," deassert gates because of")); |
| 1469 | if (m_task_wakeup & (1 << task_ksec)) { |
| 1470 | LOG((LOG_DISK,6," wake KSEC")); |
| 1471 | } |
| 1472 | if (GET_KCOM_XFEROFF(m_dsk.kcom)) { |
| 1473 | LOG((LOG_DISK,6," XFEROFF")); |
| 1474 | } |
| 1475 | if (m_dsk.kfer) { |
| 1476 | LOG((LOG_DISK,6," KFER")); |
| 1477 | } |
| 1478 | } |
| 1479 | #endif |
| 1462 | 1480 | // sector task is active OR xferoff is set OR fatal error |
| 1463 | 1481 | dhd->set_egate(m_dsk.egate = 1); |
| 1464 | 1482 | dhd->set_wrgate(m_dsk.wrgate = 1); |
| 1465 | 1483 | dhd->set_rdgate(m_dsk.rdgate = 1); |
| 1466 | | } else { |
| 1467 | | // assert either erase and read or write gates depending on current record R/W |
| 1468 | | if (m_dsk.krwc & RWC_WRITE) { |
| 1469 | | // assert erase and write gates only if OKTORUN is high |
| 1470 | | if (m_dsk.ok_to_run) { |
| 1471 | | dhd->set_egate(m_dsk.egate = 0); |
| 1472 | | dhd->set_wrgate(m_dsk.wrgate = 0); |
| 1473 | | } |
| 1484 | } else if (m_dsk.ok_to_run) { |
| 1485 | if (m_dsk.krwc & RWC_WRITE) { |
| 1486 | // assert erase and write gates |
| 1487 | dhd->set_egate(m_dsk.egate = 0); |
| 1488 | dhd->set_wrgate(m_dsk.wrgate = 0); |
| 1474 | 1489 | } else { |
| 1475 | | // assert read gate only if OKTORUN is high |
| 1476 | | if (m_dsk.ok_to_run) { |
| 1477 | | dhd->set_rdgate(m_dsk.rdgate = 0); |
| 1478 | | } |
| 1490 | // assert read gate |
| 1491 | dhd->set_rdgate(m_dsk.rdgate = 0); |
| 1479 | 1492 | } |
| 1480 | 1493 | } |
| 1481 | 1494 | |
| r26172 | r26173 | |
| 1669 | 1682 | r = m_dsk.kstat; |
| 1670 | 1683 | |
| 1671 | 1684 | LOG((LOG_DISK,1," ←KSTAT; BUS &= %#o\n", r)); |
| 1672 | | LOG((LOG_DISK,2," sector : %#o\n", GET_KSTAT_SECTOR(m_dsk.kstat))); |
| 1673 | | LOG((LOG_DISK,2," done : %#o\n", GET_KSTAT_DONE(m_dsk.kstat))); |
| 1674 | | LOG((LOG_DISK,2," seekfail : %d\n", GET_KSTAT_SEEKFAIL(m_dsk.kstat))); |
| 1675 | | LOG((LOG_DISK,2," seek : %d\n", GET_KSTAT_SEEK(m_dsk.kstat))); |
| 1676 | | LOG((LOG_DISK,2," notrdy : %d\n", GET_KSTAT_NOTRDY(m_dsk.kstat))); |
| 1677 | | LOG((LOG_DISK,2," datalate : %d\n", GET_KSTAT_DATALATE(m_dsk.kstat))); |
| 1678 | | LOG((LOG_DISK,2," idle : %d\n", GET_KSTAT_IDLE(m_dsk.kstat))); |
| 1679 | | LOG((LOG_DISK,2," cksum : %d\n", GET_KSTAT_CKSUM(m_dsk.kstat))); |
| 1680 | | LOG((LOG_DISK,2," completion : %#o\n", GET_KSTAT_COMPLETION(m_dsk.kstat))); |
| 1685 | LOG((LOG_DISK,2," SECTOR : %#o\n", GET_KSTAT_SECTOR(m_dsk.kstat))); |
| 1686 | LOG((LOG_DISK,2," DONE : %#o\n", GET_KSTAT_DONE(m_dsk.kstat))); |
| 1687 | LOG((LOG_DISK,2," SEEKFAIL : %d\n", GET_KSTAT_SEEKFAIL(m_dsk.kstat))); |
| 1688 | LOG((LOG_DISK,2," SEEK : %d\n", GET_KSTAT_SEEK(m_dsk.kstat))); |
| 1689 | LOG((LOG_DISK,2," NOTRDY : %d\n", GET_KSTAT_NOTRDY(m_dsk.kstat))); |
| 1690 | LOG((LOG_DISK,2," DATALATE : %d\n", GET_KSTAT_DATALATE(m_dsk.kstat))); |
| 1691 | LOG((LOG_DISK,2," IDLE : %d\n", GET_KSTAT_IDLE(m_dsk.kstat))); |
| 1692 | LOG((LOG_DISK,2," CKSUM : %d\n", GET_KSTAT_CKSUM(m_dsk.kstat))); |
| 1693 | LOG((LOG_DISK,2," COMPLETION : %#o\n", GET_KSTAT_COMPLETION(m_dsk.kstat))); |
| 1681 | 1694 | |
| 1682 | 1695 | m_bus &= r; |
| 1683 | 1696 | } |
| r26172 | r26173 | |
| 1734 | 1747 | { |
| 1735 | 1748 | int i; |
| 1736 | 1749 | LOG((LOG_DISK,1," KSTAT←; BUS[12-15] %#o\n", m_bus)); |
| 1737 | | LOG((LOG_DISK,2," idle : %#o\n", GET_KSTAT_IDLE(m_bus))); |
| 1738 | | LOG((LOG_DISK,2," cksum : %#o\n", GET_KSTAT_CKSUM(m_bus))); |
| 1739 | | LOG((LOG_DISK,2," completion : %#o\n", GET_KSTAT_COMPLETION(m_bus))); |
| 1750 | LOG((LOG_DISK,2," IDLE : %d\n", GET_KSTAT_IDLE(m_bus))); |
| 1751 | LOG((LOG_DISK,2," CKSUM : %d\n", GET_KSTAT_CKSUM(m_bus))); |
| 1752 | LOG((LOG_DISK,2," COMPLETION : %#o\n", GET_KSTAT_COMPLETION(m_bus))); |
| 1740 | 1753 | |
| 1741 | 1754 | /* KSTAT[12] is just taken from BUS[12] */ |
| 1742 | 1755 | PUT_KSTAT_IDLE(m_dsk.kstat, GET_KSTAT_IDLE(m_bus)); |
| r26172 | r26173 | |
| 1983 | 1996 | */ |
| 1984 | 1997 | void alto2_cpu_device::f1_load_kcom_1() |
| 1985 | 1998 | { |
| 1986 | | if (m_dsk.kcom != m_bus) { |
| 1987 | | m_dsk.kcom = m_bus; |
| 1988 | | LOG((LOG_DISK,2," KCOM←; BUS %06o\n", m_dsk.kcom)); |
| 1989 | | LOG((LOG_DISK,2," xferoff : %#o\n", GET_KCOM_XFEROFF(m_dsk.kcom))); |
| 1990 | | LOG((LOG_DISK,2," wdinhib : %#o\n", GET_KCOM_WDINHIB(m_dsk.kcom))); |
| 1991 | | LOG((LOG_DISK,2," bclksrc : %#o\n", GET_KCOM_BCLKSRC(m_dsk.kcom))); |
| 1992 | | LOG((LOG_DISK,2," wffo : %#o\n", GET_KCOM_WFFO(m_dsk.kcom))); |
| 1993 | | LOG((LOG_DISK,2," sendadr : %#o\n", GET_KCOM_SENDADR(m_dsk.kcom))); |
| 1994 | | |
| 1995 | | // TODO: show disk indicator in the GUI? |
| 1996 | | } |
| 1999 | m_dsk.kcom = m_bus; |
| 2000 | LOG((LOG_DISK,2," KCOM←; BUS %06o\n", m_dsk.kcom)); |
| 2001 | LOG((LOG_DISK,2," XFEROFF : %d\n", GET_KCOM_XFEROFF(m_dsk.kcom))); |
| 2002 | LOG((LOG_DISK,2," WDINHIB : %d\n", GET_KCOM_WDINHIB(m_dsk.kcom))); |
| 2003 | LOG((LOG_DISK,2," BCLKSRC : %d\n", GET_KCOM_BCLKSRC(m_dsk.kcom))); |
| 2004 | LOG((LOG_DISK,2," WFFO : %d\n", GET_KCOM_WFFO(m_dsk.kcom))); |
| 2005 | LOG((LOG_DISK,2," SENDADR : %d\n", GET_KCOM_SENDADR(m_dsk.kcom))); |
| 2006 | // TODO: show disk indicator in the GUI? |
| 1997 | 2007 | } |
| 1998 | 2008 | |
| 1999 | 2009 | /** |
| r26172 | r26173 | |
| 2031 | 2041 | m_dsk.krwc = GET_KADR_HEADER(m_dsk.kadr); |
| 2032 | 2042 | |
| 2033 | 2043 | LOG((LOG_DISK,1," KADR←; BUS[8-14] #%o\n", m_dsk.kadr)); |
| 2034 | | LOG((LOG_DISK,2," seal : %#o\n", GET_KADR_SEAL(m_dsk.kadr))); |
| 2035 | | LOG((LOG_DISK,2," header : %s (%#o)\n", rwc_name[GET_KADR_HEADER(m_dsk.kadr)], GET_KADR_HEADER(m_dsk.kadr))); |
| 2036 | | LOG((LOG_DISK,2," label : %s (%#o)\n", rwc_name[GET_KADR_LABEL(m_dsk.kadr)], GET_KADR_LABEL(m_dsk.kadr))); |
| 2037 | | LOG((LOG_DISK,2," data : %s (%#o)\n", rwc_name[GET_KADR_DATA(m_dsk.kadr)], GET_KADR_DATA(m_dsk.kadr))); |
| 2038 | | LOG((LOG_DISK,2," noxfer : %#o\n", GET_KADR_NOXFER(m_dsk.kadr))); |
| 2039 | | LOG((LOG_DISK,2," unused : %#o (drive?)\n", GET_KADR_UNUSED(m_dsk.kadr))); |
| 2044 | LOG((LOG_DISK,2," SEAL : %d\n", GET_KADR_SEAL(m_dsk.kadr))); |
| 2045 | LOG((LOG_DISK,2," HEADER : %s (%#o)\n", rwc_name[GET_KADR_HEADER(m_dsk.kadr)], GET_KADR_HEADER(m_dsk.kadr))); |
| 2046 | LOG((LOG_DISK,2," LABEL : %s (%#o)\n", rwc_name[GET_KADR_LABEL(m_dsk.kadr)], GET_KADR_LABEL(m_dsk.kadr))); |
| 2047 | LOG((LOG_DISK,2," DATA : %s (%#o)\n", rwc_name[GET_KADR_DATA(m_dsk.kadr)], GET_KADR_DATA(m_dsk.kadr))); |
| 2048 | LOG((LOG_DISK,2," NOXFER : %d\n", GET_KADR_NOXFER(m_dsk.kadr))); |
| 2049 | LOG((LOG_DISK,2," unused : %d (drive?)\n", GET_KADR_UNUSED(m_dsk.kadr))); |
| 2040 | 2050 | // TODO: show disk indicator in the GUI? |
| 2041 | 2051 | } |
| 2042 | 2052 | |