Qbasicnews.com
October 22, 2020, 09:54:39 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: SCREEN resolution  (Read 8151 times)
Oz
I hold this place together
*****
Posts: 923



« on: September 03, 2005, 03:34:21 PM »

I'd like to mention that the built in screen modes QBasic has are static, meaning that in, for example, SCREEN 12, the only pixel resolution you can ever have is 640x480

if you want a list of screen modes and their resolutions, go here

If you wish to have different colour modes, look into DOS and VESA or SVGA.  here is the google query.  Make some use of it.

if you are looking for libraries, search for UGL:. or FutureLib, but I'm sure that there are other good ones out there, too

Yes, there are SCREEN tweeks available, and even if they have to be set in a certain screen mdoe prior to the tweek, after the tweek, you are no longer running in that screen mode.

Oz~

:: EDIT ::

Also, with each screen mode, there is a static screen bit depth and memory limit which WILL limit colours.

in screen 12, the buffer can only handle 16 colours at any given time.  No matter what you do, SCREEN 12 will only have 16 colours.

If you want 256 colours, QB will go as high as SCREEN 13, but only have 320x200 resolution.

Again, if you want hi res and lots of colours, use a library to achieve it - QB alone cannot achieve it without ASM

oz~
« Last Edit: October 28, 2007, 01:43:44 PM by wildcard » Logged
MystikShadows
Ancient Guru
****
Posts: 542



WWW
« Reply #1 on: September 03, 2005, 03:45:57 PM »

There you go :-)
Logged

hen they say it can't be done, THAT's when they call me ;-).




need hosting:  http://www.jc-hosting.net
All about ASCII: http://www.ascii-world.com
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #2 on: September 03, 2005, 07:43:32 PM »

Both of these libraries allow the use of VESA SVGA modes in various bit depths.
Logged
The walrus
Forum Regular
**
Posts: 137



WWW
« Reply #3 on: October 03, 2005, 10:30:47 AM »

AK-LIB is also pretty good - and still in development. However, the documentation and homepage is in german.

http://www.iconsoft.de/
Logged
Sebastian
Member
*
Posts: 73



WWW
« Reply #4 on: October 03, 2005, 10:32:22 AM »

Oh, I could translate the documentation into English if there's any interest. Smiley
Logged

axipher
Ancient Guru
****
Posts: 544



« Reply #5 on: December 04, 2005, 08:03:54 PM »

english would be nice, and while ur at it y nt welsh lol, kidding
Logged
Sebastian
Member
*
Posts: 73



WWW
« Reply #6 on: December 04, 2005, 08:20:42 PM »

Oh, I forgot to post here. Smiley I finished the translation some time ago. The English version of the library is available here: http://forum.qbasicnews.com/viewtopic.php?t=10737

Sebastian
Logged

axipher
Ancient Guru
****
Posts: 544



« Reply #7 on: December 04, 2005, 10:26:14 PM »

thanks for the translation, ive been wondering exactly wat AK lib does and now i know, props to u
Logged
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #8 on: February 25, 2006, 11:31:07 AM »

Just a little SCREEN tip when compiling using QuickBasic. If you compile the attached and run the EXE file you will find while running in the opening SCREEN 0 the display is minimised in the MSDOS window, but as soon as you activate SCREEN 9 the display is maximised.

Gordon

Code:

CLS : SCREEN 0: GOSUB SHOW
PRINT "press a key for screen 9 and full screen"
SLEEP
SCREEN 9: GOSUB SHOW
PRINT "PRESS A KEY": SLEEP: SYSTEM

SHOW: FOR n = 1 TO 20
          PRINT "Just testing"
      NEXT
      RETURN
Logged
Ralph
Ancient Guru
****
Posts: 544


« Reply #9 on: May 21, 2006, 01:50:47 AM »

Hi, Gordon.

Just for curiosity, I ran your SCREEN 0, SCREEN 9 reversed, putting the SCREEN 9 code first, and ran it.  I got the full SCREEN 9, and I also got the full SCREEN 0!

I made the program toggle from one screen to the other.  With SCREEN 0 first, I get the window, then the full SCREEN 9, then, SCREEN 0 is full, as is SCREEN 9, as is SCREEN 0, and so on.

Same as above, with SCREEN 9 first.  ALL screens are now full!

