csim.xul  |  csim.js  |  options.xul  |  options.js  |  about.xul  |  consts.js  |  screen.js  |  platform.js  |  csim.dtd  |  csim.css  |  b2a.c

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://csim/skin/csim.css" type="text/css"?>

<!DOCTYPE window [
<!ENTITY % csimDTD SYSTEM "chrome://csim/locale/csim.dtd">
%csimDTD;
]>

<window
   title      = "&window.title;"
   xmlns      = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   width      = "760"
   height     = "790"
   orient     = "vertical"
   persist    = "screenX screenY sizemode">

  <commandset id="maincommands">
    <command id="menu-file-new:command"          oncommand="newFile();"/>
    <command id="menu-file-open:command"         oncommand="openFile();"/>
    <command id="menu-file-close:command"        oncommand="closeFile();" disabled="true"/>
    <command id="menu-file-quit:command"         oncommand="window.close();"/>

    <command id="menu-options-advanced:command"  oncommand="openOptionsDlg();"/>
    <command id="menu-options-inc_delay:command" oncommand="resetIntDelay('inc');"/>
    <command id="menu-options-dec_delay:command" oncommand="resetIntDelay('dec');"/>
  
    <command id="menu-help-doc:command" oncommand="openDoc();"/>
    <command id="menu-help-about:command" oncommand="openAbout();"/>
    <command id="menu-help-doc_tab:command" oncommand="addDocTab();" disabled="true"/>
  </commandset>

  <keyset id="mainkeys">
    <key
       id        =  "menu-file-new:key"
       key       = "&menu-file-new:key;"
       observes  =  "menu-file-new:command"
       modifiers =  "accel" />
    <key
       id        =  "menu-file-open:key"
       key       = "&menu-file-open:key;"
       observes  =  "menu-file-open:command"
       modifiers =  "accel" />
    <key
       id        =  "menu-file-close:key"
       key       = "&menu-file-close:key;"
       observes  =  "menu-file-close:command"
       modifiers =  "accel" />
    <key
       id        =  "menu-file-quit:key"
       key       = "&menu-file-quit:key;"
       observes  =  "menu-file-quit:command"
       modifiers =  "accel" />
       
    <key
       id        =  "menu-options-advanced:key"
       key       = "&menu-options-advanced:key;"
       observes  =  "menu-options-advanced:command"
       modifiers =  "accel" />
    <key
       id        =  "menu-options-inc_delay:key"
       key       = "&menu-options-inc_delay:key;"
       observes  =  "menu-options-inc_delay:command"
       modifiers =  "accel" />
    <key
       id        =  "menu-options-dec_delay:key"
       key       = "&menu-options-dec_delay:key;"
       observes  =  "menu-options-dec_delay:command"
       modifiers =  "accel" />
    
    <key
       id        =  "menu-help-doc:key"
       key       = "&menu-help-doc:key;"
       observes  =  "menu-help-doc:command"
       modifiers =  "accel" />
    <key
       id        =  "menu-help-about:key"
       key       = "&menu-help-about:key;"
       observes  =  "menu-help-about:command"
       modifiers =  "accel" />
    <!-- key
       id        =  "menu-help-doc_tab:key"
       key       = "&menu-help-doc_tab:key;"
       observes  =  "menu-help-doc_tab:command"
       modifiers =  "accel" / -->
  </keyset>

  <toolbox id="main-toolbox">
    <menubar id="menu">
      <menu id="menu-file" label="&menu-file:label;" accesskey="&menu-file:accesskey;">
        <menupopup id="menu-file-popup">
          <menuitem
             id        =  "menu-file-new"
             key       =  "menu-file-new:key"
             label     = "&menu-file-new:label;"
             command   =  "menu-file-new:command"
             accesskey = "&menu-file-new:accesskey;"/>
          <menuitem
             id        =  "menu-file-open"
             key       =  "menu-file-open:key"
             label     = "&menu-file-open:label;"
             command   =  "menu-file-open:command"
             accesskey = "&menu-file-open:accesskey;"/>
          <menuitem
             id        =  "menu-file-close"
             disabled  =  "true"
             key       =  "menu-file-close:key"
             label     = "&menu-file-close:label;"
             command   =  "menu-file-close:command"
             accesskey = "&menu-file-close:accesskey;"/>
          <menuseparator/>
          <menuitem
             id        =  "menu-file-quit"
             key       =  "menu-file-quit:key"
             label     = "&menu-file-quit:label;"
             command   =  "menu-file-quit:command"
             accesskey = "&menu-file-quit:accesskey;"/>
        </menupopup>
      </menu>
      
      <menu id="menu-options" label="&menu-options:label;" accesskey="&menu-options:accesskey;">
        <menupopup id="menu-options-popup">
          <menuitem
             id        =  "menu-options-advanced"
             key       =  "menu-options-advanced:key"
             label     = "&menu-options-advanced:label;"
             command   =  "menu-options-advanced:command"
             accesskey = "&menu-options-advanced:accesskey;"/>
          <menuseparator/>
          <menuitem
             id        =  "menu-options-inc_delay"
             key       =  "menu-options-inc_delay:key"
             label     = "&menu-options-inc_delay:label;"
             command   =  "menu-options-inc_delay:command"
             accesskey = "&menu-options-inc_delay:accesskey;"/>
          <menuitem
             id        =  "menu-options-dec_delay"
             key       =  "menu-options-dec_delay:key"
             label     = "&menu-options-dec_delay:label;"
             command   =  "menu-options-dec_delay:command"
             accesskey = "&menu-options-dec_delay:accesskey;"/>
        </menupopup>
      </menu>
    
      <menu id="menu-help" label="&menu-help:label;" accesskey="&menu-help:accesskey;">
        <menupopup id="menu-help-popup">
          <menuitem
             id        =  "menu-help-doc"
             key       =  "menu-help-doc:key"
             label     = "&menu-help-doc:label;"
             command   =  "menu-help-doc:command"
             accesskey = "&menu-help-doc:accesskey;"/>
          <menuitem
             id        =  "menu-help-about"
             key       =  "menu-help-about:key"
             label     = "&menu-help-about:label;"
             command   =  "menu-help-about:command"
             accesskey = "&menu-help-about:accesskey;"/>
          <menuseparator/>
          <menuitem
             id        =  "menu-help-doc_tab"
             key       =  "menu-help-doc_tab:key"
             label     = "&menu-help-doc_tab:label;"
             command   =  "menu-help-doc_tab:command"
             accesskey = "&menu-help-doc_tab:accesskey;"
             type      =  "checkbox"/>
        </menupopup>
      </menu>
    </menubar>

    <toolbar id="controls">
      <toolbarbutton id="btn-start" label="Start"    oncommand="startRun();" disabled="true"/>
      <toolbarbutton id="btn-pause" label="Pause"    oncommand="pauseRun();" disabled="true"/>
      <toolbarbutton id="btn-conti" label="Continue" oncommand="contiRun();" disabled="true"/>
      <toolbarseparator />
      <toolbarbutton id="btn-reset" label="Reset"    oncommand="resetRun();" disabled="true"/>
    </toolbar>
  </toolbox>

  <vbox id="main-vbox" flex="1" pack="end">
    <tabbox id="main-tab" flex="1" hidden="true">
      <tabs>
        <tab label="Runtime"/>
        <tab label="Memory"/>
        <tab label="Virtual Screen"/>
      </tabs>
      <tabpanels flex="1">
        <tabpanel id="runtime" flex="1">
          <hbox flex="1">
            <groupbox flex="8">
              <caption label="Instructions"/>
              <tree id="instr" flex="1" enableColumnDrag="true">
                <treecols>
                  <treecol id="instr-counter" label="Counter" flex="1"/>
                  <splitter class="tree-splitter"/>
                  <treecol id="instr-value" label="Value" flex="2"/>
                  <splitter class="tree-splitter"/>
                  <treecol id="instr-operation" label="Operation" flex="6"/>
                </treecols>
                <treechildren id="instr-treech" class="monolarge"/>
              </tree>
            </groupbox>
            <splitter
               state="open" collapse="after"
               resizebefore="closest" resizeafter="closest">
              <grippy/>
            </splitter>
            <vbox flex="1">
              <groupbox flex="1">
                <caption label="Registers"/>
                <tree flex="1" enableColumnDrag="true">
                  <treecols>
                    <treecol id="regs-name" label="Name" flex="1"/>
                    <splitter class="tree-splitter"/>
                    <treecol id="regs-value" label="Value" flex="3"/>
                  </treecols>
                  <treechildren id="reg-treech" class="monolarge"/>
                </tree>
              </groupbox>
              <groupbox>
                <caption label="Interrupt requests"/>
                <grid>
                  <columns>
                    <column style="min-width: 2em;"/>
                    <column flex="1"/>
                    <column/>
                    <column flex="1"/>
                    <column/>
                    <column flex="1"/>
                    <column style="min-width: 2em;"/>
                    <column flex="1"/>
                    <column/>
                    <column flex="1"/>
                    <column/>
                    <column flex="1"/>
                  </columns>
                  <rows id="irq-rows" class="monolarge"/>
                </grid>
              </groupbox>
              
              <groupbox>
                <caption label="Keyboard"/>
                <textbox flex="1" id="cheap-input" maxlength="128"/>
              </groupbox>
            
            </vbox>  
          </hbox>
        </tabpanel>
    
        <tabpanel id="mem-panel" flex="1">
          <tree flex="1" enableColumnDrag="true">
            <treecols>
              <treecol id="mem-offset" label="Offset" flex="1"/>
                <splitter class="tree-splitter"/>
              <treecol id="mem-value" label="Value" flex="10"/>
            </treecols>
            <treechildren id="mem-treech" class="monolarge"/>
          </tree>
        </tabpanel>
        
        <tabpanel id="vscr-panel" flex="1">
          <vbox flex="1">  
            <hbox>
              <vbox id="vscr" class="monolarge-vscr" style="background-color:black; color:white;"/>
              <spacer flex="1"/>
            </hbox>
            <spacer flex="1"/>
          </vbox>
        </tabpanel>
        
        <tabpanel id="doc-panel" flex="1"/>

      </tabpanels>
    </tabbox>
  
  
    <statusbar id="status-bar" persist="collapsed">
      <statusbarpanel id="status-text" label=""  flex="1" crop="right"/>
    </statusbar>
  
  </vbox>

  <script type="application/x-javascript" src="chrome://jslib/content/jslib.js" />
  <script type="application/x-javascript" src="csim.js"/>

</window>
  
<!--

<!- - treechildren>
  <treeitem>
    <treerow>
      <treecell label="00"/>
      <treecell label="20400001"/>
      <treecell label="SET r01, 1"/>
    </treerow>
  </treeitem>
</treechildren - ->

<!- - states are proc, requ, no - ->

<!- - treechildren id="memchilds">
  <treeitem>
    <treerow>
      <treecell label="0000 0000"/>
      <treecell label="20400001 20400001 20400001 20400001 20400001 20400001 20400001 20400001"/>
    </treerow>
  </treeitem>
</treechildren - ->

<!- - row>
  <label value="00"/>
  <label value="no"/>
  <label value="08"/>
  <label value="no"/>
</row - ->

<!- - listbox flex="1" hidden="true">
  <listhead>
    <listheader label="Offset"/>
    <listheader label="Value"/>
  </listhead>

  <listcols>
    <listcol flex="1"/>
    <listcol flex="10"/>
  </listcols>

  <listitem>
    <listcell label="0000 0008"/>
    <listcell label="20400001 20400001 20400001 20400001 20400001 20400001 20400001 20400001"/>
  </listitem>
</listbox - ->

-->