Graphics problem.

DOS specific questions.
Achaean
Posts: 51
Joined: Aug 02, 2017 12:54

Graphics problem.

Postby Achaean » Dec 29, 2017 12:50

Hi! :-)

I tried compiling some older QB programs (with -lang qb) but although they compile the executables can't run.
(Actually they run, clear the screen (like a CLS issued) and exit to DOS prompt again.

Lets say we have this program:

Code: Select all

SCREEN 2
PSET (100,100) 'for testing graphics capabilities.
PRINT "ABC" 'for testing text capabilities in graphics mode.
INPUT X 'for not autoclosing

With QB runs flawlessly. Lighting the indicated pixel, printing ABC in graphics mode and after Enter, exits.
With FB (with -lang qb) clears the screen, prints ABC in text mode and after pressing Enter, exits to DOS.

1) Any thoughts-experience on (-lang qb for DOS)?
2) Which is the proper way to write the above mentioned program on normal FB (without the "-lang qb" argument)?

Is this correct?

Code: Select all

DIM AS INTEGER X
SCREEN 7
PSET (100,100)
PRINT "ABC"
INPUT X


I have the latest FB (1.05), FD (1.2) and QB (1.1 from olddos.exe for Win95).
Details about DOS version (VER/R):

Code: Select all

FreeCom version 0.82 pl 3 XMS_Swap [Dec 10 2003 06:49:21]
DOS version 7.10
FreeDOS kernel version 0.0.42

VBEDIAG results:

Code: Select all

== VBEDIAG v0.2 ==
VESA VBE version 3.0
OEM: 'AMD ATOMBIOS'
Capabilities: 00000001 = 8bitdac
Total memory: 16777216 bytes = 16384 KiB = 16 MiB
OEM software rev: 15.33
OEM vendor name: '(C) 1988-2010, Advanced Micro Devices, Inc.'
OEM product name: 'KALINDI'
OEM product rev: '01.00'
Number of modes: 26
mode #0 [100]: 640x400x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 640 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   usable
   
mode #1 [101]: 640x480x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 640 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   usable
   
mode #2 [103]: 800x600x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 832 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   usable
   
mode #3 [105]: 1024x768x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1024 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   usable
   
mode #4 [107]: 1280x1024x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1280 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   
mode #5 [110]: 640x480x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1280 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(10) G 5(5) B 5(0)
   lin R 5(10) G 5(5) B 5(0)
   usable
   
mode #6 [111]: 640x480x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1280 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   usable
   
mode #7 [113]: 800x600x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1664 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(10) G 5(5) B 5(0)
   lin R 5(10) G 5(5) B 5(0)
   usable
   
mode #8 [114]: 800x600x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1664 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   usable
   
mode #9 [116]: 1024x768x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2048 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(10) G 5(5) B 5(0)
   lin R 5(10) G 5(5) B 5(0)
   usable
   
mode #10 [117]: 1024x768x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2048 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   usable
   
mode #11 [119]: 1280x1024x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2560 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(10) G 5(5) B 5(0)
   lin R 5(10) G 5(5) B 5(0)
   
mode #12 [11A]: 1280x1024x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2560 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   
mode #13 [163]: 1280x960x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1280 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   
mode #14 [165]: 1280x960x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2560 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   
mode #15 [166]: 1280x960x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 5120 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)
   
mode #16 [121]: 640x480x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2560 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)
   usable
   
mode #17 [122]: 800x600x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 3328 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)
   usable
   
mode #18 [123]: 1024x768x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 4096 B/line,
   wingran=64 KiB, winsize=64 KiB, supported, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)
   usable
   
mode #19 [124]: 1280x1024x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 5120 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)
   
mode #20 [143]: 1400x1050x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1408 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   
mode #21 [145]: 1400x1050x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 2816 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   
mode #22 [146]: 1400x1050x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 5632 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)
   
mode #23 [173]: 1600x1200x8 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 1600 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   
mode #24 [175]: 1600x1200x16 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 3200 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 5(11) G 6(5) B 5(0)
   lin R 5(11) G 6(5) B 5(0)
   
mode #25 [176]: 1600x1200x32 bpp, 1 plane(s), 1 bank(s) of 0 KiB, 6400 B/line,
   wingran=64 KiB, winsize=64 KiB, color, gfx, notvga, lfb
   winA: reloc read write
   bnk R 8(16) G 8(8) B 8(0)
   lin R 8(16) G 8(8) B 8(0)

TIA! :-)
A.
Last edited by Achaean on Dec 29, 2017 17:16, edited 1 time in total.
fxm
Posts: 7885
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: Graphics problem.

Postby fxm » Dec 29, 2017 14:11

Code: Select all

SCREEN 2
PSET (100,100) 'for testing graphics capabilities.
PRINT "ABC" 'for testing text capabilities in graphics mode.
SLEEP 'for not autoclosing
Achaean
Posts: 51
Joined: Aug 02, 2017 12:54

Re: Graphics problem.

Postby Achaean » Dec 29, 2017 17:16

THANKS fxm! :-)

(My monitor don't support so low resolutions? and) even FB compiles it, I'm getting a monitor error (Not optimum mode) and the screen goes black.
From some trial and error, I found that the only supported modes are 0 and 7. The other modes producing the above error message.
Setting SCREEN -> 7, makes the program start, going straight to text mode and presenting me the text (ABC) and sleeps.
No luck with mode 7 either! :-)

PS. I compiled and run the DOS examples and with the exception of the mouse one, the rest are running properly.
I suppose using somewhat advanced techniques or maybe using some C libs (eg. Allegro) do the trick, but the plain old QB style is a no-no here! :-)

Is it a bug?
Should it be reported?
DamageX
Posts: 113
Joined: Nov 21, 2009 8:42

Re: Graphics problem.

Postby DamageX » Jan 06, 2018 9:39

Not sure if this is an issue with FB or your machine. FYI, Screen 2 works fine for me with the older FB 0.23
Achaean
Posts: 51
Joined: Aug 02, 2017 12:54

Re: Graphics problem.

Postby Achaean » Jan 06, 2018 14:02

DamageX wrote:Not sure if this is an issue with FB or your machine.

Indeed, this was my 1st thought! :-)
So, I tested all modes that QB support and some (not all) of them worked (so I concluded that my box supports that modes).

DamageX wrote: FYI, Screen 2 works fine for me with the older FB 0.23

Can you retest, with the latest version?
DamageX
Posts: 113
Joined: Nov 21, 2009 8:42

Re: Graphics problem.

Postby DamageX » Jan 07, 2018 1:55

Yes, it works in FB 1.05.0 DOS also...
Achaean
Posts: 51
Joined: Aug 02, 2017 12:54

Re: Graphics problem.

Postby Achaean » Jan 07, 2018 14:38

DamageX wrote:Yes, it works in FB 1.05.0 DOS also...

So, the functionality is indeed there!
It just didn't work for me.
Probably a bug.

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 2 guests