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 Khusraw E-mail, Bucharest, Romania, 24.12.2020, 11:25
(edited by Khusraw on 24.12.2020, 12:18)

> 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

---
Glory to God for all things

 

Complete thread:

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