• src/conio/bitmap_con.c

    From Deuc¿@VERT to Git commit to main/sbbs/m on Tuesday, September 23, 2025 17:15:00
    https://gitlab.synchro.net/main/sbbs/-/commit/006a6db5545a296f3c7aa44c
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Hang and scroll up fixes

    This fixes ticket 207 by fixing the partial scrollup optimization
    in bitmap output that scrolls down the screen, the scrolls up the
    part that should not have moved.

    While testing this change however, I managed to reproduce two unlikely
    but possible deadlocks since I was rebuilding all the software on
    my computer at the time and it was under very heavy load.

    One of these issues was apparently found by Coverity and explcitly suppressed... possibly this suppressed the other as a side-effect
    as well.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Tuesday, September 30, 2025 10:59:00
    https://gitlab.synchro.net/main/sbbs/-/commit/6650a0c0c5feb5e0b10c8e89
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Add suppression for Coverity false-positive.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Thursday, October 02, 2025 09:23:00
    https://gitlab.synchro.net/main/sbbs/-/commit/d5ef8ec88b32827adaaa03b7
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    These suppressions don't work, remove them.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Thursday, October 02, 2025 09:27:00
    https://gitlab.synchro.net/main/sbbs/-/commit/b6e62ba5999d1c418c516a6c
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Attempt the same suppression a different way.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Sunday, October 05, 2025 11:59:00
    https://gitlab.synchro.net/main/sbbs/-/commit/28411ee7643138917cb6e218
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    First attempt at fixing bug ticket 209

    Apparently new for v1.7 we're snapping to the next lower integer
    scaling on any clal to textmode()... this is bad because some
    people don't want integer scaling for various excellent reasons.

    Deal with this two ways when calling textmode() and not already
    using integer scaling:
    1) Save the previous scaling and if the stars align, just re-use
    it instead of trying to recalculate it (a fools errand after
    round-tripping through C64 for example).
    2) Otherwise, do successive estimations until we're taking steps
    of less than 0.00005 in the multiplier, then call it good. This
    gets pretty close, but can add or remove a few pixels.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Sunday, October 05, 2025 11:59:00
    https://gitlab.synchro.net/main/sbbs/-/commit/015f538592ebcdfc1be12715
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Some compilers won't let us _Static_assert() a const variable.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Monday, October 06, 2025 09:27:00
    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Monday, October 06, 2025 21:36:00
    https://gitlab.synchro.net/main/sbbs/-/commit/e471b0752de88af0d6a023ed
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    We have 12x20 fonts, not 8x20.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Wednesday, October 08, 2025 12:34:00
    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Wednesday, October 08, 2025 12:34:00
    https://gitlab.synchro.net/main/sbbs/-/commit/dcda68ff4f69686722b01362
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Do just enough that some bits can handle screen widths over 255.

    Needed for SyncView BinaryText, fil-412.bin which is 400 columns,
    b7ree_of_life by GOO from BLOCKTRONICS which is 500, and
    IMPURE (goo-unreign.bin) also by GOO, but via 67.

    These are also making me contemplate the 60 row limit. :D

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Wednesday, October 22, 2025 16:03:00
    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Thursday, October 23, 2025 01:14:00
    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Friday, December 05, 2025 19:57:00
    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).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Friday, December 05, 2025 21:21:00
    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.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Friday, January 09, 2026 07:33:00
    https://gitlab.synchro.net/main/sbbs/-/commit/7b75eedac533e5ff97bd504e
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix have_blink calculation

    The old method was flawed because when we're cheating (most of the
    time), it wouldn't get set to true even when there's blinking text
    somewhere on the screen.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Wednesday, March 04, 2026 23:48:00
    https://gitlab.synchro.net/main/sbbs/-/commit/cd13711d07a94744ef301142
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix bug calculating snaps in height-controlled modes.

    There really aren't that many height-controlled modes, but an error
    in the number of scanlines made ST132X36_16_9 into one.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Saturday, March 14, 2026 18:14:00
    https://gitlab.synchro.net/main/sbbs/-/commit/090c08a33308e9832fa21e6f
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix chunk end calculation for split vmem update

    Previously, would write the same areas multiple times, potentially
    resulting in differrent CRCs.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Saturday, March 14, 2026 18:14:00
    https://gitlab.synchro.net/main/sbbs/-/commit/58ce9083d1d0352337d28c18
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Perform split updates with a single lock

    No need for a lock/unlock wrapper.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Saturday, March 14, 2026 18:14:00
    https://gitlab.synchro.net/main/sbbs/-/commit/5bffab544f4fb52d66e4cf4a
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix a handful of subtle bugs caught running the terminal test...

    1) bitmap_draw_from_vmem() had some math wrong, which could result
    in a frame or two of the screen being drawn split. This was visible
    as a flash of the status bar being in the middle of the screen.
    2) With the update to a rwlock, the force parameter to update_from_vmem()
    NEEDS to ensure a redraw is done for consistency. While eventual
    consisency is fine for most cases, getting the checksum of a region
    strictly requires the region is fully updated first.
    3) vstat was being written in two cases with the read lock held...
    one was when resetting the "changed" flag to false during an
    update, and the other was when adjusting the reveal bit in prestel
    mode.
    4) bitmap_movetext() and the corresponding bitmap_movetext_screen()
    almost certainly had a bug in them. They basically did the exact
    same thing, just one to the vmem and the other to the screen data.
    How they went about that however was wildly different. Rewrote
    most of these functions so they re-use calculations and don't
    both do hard-to-understand math.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Sunday, March 15, 2026 14:09:00
    https://gitlab.synchro.net/main/sbbs/-/commit/8dda8ba2f94dd1534aacf061
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix integer division in bitmap_setcustomcursor() cursor scaling

    The ratio variable is declared as double, but vstat.charheight/r performed integer division since both operands are int. This truncated the scaling
    ratio (e.g. 16/14 = 1 instead of 1.143), causing cursor start/end positions
    to not scale correctly when switching between font heights.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Tuesday, March 17, 2026 00:41:00
    https://gitlab.synchro.net/main/sbbs/-/commit/e0b825c458da099f74f1fc6d
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Pre-compute Prestel double-height row states once per frame

    calc_charstate() was scanning all rows 0..ypos-1 for every cell to
    determine top/bottom double-height status, making full redraws
    O(rows^2 * cols). Pre-compute the row state array once in
    update_from_vmem() and pass it through the call chain. Callers from bitmap_setpixel/setpixels pass NULL to retain the existing per-cell
    scan (always single-cell, so the old path is fine).

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Tuesday, March 17, 2026 10:47:00
    https://gitlab.synchro.net/main/sbbs/-/commit/070cbc5c3dc94166d5f5a667
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Remove TODO comment... yes, we do.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/m on Tuesday, March 17, 2026 11:59:00
    https://gitlab.synchro.net/main/sbbs/-/commit/14f279ca37de873b6fb75317
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Hold vstat_chlock when setting vmem->changed in blinker thread

    Every other write to vmem->changed holds vstat_chlock; this was the
    sole exception. The wrlock on vstatlock already prevented concurrent
    access in practice, but this makes the locking protocol consistent
    and is not in a hot path. (Coverity CID 644904)

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net