Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Jordan Hargraphix SvgaBGI goes MIT license (Announce)

posted by Guti Homepage, 24.12.2020, 12:28

> > Not yet. Just started looking at it and applying tight changes. Mainly
> > enabling it to build with TASM 5 too. Of course you can fork it or submit
> a
> > patch.
>
> Unfortunately I don't have time now to contribute with a patch and, to be
> honest, my interest in it is quite low, but the problem arises from the
> fact that it uses "MaxX" instead of "BytesPerLine" in the calculations
> needed to get the video offset (and bank). You can see a couple of examples
> (taken at random) below, "MaxX" should be replaced with "BytesPerLine" to
> make it work properly in cases where the number of bytes per scan line is
> larger than the width in pixels (I have a couple of video cards that make
> the problem obvious in mode 800x600).
>
> PROC    PutPixel
>
> add     bx, [PageOfs]                   ;
> Bildschirmseiten-Korrektur
> mov     cl, dl                          ; Farbe retten
> xchg    ax, bx                          ; Y in ax, X in bx
> mul     [MaxX]                          ; * Zeilenl„nge
> add     bx, ax                          ; + Offset
> adc     dl, 0                           ; Segment-šberlauf
> mov     [Seg64], dl                     ; Segment merken
> call    [SegSelect]                     ; Segment einstellen
> mov     ds, [VideoSeg]                  ; Videosegment holen
> mov     [bx], cl                        ; Byte schreiben
> ret
>
> ENDP    PutPixel

>
> PROC    RestoreBitmap      NEAR
> [...]
>
> ; Errechnen wieviel bei Erreichen des Punktes X2+1 dazugez„hlt werden
> muá um
> ; X1 in der n„chsten Linie zu erreichen
>
> mov     cx, [MaxX]
> sub     cx, ax
> push    cx                      ; Wert retten
>
> [...]
> ENDP    RestoreBitMap


Thank you. According to the DOCs, and it seems so in the code, during initalization it will use VESA BytesPerLine. This was added in original 3.51A: "The driver no longer assumes that logical and real line lengths are identical (this is when controlling via VESA driver.

---
Visit my personal blog at https://www.javiergutierrezchamorro.com

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 320 users online (0 registered, 320 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum