       uiState: uiState
 
     @defaultInput = Immutable.fromJS
-      controllers:
-        player1: {}
-        player2: {}
-        debug1: {}
-        admin: {}
+      # controllers:
+      #   player1: {}
+      #   player2: {}
+      #   debug1: {}
+      #   admin: {}
       dt: 0
       static:
         worldMap: worldMap
 
     ########################################################################################
     # SIGNALLY STUFF 
-
-    adminControlEvents = @adminControllerMailbox.signal
-      .dropRepeats(Immutable.is)
-      .map((event) -> event.set('tag','admin'))
+    #
+    # Per time slice, bundle ticks and controller events into an "input" structure
+    inputBundler = (din) ->
+      (events) ->
+        input = din
+        for e in events
+          switch e.get('type')
+            when 'Tick'
+              input = input.set('dt',e.get('dt'))
+            when 'ControllerEvent'
+              isDown = ('down' == e.get('action'))
+              input = input.setIn(['controllers' ,e.get('tag'), e.get('control')], isDown)
+        input
+
+    dtEvents = @dtMailbox.signal
+      .map((dt) -> Map(type:'Tick',dt:dt))
 
     playerControlEvents = @playerControllerMailbox.signal
       .merge(@playerControllerGpMailbox.signal)
       .dropRepeats(Immutable.is)
       .map((event) -> event.set('tag','player1'))
 
-    dtEvents = @dtMailbox.signal
-      .map((dt) -> Immutable.Map(type:'Tick',dt:dt))
-
-    # Per time slice, bundle ticks and controller events into an "input" structure
-    bundleInput = (events) =>
-      input = @defaultInput
-      for e in events
-        switch e.get('type')
-          when 'Tick'
-            input = input.set('dt',e.get('dt'))
-          when 'ControllerEvent'
-            isDown = ('down' == e.get('action'))
-            input = input.setIn(['controllers' ,e.get('tag'), e.get('control')], isDown)
-      input
-
-    gameInput = playerControlEvents
-      .merge(dtEvents)
+    adminControlEvents = @adminControllerMailbox.signal
+      .dropRepeats(Immutable.is)
+      .map((event) -> event.set('tag','admin'))
+
+    input = dtEvents
+      .merge(playerControlEvents)
+      .merge(adminControlEvents)
       .sliceOn(dtEvents)
-      .map(bundleInput)
+      .map(inputBundler(@defaultInput))
+
+    updateAdmin = (input,s) ->
+      s1 = s
+        .set('input',input)
+        .set('actualDt',input.get('dt'))
+
+      ctrl = input.getIn(['controllers','admin'])
+      if ctrl? and ctrl.get('toggle_pause')
+          s1 = s1.set('paused', !s1.get('paused'))
+
+      if ctrl? and ctrl.get('step_forward')
+        s1 = s1.set('stepDt',16.66)
+      else
+        s1 = s1.delete('stepDt')
+
+      return s1
+
+    initialAdminState = Map()
+    adminState = input
+      .foldp(updateAdmin, initialAdminState)
 
     # Game state value over time:
     updateGame = (input,s) ->

    ViewSystems.sound_sync_system
    ViewSystems.room_sync_system
  ]
  Immutable.List(systemDefs).map (s) -> s.createInstance()


createControllerEventMux = ->

Immutable = require 'immutable'
{Map,List}=Immutable

Transforms = require './transforms'

