• src/conio/bitmap_con.c

    From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Sat Feb 10 16:45:22 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/0e9e499fa00a31db0271fa73
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Resolve some MSVC warnings
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Feb 24 07:07:38 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/92216995054bc941ffc88a68
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Don't imply the callbacks need to be protected by the mutex.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Jan 1 22:24:14 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/8a0384ade1b540fe11df8fd9
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    "Fix" another longstanding Coverity false-positive.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Jan 4 21:51:34 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/b0eb08937ad2687dc152e155
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Handle case when font[0] == NULL

    Shouldn't happen, but if it does, return an error, don't dereference
    Found by scan-build.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 07:02:10 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/3583d299301da4cea3908cb4
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Remove unused set of coff.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 08:46:24 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7a2c74cfd262d3a4dfa900e4
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Use rwlock_t, not pthread_rwlock_t

    Derp.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 09:38:44 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c25141c910a97a69f3a9c29c
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Move video flags out from under vstatlock.

    This is a heavily accessed value that is rarely changed and was
    causing a lot of contention on vstatlock.

    Down to 2.9 seconds.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 09:51:44 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/2fec78bd89a7de604c610918
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Put assert()s around all the locking in bitmap_con.c
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Jan 11 01:36:46 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/878342e3923db77ece4fc324
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Add missing unlock, and silence Coverity warning.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 15:16:44 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c24667c8049d3f63ba96c796
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix error displaying Minesweeper field

    We need to set the "has pixels set" flag in both vmem and in the
    bitmap_drawn array to prevent the update from erasing the pixels.

    This is likely what the duplicated line was originally, then it got
    broken when I switched to the vmem_cell_*() functions.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 14:30:18 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6717b6ffbb7d21663906fd39
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    No need to do the same thing twice.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 20:33:30 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/2172dcc3f7bcf807dd5251fa
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Remove some debugging code.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 12 22:26:10 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7975a018ccb8a3c14236b537
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    We only need to use get_vmem() if we're copying vstat.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Jan 13 15:39:12 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/288a7709121956137b34d838
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Assert/debug wrappers for trylock() are silly.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Jan 18 15:13:58 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6403bb15cbf4dcba8341df05
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix major performance regression in RIP rendering

    A high number of RIP commands use setpixel(), and it was updated
    to scan the whole vmem for changes on each call. Now we just extract
    the part that is relevant and only update the one cell if needed.

    This also adds parameter validation to bitmap_setpixel() which can
    prevent some memory corruption and crashes.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Jan 18 16:13:52 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6f2621a6247f1c14659d38e7
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix scolling in modes that have extra rows

    EGA 80x43 has an extra six pixels at the bottom that are not part
    of the text area. When scrolling the botmap buffer, be sure to not
    update this area.

    Also, fix some screen invalidation bits when setting pixels.

    This should fix ticket 180.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Jan 18 20:27:56 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9986c9a0b71ca6e02d2db551
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Properly handle 91-column EGA mode.

    There's six pixels at the bottom that aren't part of text, and three
    pixels on the right.

    Don't touch the vmem when those pixels are updated... vmem can't
    update them.

    Should fix assertion in Abdul's Armor in RIP mode reported by DigitalMan
    on IRC.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Jan 18 22:08:44 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/93c48471e8a245754c98f028
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Avoid unlocking screenlock to draw vmem.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 19 11:45:46 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/4a92a5e2f40a9b9bffd65fe4
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Remove obsolete comment
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 19 13:56:32 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/17f6a6661510e9ec825c12d2
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix Prestel regression on double-height text.

    Visible in the double height graphics and engineering test pages.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 19 14:10:44 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/3061afa4b181b9723b1945ab
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix Prestel double-height bottom clearing issue

    Any change to any double-height bit anywhere on the screen can
    potentially change the display of every character after it on the
    screen. If the bit changes, force a full redraw from vmem
    (Luckily there's no graphics in Prestel mode).

    Fixes ticket 181
    Ugh.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 19 15:49:58 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/5f61b5d6c8c12d8f3d1e4867
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Reset screena *and* screenb, not jsut screena and screena
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 19 15:46:10 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/889a05dc7381d9212cac3233
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    When reallocating screen rects, reset the toprow.

    Fixes error where toprow may end up past the bottom of the screen
    when the screen size decreases.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sun Jan 19 20:30:56 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c142191d9d563d0371071946
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Initialize off, then add an assert to suppress warning.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Jan 21 20:55:04 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/0524805a17a52ec481ea3e4a
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix up cursor and blinking rates, step 1...

    For "PC" modes, cursor blinked at 1/16th of the VSYNC rate, so use
    the CGA timings, where were generally the slowest of the bunch...
    This means cursor blink at 3.745Hz, and character blink at 1.8725Hz.

    For Prestel, character blink was 0.75Hz with a 3:1 On:Off ratio.
    The cursor on the other hand was 1/32th the VSYNC and was generally
    PAL, so 1.5625Hz.

    I still need to dig into C64 and Atari modes, because they're likely
    way off now (assuming either supports blinking).
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Jan 21 21:16:20 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7ae2f1b10c1b3b6cbe6be690
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Add C64/C128 blinking... 1.5Hz
    Blinking text is opposite of the cursor
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Jan 21 21:17:24 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7079932ae67d523f69669bd2
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix previous commit.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Jan 21 21:29:46 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/4837ce25ad3fe1d3df191296
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Atari doesn't blink?
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Jan 21 21:57:16 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/f8f00d183462aabc91a8d083
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Synchronize cursor and text blinking for PC modes.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Jan 22 10:34:06 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/4be5cf7903e0c82736d01f95
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Move assignments for things only needed in the loop inside the loop
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Jan 22 14:58:20 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/64f325189d963a8f72c132e4
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Adjust Prestel cursor flash.

    It appears that it flashes at 1.5Hz with the off period synchronized
    to the blinking text off period.

    Still no idea what generates it though.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Jan 23 12:26:12 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/28ac10161def0dcdbbf5f9ec
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Split the happy path font rendering into separate function

    And merge the single/double height ones into the same function.
    Normalize all the types while I'm here.

    With this, the happy path draw_char_row_fast() is very simple and
    easy to keep updated, and all of the complexity goes into
    draw_char_row_slow().

    There seems to be around a 20% performance difference between them,
    but it can be hard to tell for sure because of the time spent
    cheating.

    Note that it doesn't appear to be worth cheating if we're going fast,
    but that's getting a bit too deep for my tastes.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Jan 23 13:10:36 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/744cf3ec4c3b757714225ae4
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    It appears MSVC doesn't support the 25-year-old standard restrict qualifier
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Jan 23 16:42:30 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9c9ee83e0474eb3659ea9dda
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix double-height separated mosaic drawing

    Regression introduced in 47b6f7a72f42bbbe264ecf57a09b4bcd7de4139c
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Jan 24 10:39:26 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a172bd4dbb7b95a480056173
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Add silly check to make coverity happy.

    This is in the fastpath, but it's on the slow side where I don't
    mind the occasional extra silly check.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tue Sep 30 10:59:02 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6650a0c0c5feb5e0b10c8e89
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Add suppression for Coverity false-positive.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Oct 2 09:23:56 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/d5ef8ec88b32827adaaa03b7
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    These suppressions don't work, remove them.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Oct 6 09:27:54 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/938ed45d5e2e6ed82fd98ff3
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fiddle with the integer/double scaling choice

    If the current scaling less than 0.0125 from an integer value, use
    integer scaling otherwise do the save/restore/iterate method to
    try and keep a constant diagonal window size.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Oct 6 21:36:04 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/e471b0752de88af0d6a023ed
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    We have 12x20 fonts, not 8x20.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Oct 8 12:34:06 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7d5452a09f9e1b2fa25147b2
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix crash when using a two character wide output window

    Not sure exactly why it's triggering, but it's fixed now.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Oct 22 16:03:54 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6ad075d7b59ca41a41926f3e
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix setting custom cursor with ratio of 0.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Oct 23 01:14:50 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/13ed0db24d500c1dbd1a72f9
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix crash from overflow

    If the passed values are high enough, the integer would overflow
    when the width was added, it was assumed to be in the buffer.

    Explicitly check that the start points are in the bufferr too.
    --- SBBSecho 3.30-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Dec 5 19:57:26 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/fddff9351373e4f10eea98c9
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Some optimizations...

    If we're redrawing every cell on the screen, don't bother looping
    through all the cells on the screen, just update them all in one
    big swoop.

    This gets some pointless comparisons out of the inner loop as well
    as completely avoiding the loops when possible.

    Now the bulk of the CPU time SyncTERM uses at a static screen is
    spent either constantly polling for keyboard input (since conio has
    no event thing yet), or scaling the same screen over and over (since
    there's no separation between expose/paint events and changes).
    --- SBBSecho 3.32-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Dec 5 21:21:08 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/e9369e512f6e9404cdd0c964
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Track if there's any blinking characters on the screen.

    If not, we don't need to redraw the screen when the blink state
    changes.
    --- SBBSecho 3.32-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)