Skip to content
Snippets Groups Projects
  1. Dec 30, 2022
  2. Dec 29, 2022
    • Rob Swindell's avatar
      Remove startup->node_spysem, nobody's using it and it had a bad bug · 4192b404
      Rob Swindell authored
      This came about through the realization that the global 'sbbs' in main.cpp
      can (and was/is) hiding some copy/pasta bugs.
      4192b404
    • Deucе's avatar
      Output snappiness improvements. · 2135b877
      Deucе authored
      When the system checks for an incoming byte, if there's any pending
      output, send it immediately, bypassing the outbuf highwater mark.
      
      This allows the final non-full packet to be sent without waiting
      for the OutbufDrainTimeout (default 10ms), and makes a big difference
      when doing a large number of ANSI queries (send an ANSI code, wait
      for a response).  There's a small but noticable placebo effect as
      well that makes everything feel smoother.
      
      This commit also cleans up the output thread where it pulls from
      the ring buffer into the linear buffer to take advantage of the new
      event-based ring buffers.  Much easier to read now.
      
      Speaking of easier to read, this also includes some whitespace
      fixups.
      2135b877
    • Rob Swindell's avatar
    • Rob Swindell's avatar
    • Deucе's avatar
      Add console.flush() method. · fc9c51bf
      Deucе authored
      Seems to work a treat.
      fc9c51bf
    • Deucе's avatar
      Fix typo · 3d1e88e8
      Deucе authored
      3d1e88e8
    • Deucе's avatar
      4bedae72
    • Deucе's avatar
      Fix name of data event · 562a87e3
      Deucе authored
      562a87e3
    • Deucе's avatar
    • Deucе's avatar
      Remove RINGBUF_SEM for RINGBUG_EVENT · d0760706
      Deucе authored
      We've never really cared how many times the ring buffer has become
      empty, how many times data was added to it, or how many times we've
      been over the highwater mark.  These have effectively always been
      event signalling, with extra hackiness to clear "extra" semaphore
      posts.
      
      This commit removes RINGBUF_SEM entirely, and uses events for
      everything.  There's an empty event (set when the ring buffer is empty),
      a data event (set when the ring buffer is not empty), and a highwater
      event (set when the ring buffer has at least highwater mark bytes).
      
      A RingBufWrite() will set data and highwater events if applicable,
      and clear the empty event.
      
      A RingBufRead() will set empty event and clear data and highwater
      events if applicable.
      
      RingBufReInit() will now set the empty event, and clear the data
      and highwater events.
      
      These are the only actions the RingBuf API will perform on the
      events, it does *not* clear the highwater event on a RingBufWrite()
      if the buffer does not have enough bytes in it for example, this
      will *only* be done by RingBufRead() or RingBufReInit().  This
      allows consumers to force specific behaviours (such as forcing
      the highwater event on shutdown to prevent waiting for it).  Since
      the current code was able to deal with the semaphores having
      arbitrarily high counts, the existing code shouldn't have any
      issue with this.
      
      For things that want to shut something down, we're now setting both
      the data and highwater events to ensure it doesn't wait for a
      timeout (even for things that don't use highwater like the inbuf).
      The RingBuffer API should grow a thing to do this (RingBufferFlush
      perhaps?) rather than the consumers poking into the innards
      arbitrarily.
      
      Tested on the webserver and RLogin server and seems to be working
      great.  sexyz builds.  It seems there's some Windows thing that
      uses the ringbuffer sem for something, but I couldn't figure out
      what... updated the build file, but no clue if that's broken or not
      now... I'm sure DigitalMan will be happy to fix it if CI doesn't
      catch it. ;)
      
      This should allow the console object to grow a "flush" method that
      will set the highwater and data events.
      d0760706
    • Deucе's avatar
      Initialize mbuf too. · fd90eec6
      Deucе authored
      fd90eec6
    • Deucе's avatar
    • Deucе's avatar
      Since we have the code to generate the correct gamma transfer, let's · 54c9617e
      Deucе authored
      not scale it in one colour space before translating it to a different
      one.
      
      Also, since almost all PPMs will use a maxval of 255, compile that
      in as the default so we don't need to generate it.
      54c9617e
    • Deucе's avatar
      Use the new loaded PPM functionality. · fa5a150a
      Deucе authored
      Update the script to verify pixel operations are supported.
      fa5a150a
  3. Dec 28, 2022
    • Deucе's avatar
      aeca9bc0
    • Deucе's avatar
      Add support for PPM graphics to SyncTERM · 6f97dfce
      Deucе authored
      You can copy whole, or portions of a PPM file from the cache directory
      to the screen, optionally applying a mask.  The mask can be specified
      as a base64-encoded bitmap or as a PBM file in the cache directory.
      
      You can also copy portions of the screen into an internal buffer, and
      draw from that internal buffer.  There's plans to support loading an
      image file from the cache directory into the buffer as well.
      
      Portions of the buffer can be copied to the screen, optionally
      applying a mask as with drawing PPMs.
      
      There's also plans to support copying a PBM file into a mask buffer.
      
      I've added the syncterm-bounce.js script which simply bounces the
      SyncTERM icon around the screen like the classic screensaver we all
      hate.  I initially wanted to replace the spinning cursor with it,
      but there doesn't seem to be a way to replace that with a script. :(
      
      To use the script, just add the text:
      @EXEC:syncterm-bounce.js@ to the end of your logon.js script.
      
      Log in to nix.synchro.net with the latest nightly build or build from
      git to see the script in action.
      6f97dfce
  4. Dec 27, 2022
Loading