Author |
Message |
Sam Dro #1 / 10
|
 qbasic: SCREEN 13
this is just a thought, I'm not sure if this will work because I've never messed with memory much, but could you put it in an array and then copy the array over to where the video memory is?
|
Wed, 03 Feb 1999 03:00:00 GMT |
|
 |
Martin Seefel #2 / 10
|
 qbasic: SCREEN 13
Is it possible to get more than just one video page on SCREEN 13 in QBasic (the one with DOS)? Or can anyone help me with the following problem: I'm making a game, but when I load the graphics (coded 256 color gifs) they flash on the screen while I GET them. I know I can use a second video page to "hide" the picture while I get the graphics, but only one is available in SCREEN 13. Is it possible to keep them out of view of the user using another method than video pages? Martin Seefeldt,
http://www.geocities.com/timessquare/5698/index.html
|
Wed, 03 Feb 1999 03:00:00 GMT |
|
 |
Jonathan Leg #3 / 10
|
 qbasic: SCREEN 13
Quote:
> Is it possible to get more than just one video page on SCREEN 13 in > QBasic (the one with DOS)?
Unfortunately Qbasic doesn't have but 1 video page for SCREEN 13. There are ways around them, but they require a good bit of assembly language and a lot of CALL absolute(). :) However... Quote: > I'm making a game, but when I load the graphics (coded 256 color > gifs) they flash on the screen while I GET them. I know I can use a > second video page to "hide" the picture while I get the graphics, but > only one is available in SCREEN 13. Is it possible to keep them out of > view of the user using another method than video pages?
You can fake your way past this one! :) Using the following routines, add this to your code: '*** What this will do is save the current palette then blackout '*** the screen. After the screen is blacked out, draw your pictures '*** and GET them (which will all be done in the dark!). Once that is '*** done, clear the screen and put the palette back the way it was. '*** TADA! No flashing. :) DIM pal(0 to 255, 1 to 3) GetPal pal() BlackOut '*** Put your GETs here! CLS PutPal pal() '*** This subroutine will dump the current palette into an array. '*** The array should be dimensioned like this: '*** '*** DIM pal(0 to 255, 1 to 3) '*** '*** The name, of course, is variable. SUB GetPal (pal()) FOR clr = 0 TO 255 OUT &H3C7, clr pal(clr, 1) = INP(&H3C9) pal(clr, 2) = INP(&H3C9) pal(clr, 3) = INP(&H3C9) NEXT clr END SUB '*** This subroutine will restore a previously saved palette. '*** See GetPal() for details on the array dimensions. SUB PutPal (pal()) FOR clr = 0 TO 255 OUT &H3C8, clr OUT &H3C9, pal(clr, 1) OUT &H3C9, pal(clr, 2) OUT &H3C9, pal(clr, 3) NEXT clr END SUB '*** This subroutine will set all palette colors to 0 (black). SUB BlackOut FOR clr = 0 TO 255 OUT &H3C8, clr OUT &H3C9, 0 OUT &H3C9, 0 OUT &H3C9, 0 NEXT clr END SUB +-----------------------------------+
|-----------------------------------| | http://www.dtx.net/~leger/ | +-----------------------------------+-------+ |VISIT THE BULLETIN BOARD SEARCH ENGINE! | | http://www.dtx.net/~leger/bbs.html | |17,680 BBSes indexed in the United States! | +-------------------------------------------+
|
Thu, 04 Feb 1999 03:00:00 GMT |
|
 |
Martin Seefel #4 / 10
|
 qbasic: SCREEN 13
Quote:
>>> Is it possible to get more than just one video page on SCREEN >>> 13 in QBasic (the one with DOS)? >>Unfortunately Qbasic doesn't have but 1 video page for SCREEN 13. >>There are ways around them, but they require a good bit of assembly >>language and a lot of CALL absolute(). :) However... > That is NOT QB's fault, the VGA only supports 1 page in Mode 13h > which is QB's SCREEN 13. You can program ModeX into the card, but you > must also program your own get, put, pset, etc. routines.
Can you show me how to program ModeX into the card? Also, I don't understand what you mean by "you must also program your own get, put, etc..." I'm new to programming so I ask a lot of questions :)
|
Thu, 04 Feb 1999 03:00:00 GMT |
|
 |
Mark K K #5 / 10
|
 qbasic: SCREEN 13
Quote:
> I'm making a game, but when I load the graphics (coded 256 color >gifs) they flash on the screen while I GET them. I know I can use a >second video page to "hide" the picture while I get the graphics, but >only one is available in SCREEN 13. Is it possible to keep them out of >view of the user using another method than video pages?
Two general methods: One is creating a virtual screen to store data. Using a special routine, you can copy the virtual screen data to the screen in a flash. I'm working on this program but it'll be some time before I release it -- got some extra stuff to work on. Second method is using Mode-X. There are routines that puts you in mode-x but I haven't seen any fully-supported mode-x library yet. Too bad... -Mark ==== Mark K. Kim
http://members.aol.com/markkkim/
|
Thu, 04 Feb 1999 03:00:00 GMT |
|
 |
