- Text cursor was too wide by one pixel
authorMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 11 Apr 2022 22:53:50 +0000 (22:53 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 11 Apr 2022 22:53:50 +0000 (22:53 +0000)
- Update notes/comments

MATT/TODO.txt
hacks/analogterm-main.c
hacks/analogterm.c

index ab4d446..9fdc5c3 100644 (file)
@@ -152,6 +152,10 @@ TODO
   Input handling could probably be improved and considered
   prioritary.  When increasing the refresh rate like with 0 delay
   using more CPU, it's more responsive.  This should be configurable.
+  Oddly, when using 0, it can result in a type of progressing chaos and
+  even X11 video garbage.  Other exampes where application output interferes
+  with input are aafire/cacafire and sometimes even cmatrix (on slow systems
+  like RPI2).  The "chaos" seems mitigated when disabling multiple threads.
 
 
 CONTROLS
index 71372b4..eefbc06 100644 (file)
@@ -209,7 +209,6 @@ static void
 at_vt100_printc (analogterm_sim_t *sim, struct terminal_controller_data *state,
                  unsigned char c)
 {
-  analogterm_state_t *st=sim->st;
   /* XXX Why not simply use constants that allow more efficient literal math?
    * Presumably for an eventual dynamic window size or other terminal modes
    * like 132 columns...
@@ -220,7 +219,21 @@ at_vt100_printc (analogterm_sim_t *sim, struct terminal_controller_data *state,
   int i, many;
   int start, end;
 
+  analogterm_state_t *st=sim->st;
+
   /* Mostly duplicated in phosphor.c */
+  /*
+   * XXX Now mostly rewritten after starting from apple2-main.c
+   * If readapted to xscreensaver in general, it would be a good idea to
+   * isolate terminal emulation as a library in utils/.
+   * It could then be used by phosphor, a2 and analogterm, perhaps others.
+   * The target emulation is now xterm.  See utils/textclient.c
+   * textclient_putc() for other changes related to PC keyboard input,
+   * and textclient_pipe().  And see analogtv.c changes for less blurry text
+   * and color filtering.
+   *
+   * MMondor 2022
+   */
 
   switch (state->escstate)
     {
index fca88e1..d84419f 100644 (file)
@@ -131,7 +131,7 @@ at_drawcursor(analogterm_sim_t *sim)
        for (y = 0; y < 8; y++) {
                pp = &sim->inp->signal[(ANALOGTV_TOP + 3) + (8 * st->cursy) + y]
                   [(ANALOGTV_PIC_START + 100) + (7 * st->cursx)];
-               for (x = 0; x < 8; x++)
+               for (x = 0; x < 7; x++)
                        *pp++ ^= 64/*TMODE_NORMAL_LEVEL*/;
        }
 }