From ef0a714a2982588c5c1cecccad4fac1b4163e0e3 Mon Sep 17 00:00:00 2001 From: mmfoerster Date: Mon, 30 Oct 2017 00:49:17 -0400 Subject: [PATCH] busToString() and allTCStates() changes agreed to online: TState and Phi. The parameter to allTCStates() has had a name change from useNBSP to useHTML. busToString() has had the TStateF pseudobus removed, and a pseudobus called Phi added. Phi pretty-prints the state of the cp1 node (the internal phase 1 node) as Φ1 when high and as Φ2 when low. This is nicer than plain 0 or 1. Logging the TState pseudobus followed by the Phi pseudobus creates the effect intended by the removed TStateF pseudobus, keeping our collection of operations orthogonal (no proliferation of trivially different operations that duplicate each other diagonally). --- expert-allinone.js | 17 +++++++---------- macros.js | 12 +++++++----- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/expert-allinone.js b/expert-allinone.js index 139dda1..3aa625b 100644 --- a/expert-allinone.js +++ b/expert-allinone.js @@ -14026,14 +14026,14 @@ function listActiveTCStates() { // Show all time code node states (active and inactive) in fixed format, // with T1/T6 indication in square brackets. ".." for a node indicates // inactive state, "T"* for a node indicates active state. -function allTCStates( useNBSP ) +function allTCStates( useHTML ) { var s = ""; var _spc; - useNBSP = (typeof useNBSP === 'undefined') ? false : useNBSP; + useHTML = (typeof useHTML === 'undefined') ? false : useHTML; // Use Non-Breaking Space for presentation in an HTML (browser) // context, else use ASCII space for logging context - _spc = useNBSP ? ' ' : ' '; + _spc = useHTML ? ' ' : ' '; var allHigh, thisHigh; thisHigh = isNodeHigh( nodenames[ 'clock1' ] ); allHigh = thisHigh; @@ -14109,13 +14109,10 @@ function busToString(busname){ return listActiveTCStates(); if(busname=='TState') return allTCStates( true ); - if(busname=='TStateF') - // TState with phase indication tacked on: F1 or F2 - // Prefer latin 'F' because that's what Greek phi really is: - // a single glyph for the "eff" speech sound - // Capitalized because the 'T's in the time state are - // capitalized - return allTCStates( true ) + ' ' + 'F' + + if(busname=='Phi') + // Pretty-printed phase indication based on the state of cp1, + // the internal Phase 1 node + return 'Φ' + (isNodeHigh( nodenames[ 'cp1' ] ) ? '1' : '2'); if(busname=='Execute') return dis6502toHTML(readBits('ir',8)); diff --git a/macros.js b/macros.js index a7bfd16..0af377c 100644 --- a/macros.js +++ b/macros.js @@ -311,12 +311,10 @@ function allTCStates( useHTML ) { var s = ""; var _spc; - var _phi; - var useHTML = (typeof useHTML === 'undefined') ? false : useHTML; + useHTML = (typeof useHTML === 'undefined') ? false : useHTML; // Use Non-Breaking Space for presentation in an HTML (browser) // context, else use ASCII space for logging context _spc = useHTML ? ' ' : ' '; - _phi = useHTML ? 'Φ' : 'F'; var allHigh, thisHigh; thisHigh = isNodeHigh( nodenames[ 'clock1' ] ); allHigh = thisHigh; @@ -360,8 +358,7 @@ function allTCStates( useHTML ) } else { s += ".."; } - // indicate the clock phase, Phi1 or Phi2 - s += "]" + _spc + _phi + (isNodeHigh( nodenames[ 'cp1' ] ) ? '1' : '2'); + s += "]"; return s; } @@ -393,6 +390,11 @@ function busToString(busname){ return listActiveTCStates(); if(busname=='TState') return allTCStates( true ); + if(busname=='Phi') + // Pretty-printed phase indication based on the state of cp1, + // the internal Phase 1 node + return 'Φ' + + (isNodeHigh( nodenames[ 'cp1' ] ) ? '1' : '2'); if(busname=='Execute') return disassemblytoHTML(readBits('ir',8)); if(busname=='Fetch')