Announcement

Collapse
No announcement yet.

Vesa Graphics for PB/DOS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Arthur Gomide
    replied
    Originally posted by Buck Huffman:
    please let me know if you have any more problems ...
    Buck,

    It´s all right now!

    Thank you for your help and patience!

    Cheers,




    ------------------
    Arthur Gomide
    Como diria nosso profeta da bola, Dadá Maravilha:
    "Para toda Problemática existe uma Solucionática!"

    Leave a comment:


  • Buck Huffman
    replied
    Thank you Arthur &HFFFF compiles great, I also added

    $LIB ALL OFF

    it makes the exe a bit smaller but GRAPH ON adds ~8K to the exe.
    and it seems to work fine without it so I left it out.

    I moved the white box to the top left corner so that it would be
    visible in 320 x 200 modes(10D, 10E, 10F...). I guess I could have
    written a routine to caculate the center of the screen and place
    it there for me but it was just there to demo the vesa routines so
    I figured it wasn't that important.

    for some reason I fixed the vStdOut routine, I know console output
    seems a little pointless in a graphics library but what the heck.
    so here it is

    Code:
    SUB vStdOut(BYVAL text1 as string)
       IF CONSOUT THEN                          ' is console redirected?
          vPrint text1                          ' no
       ELSE                                     ' yes
          text1 = text1 + CHR$(36)              ' add $ to terminate
          REG 1, &H0900                         ' ah = 9
          REG 4, STRPTR(text1)                  ' pointer to text1 in DX
          REG 8, STRSEG(text1)                  ' and DS
          CALL INTERRUPT &H21                   ' call dos
       END IF
    END SUB
    I haven't been able to test any of this yet, since I'm running Linux
    right now, and dosemu won't do 24-bit mode for me yet or give me
    access to my outdated printer. I'll boot to dos next chance I get
    and give it all a quick run. I'm sure I'll find a bug or two since
    I can't seem to type more than two words without an error in one
    of them.

    please let me know if you have any more problems, questions, ideas,
    etc.. I'd really like to see this thing working someday if at all
    possible.

    thank you
    buck


    ------------------


    [This message has been edited by Buck Huffman (edited September 21, 2006).]

    Leave a comment:


  • Arthur Gomide
    replied
    Originally posted by Buck Huffman:
    OK, I found my pb32 floppy ...
    Buck, It´s running, with a small problem:

    The white square is not at the center of the screen but at the upper left corner ...

    More changes in PBVESA4.BAS:

    Line 005 : $LIB ALL OFF, VGA ON, GRAPH ON

    Lines 135 and 139 - from 65535 to &HFFFF

    Line 135 : ! sub cx, &HFFFF ; only one byte left in bank?
    Line 139 : ! cmp offset, &HFFFF ; any bytes left in bank?

    Thanks for your precious help!

    Best Regards,

    ------------------
    Arthur Gomide
    Como diria nosso profeta da bola, Dadá Maravilha:
    "Para toda Problemática existe uma Solucionática!"

    [This message has been edited by Arthur Gomide (edited September 20, 2006).]

    Leave a comment:


  • Buck Huffman
    replied
    OK, I found my pb32 floppy, and appearently pb32 only allows
    integer values(32767 to -32766) for the "sub" statement. So the
    easy fix is to comment out lines 136 and 139 of pbvesa4.bas for
    now and don't use the 24 bit modes until that routine can be
    rewritten to work with pb32. I've been planning to rewrite the
    24 bit mode routines for a long time anyway, because they never
    worked quite right.

    you will also need to modify lines 666, 667 and 668 to read

    xRes = CVWRD(MID$(MData, 19, 2)) - 1
    yRes = CVWRD(MID$(MData, 21, 2)) - 1
    winGran = CVWRD(MID$(MData, 5, 2))

    lines 674, 675 and 676 should look like this

    Bpsl = CVWRD(MID$(MData, 17, 2)) 'BytesPerScanLine
    VidFunc = CVDWD(MID$(MData, 13, 4)) 'WinFuncPtr
    Bpp = CVBYT(MID$(MData, 26, 1)) / 8 'Convert bits/pixel to bytes/pixel

    since the CV functions didn't support offsets in pb32.

    also line 799 will need to be changed. I just used

    PRINT text1

    to hold my place until I can write a real stdout routine.

    after that it compiles and runs for me. Let me know if you hit
    any more snags, and I'll try to fix the 24 bit stuff as quick
    as I can.

    buck


    ------------------


    [This message has been edited by Buck Huffman (edited September 20, 2006).]

    Leave a comment:


  • Arthur Gomide
    replied
    Buck,

    Same error with pbc ...

    Microsoft Windows XP [versão 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\PB32>pbc demo4
    PowerBASIC Compiler Version 3.20 Copyright (c) 1989-1995 by Robert S. Zale
    PowerBASIC Inc. * Carmel, CA, USA
    C:\PB32\DEMO4.BAS
    C:\PB32\PBVESA4.BAS(136:21): Error 427: Integer constant expected
    ! sub cx, 65535 ; only one byte left in bank?
    ^

    C:\PB32>

    Very strange ...

    I´ll try breaking the code in small units,
    perhaps I have success!

    ------------------
    Arthur Gomide
    Como diria nosso profeta da bola, Dadá Maravilha:
    "Para toda Problemática existe uma Solucionática!"

    Leave a comment:


  • Arthur Gomide
    replied
    Originally posted by Buck Huffman:
    Even though that code was never tested
    with pb32
    Buck,

    I try this new code and receive the error 427 in line 136 of
    pbvesa4.bas when compiled with the IDE. I´ll try with pbc soon!

    Thanks.

    ------------------
    Arthur Gomide
    Como diria nosso profeta da bola, Dadá Maravilha:
    "Para toda Problemática existe uma Solucionática!"

    Leave a comment:


  • Buck Huffman
    replied
    I've looked everywhere but I can't find my old
    pb32 disks. Even though that code was never tested
    with pb32 I've always assumed it would work. But it
    does have some very bad bugs in it. Please download
    this later version at

    http://web.infoave.net/~hhuffman/pbvesa.zip

    it has fewer bugs and the IDE doesn't choke on it.
    please try it out and if it still doesn't compile
    for you then I will at least be in a better position
    to help you out.

    If the link doesn't work please let me know.

    sorry it took so long to reply I've been away.

    Buck


    ------------------

    Leave a comment:


  • Arthur Gomide
    replied
    Originally posted by Jerry Mason:
    But it runs fine in PB/DOS 3.5 (from the IDE only; the compiled
    version gives me an Error 244 on a non-existant line, even with
    all of the libraries selected).
    Hi Jerry,

    I don't know what's happening with the PB/DOS 3.2 compiler but for
    the PB/DOS 3.5 includes this line:

    $LIB ALL OFF ' turn off all PowerBASIC Libraries.
    $LIB VGA ON, GRAPH ON ' <-- need this for stand alone exe


    Best Regards,

    Arthur.

    ------------------

    Leave a comment:


  • Jerry Mason
    replied
    Hi Arthur,

    Running on my pure-DOS PC, I get the same error you do in PB/DOS 3.2

    But it runs fine in PB/DOS 3.5 (from the IDE only; the compiled
    version gives me an Error 244 on a non-existant line, even with
    all of the libraries selected).




    ------------------

    Leave a comment:


  • Arthur Gomide
    started a topic Vesa Graphics for PB/DOS

    Vesa Graphics for PB/DOS

    http://www.powerbasic.com/support/pb...ad.php?t=24969

    gives error 427 "integer constant expected" in line 198:
    ! db &h66
    when compiled with pb32.

    any help?

    best regards,

    arthur.


    ------------------
Working...
X