Shroom= #6 / 10
|
 qbasic: SCREEN 13
writes Quote: > I'm making a game, but when I load the graphics (coded 256 color >gifs) they flash on the screen while I GET them. I know I can use a >second video page to "hide" the picture while I get the graphics, but >only one is available in SCREEN 13. Is it possible to keep them out of >view of the user using another method than video pages?
Just set all of the palette values to 0 (black) and PUT&GET the image when you have finshed recreate the palette, see easy as 1.2.3 -- Shroom=-
|
Thu, 04 Feb 1999 03:00:00 GMT |
|
 |
Sensar #7 / 10
|
 qbasic: SCREEN 13
Quote:
> >>> Is it possible to get more than just one video page on SCREEN > >>> 13 in QBasic (the one with DOS)? > >>Unfortunately Qbasic doesn't have but 1 video page for SCREEN 13. > >>There are ways around them, but they require a good bit of assembly > >>language and a lot of CALL absolute(). :) However... > > That is NOT QB's fault, the VGA only supports 1 page in Mode 13h > > which is QB's SCREEN 13. You can program ModeX into the card, but you > > must also program your own get, put, pset, etc. routines. > Can you show me how to program ModeX into the card? Also, I don't > understand what you mean by "you must also program your own get, put, > etc..." I'm new to programming so I ask a lot of questions :)
Here is a function I wrote to activate 320x240x256 xmode. If you want the same resolution as screen 13h (320x200), don't use this--activating 320x200 xmode is different (easier too). SUB MODEX SCREEN 13 DEF SEG = &HA000 OUT &H3C4, &H4 OUT &H3C5, &H6 OUT &H3C4, &H2 OUT &H3C5, &HF CLS OUT &H3D4, &H14 OUT &H3D5, &H0 OUT &H3D4, &H17 OUT &H3D5, &HE3 OUT &H3C2, &HE3 OUT &H3D4, &H11 OUT &H3D5, &H2C OUT &H3D4, &H6 OUT &H3D5, &HD OUT &H3D4, &H7 OUT &H3D5, &H3E OUT &H3D4, &H10 OUT &H3D5, &HEA OUT &H3D4, &H11 OUT &H3D5, &HAC OUT &H3D4, &H12 OUT &H3D5, &HDF OUT &H3D4, &H15 OUT &H3D5, &HE7 OUT &H3D4, &H16 OUT &H3D5, &H6 END SUB About writing your own functions: you cannot use QBasic's GET, PUT, PSET, LINE, CIRCLE, or any graphics function because xmode is foreign to QBasic. -- ______________________________ Steven Sensarn
______________________________
|
Thu, 04 Feb 1999 03:00:00 GMT |
|
 |
Daniel P Huds #8 / 10
|
 qbasic: SCREEN 13
Quote:
>> Is it possible to get more than just one video page on SCREEN 13 in >> QBasic (the one with DOS)? >Unfortunately Qbasic doesn't have but 1 video page for SCREEN 13. There are >ways around them, but they require a good bit of assembly language and a >lot of CALL absolute(). :) However...
That is NOT QB's fault, the VGA only supports 1 page in Mode 13h which is QB's SCREEN 13. You can program ModeX into the card, but you must also program your own get, put, pset, etc. routines.
|
Thu, 04 Feb 1999 03:00:00 GMT |
|
 |
Daniel P Huds #9 / 10
|
 qbasic: SCREEN 13
Quote:
>>>Unfortunately Qbasic doesn't have but 1 video page for SCREEN 13. >>>There are ways around them, but they require a good bit of assembly >>>language and a lot of CALL absolute(). :) However... >> That is NOT QB's fault, the VGA only supports 1 page in Mode 13h >> which is QB's SCREEN 13. You can program ModeX into the card, but you >> must also program your own get, put, pset, etc. routines. >Can you show me how to program ModeX into the card? Also, I don't >understand what you mean by "you must also program your own get, put, >etc..." I'm new to programming so I ask a lot of questions :)
Sorry, Graphics are not my thing, but I believe there are several MODEX demos in QBasic in either the ABC packets ot the Fanzine. As far as programming your own Get/Put routines, I mean that QB's routines are not designed to work in MODE X, so you will need to code your own routine to get and out images.
|
Fri, 05 Feb 1999 03:00:00 GMT |
|
 |
Sam Dro #10 / 10
|
 qbasic: SCREEN 13
that creates a cool effect as you see the colors appear at different times
|
Sat, 06 Feb 1999 03:00:00 GMT |
|
|
|