Previous 199869 Revisions Next

r26174 Friday 15th November, 2013 at 12:14:39 UTC by Jürgen Buchmüller
Remove the WFFO macro. Revert to how Salto handled the erase/write or read gate enabling.
[/branches/alto2/src/emu/cpu/alto2]a2disk.c alto2.c

branches/alto2/src/emu/cpu/alto2/a2disk.c
r26173r26174
10361036 */
10371037#define   INIT   (m_task == task_kwd && m_dsk.wdinit0)
10381038
1039#define   WFFO   (GET_KCOM_WFFO(m_dsk.kcom))
10401039#define   WDALLOW   (!GET_KCOM_WDINHIB(m_dsk.kcom))
10411040#define   WDINIT   ((m_dsk.ff_53b & JKFF_Q) ? 1 : 0)
10421041#define   RDYLAT   ((m_dsk.ff_45a & JKFF_Q) ? 1 : 0)
r26173r26174
10771076      }
10781077   }
10791078   if (0 != m_dsk.seclate && m_dsk.bitclk && !bitclk) {
1080      // if SECLATE is 1, the counter will count or load:
1081      if ((m_dsk.shiftin & (1 << 16)) && !WFFO) {
1079      // if SECLATE is 1, the counter will count or be loaded
1080      if ((m_dsk.shiftin & (1 << 16)) && !GET_KCOM_WFFO(m_dsk.kcom)) {
10821081         /*
10831082          * If HIORDBIT is 1 at the falling edge of BITCLK, it sets the
10841083          * JK-FF 67b, and thus takes away the LOAD' assertion from the
r26173r26174
10941093       * with BUS[4] (WFFO) at the last KCOM← load, or as set by a
10951094       * 1 bit being read in HIORDBIT.
10961095       */
1097      if (WFFO) {
1096      if (GET_KCOM_WFFO(m_dsk.kcom)) {
10981097         /*
10991098          * If BUS[4] (WFFO) was 1, both J and K' of the FF (74109) will
11001099          * be 1 at the rising edge of LDCOM' (at the end of KCOM←)
r26173r26174
11061105      } else {
11071106         /*
11081107          * If BUS[4] (WFFO) was 0, both J and K' will be 0, and Q
1109          * will be 0. LOAD' is asserted: load on clock.
1108          * will be 0. LOAD' is asserted and will load on rising bitclock (now)
11101109          */
11111110         m_dsk.bitcount = 15;
11121111         m_dsk.carry = 1;
r26173r26174
14481447      s1 |= JKFF_C;
14491448   m_dsk.ff_21a = update_jkff(s0, s1);
14501449
1451   /*
1452    * If the KSEC FF 21a Q goes 1, pulse the SECLATE signal for
1453    * some time.
1454    */
1450   // If the KSEC FF 21a Q goes 1, pulse the SECLATE signal for some time.
14551451   if ((m_dsk.ff_21a_old & JKFF_Q0) && (m_dsk.ff_21a & JKFF_Q)) {
14561452      m_dsk.seclate_timer->adjust(attotime::from_nsec(TW_SECLATE), 1);
14571453      if (m_dsk.seclate) {
r26173r26174
14811477      dhd->set_egate(m_dsk.egate = 1);
14821478      dhd->set_wrgate(m_dsk.wrgate = 1);
14831479      dhd->set_rdgate(m_dsk.rdgate = 1);
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);
1480   } else {
1481      if (m_dsk.krwc & RWC_WRITE) {
1482         if (m_dsk.ok_to_run) {
1483#if   ALTO2_DEBUG
1484            if (1 == m_dsk.egate || 1 == m_dsk.wrgate) {
1485               LOG((LOG_DISK,6,"   assert "));
1486               if (m_dsk.egate) {
1487                  LOG((LOG_DISK,6," EGATE"));
1488               }
1489               if (m_dsk.wrgate) {
1490                  LOG((LOG_DISK,6," WRGATE"));
1491               }
1492            }
1493#endif
1494            // assert erase and write gates
1495            dhd->set_egate(m_dsk.egate = 0);
1496            dhd->set_wrgate(m_dsk.wrgate = 0);
1497         }
14891498      } else {
1499#if   ALTO2_DEBUG
1500         if (1 == m_dsk.rdgate) {
1501            LOG((LOG_DISK,6,"   assert RDGATE"));
1502         }
1503#endif
14901504         // assert read gate
14911505         dhd->set_rdgate(m_dsk.rdgate = 0);
14921506      }
r26173r26174
15141528   (void)ptr;
15151529   LOG((LOG_DISK,2,"   OK TO RUN -> %d\n", arg));
15161530   m_dsk.ok_to_run = arg;
1517   m_dsk.ok_to_run_timer->enable(false);
1531   m_dsk.ok_to_run_timer->reset();
15181532
15191533   for (int unit = 0; unit < diablo_hd_device::DIABLO_UNIT_MAX; unit++) {
15201534      diablo_hd_device* dhd = m_drive[unit];
r26173r26174
19851999 * KCOM register has the following interpretation:
19862000 *   (1) XFEROFF = 1 inhibits data transmission to/from the m_dsk.
19872001 *   (2) WDINHIB = 1 prevents the disk word task from awakening.
1988 *    (3) BCLKSRC = 0 takes bit clock from disk input or crystal clock,
1989 *        as appropriate. BCLKSRC = 1 force use of crystal clock.
2002 *    (3) BCLKSRC = 0 takes bit clock from disk input or crystal clock, as appropriate.
2003 *      BCLKSRC = 1 force use of crystal clock.
19902004 *   (4) WFFO = 0 holds the disk bit counter at -1 until a 1 bit is read.
19912005 *       WFFO = 1 allows the bit counter to proceed normally.
1992 *   (5) SENDADR = 1 causes KDATA[4-12] and KDATA[15] to be transmitted
1993 *       to disk unit as track address. SENDADR = 0 inhibits such
1994 *       transmission.
2006 *   (5) SENDADR = 1 causes KDATA[4-12] and KDATA[15] to be signalled to disk unit as track address.
2007 *      SENDADR = 0 inhibits such signalling.
19952008 * </PRE>
19962009 */
19972010void alto2_cpu_device::f1_load_kcom_1()
branches/alto2/src/emu/cpu/alto2/alto2.c
r26173r26174
4242alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* tag, device_t* owner, UINT32 clock) :
4343   cpu_device(mconfig, ALTO2, "Xerox Alto-II", tag, owner, clock, "alto2", __FILE__),
4444#if   ALTO2_DEBUG
45   m_log_types(LOG_CPU|LOG_DISK|LOG_KSEC|LOG_KWD),
46   m_log_level(6),
45   m_log_types(LOG_DISK|LOG_KSEC|LOG_KWD),
46   m_log_level(7),
4747   m_log_newline(true),
4848#endif
4949   m_ucode_config("ucode", ENDIANNESS_BIG, 32, 12, -2 ),

Previous 199869 Revisions Next


© 1997-2024 The MAME Team