With SCREEN 0 first, I added one line of code, just before the SCREEN 0.  That line?  SCREEN 1.  Now, SCREEN 0 is shown full, and the characters are wide.  Using the line of code, SCREEN 2, then SCREEN 7, then 8, 9, 10, 11, 12, and 13 worked the same, giving SCREEN 0 a full screen, though some of the screens modes show wide characters, with all showing the normal line height for SCREEN 0.

Explanations?
Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #10 on: May 21, 2006, 04:17:08 AM »

You got me beat Ralph.

I expect it has something to do with the new graphic cards etc used with more modern PCS.

Gordon
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #11 on: May 29, 2006, 03:38:25 AM »

Switching from a 40 characters wide mode to textmode gives you textmode with 40 characters wide, as if you use "WIDTH 40, 25". This isn't something new, it's there since I can remember Smiley

Your windowed text mode problems can be solved configuring the _default.pif file so NTVDM programs are always executed fullscreen.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #12 on: May 29, 2006, 04:57:11 AM »

Mornin' Nathan

As you are such a knowledgeable guy perhaps I might pick you brains again.

Because QB obviously has no way of creating speech without resort to using other software, I created a simple EXE file using BBC BASIC for Windows that produces  speech from any Command Line parameter such as        Speaker.exe this is speech.

One problem I cannot overcome, which might of course be a fault in BBC4W, is the QB screen minimises after using the SPEAKER.EXE for the first time, but usually works ok afterwards. As you know from my site I dabble in various Basics, and I can say the problem does not occur with Liberty basic. In fact it is even possible with LB to avoid the screen going in a blank black MSDOS like window while the speech is produced.

LB has it own excellent way of creating speech for using MS Agent and  based on tts_tool.c by Martin Goebel using stm.dll and ttw.dll by John White, but it needs a special MS Patch installing, which is not very easy to locate. BBC4W uses some other method that does not appear to need any special patches.

If necessary I will email the QB programs along with Speaker. Exe and anyone is welcome to a copy of Speaker.exe and the readable BAS code
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #13 on: May 29, 2006, 10:50:04 AM »

Mixing Windows and MSDOS executables produces erratic behaviour most of the time. I remember when everyone started using windows-based slaves which could be controlled in several ways from a MSDOS executable - it was unstable and "untrustworthy", if you let me invent that word Wink

Every solution which mixes several programs which run in turn or even paralelly tends to be not very robust, that's why I usually advise against it. I know this is not an answer to your post, but I'm pretty sure that any solutions we might find for the problem will only work in some computers.

When a MSDOS tries to execute a command, the control is passed over the OS. If this command spawns a Windows application (as in your case, from what I understand), the process where the MSDOS application is being executed loses focus. If your MSDOS application is running in full screen mode, this means that, as the focus is not longer on the MSDOS app, the Windows environment should be made visible again just in case, so the OS returns to the desktop view and the MSDOS gets minimized.

The problem is just that MSDOS and your program execute in different processes, unlike MSDOS program shelled from another MSDOS program, which happen to execute in the same process. That's why there's a "Window swap" as one process loses focus and the other one gets it. Why does it minimize the first time and then it works okay? Well, I don't know Cheesy this is what I called "erratic behaviour". Maybe in my computer it doesn't minimize, or it minimizes always... Who knows. I've seen some video card drivers which let you run a graphics mode in a MSDOS window (this is, the old solution of SCREEN 9: SCREEN 0 would be of little avail, as the drivers are capable of displaying the graphis screen mode windowed) -  I mean, this stuff depends on the system.

There might be a solution: if you build your Windows application to run completely in the background with no window and no focus.

This is the kind of problems you get when you try running applications that are designed for other operating systems. Same kind of problems you get running Windows software on Linux, for instance.

Again, this ain't a true answer, but I'd rather take a glance at fB 'cause you can do everything you do with your several Basics, and get just one executable which does everything, without needing to shell to extern programs to do some tasks. You end with just one fast, robust executable which runs natively under your OS. You can port your QB app to fB and you can play the Speech from fB as well.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
GordonSweet
Guru
**
Posts: 287



WWW
« Reply #14 on: May 29, 2006, 11:18:38 AM »

Thanks Nathan, I supected I was probably asking too much.

I am not sure how I would run the BBC4W Speaker.exe in the background. I appreciate you can always run a number of programs with some minimised. But as this speaker.exe relies on a COMMAND$ function to accepts the text$ to be spoken on opening, I cannot fathom out to get it to accept such a command while it is still minimised in memory.
 
Also although BBC4W can activate any of 34 screen Windows MODES or allow you to decide any Window size. I would not know how to arrange for it to run with no window and no focus.

Gordon
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!