GETTING Screen 12 and saving using BSAVE 
Author Message
 GETTING Screen 12 and saving using BSAVE

Hi all QB gurus out there,

1)      Is there a way to GET the whole 640x480 screen 12 using the
GET method and then save the whole image into disk? I know it's
possible for a smaller area but don't know is it possible for the
whole screen to be saved into disk. QB always give a memory error when
I compile the code, which I need to do. Anyone can help?

2)      For menus in Screen 12, what is the best way to display and
undisplay the pull down menus? Do I need to save the backgnd image and
then display the menu and then PUT the backgnd image back...Is this
the right method or is there a another method? Cos its quite memory
consuming to just save the screen and I'm sure Qb has its limitations.

Thanks one & all
Ho Wen Yao
3/10/96



Mon, 22 Mar 1999 03:00:00 GMT  
 GETTING Screen 12 and saving using BSAVE

Quote:

>1)  Is there a way to GET the whole 640x480 screen 12 using the
>GET method and then save the whole image into disk? I know it's
>possible for a smaller area but don't know is it possible for the
>whole screen to be saved into disk. QB always give a memory error when
>I compile the code, which I need to do. Anyone can help?

Hi HWY!

1) Go check out the powerbasic web site. I think it or Dave Navarro's
web site offer code to SAVE each of 4 planes in screen mode 12, which
is the best way to save screens larger than 64k in BASIC I believe.

Other than that, I think you'd have to quarter the screen (save it in
four different different  arrays) if you prefer to use GET. Not sure,
but I think you;d have to use DYNAMIC arrays as well. IE: I think all
static arrays and data are limited to one 64k chunk.

Quote:
>2)  For menus in Screen 12, what is the best way to display and
>undisplay the pull down menus? Do I need to save the backgnd image and
>then display the menu and then PUT the backgnd image back...Is this
>the right method or is there a another method? Cos its quite memory
>consuming to just save the screen and I'm sure Qb has its limitations.

If the program is to use a hard drive, I have founf that in some
cases, saving the hires screen to disk works well and fast enough. IE:
ave your background to disk, display the menu data, then read back the
screen data.  In screen modes with page flipping, this works nice a
fast. IE: Like QB Screen Mode 9 for example.

Ep

Ed Parry - Southern California, USA



Mon, 22 Mar 1999 03:00:00 GMT  
 GETTING Screen 12 and saving using BSAVE



Quote:
> 1) Is there a way to GET the whole 640x480 screen 12 using the
> GET method and then save the whole image into disk? I know it's
> possible for a smaller area but don't know is it possible for the
> whole screen to be saved into disk. QB always give a memory error when
> I compile the code, which I need to do. Anyone can help?

Solution attached. It saves/loads into four files.

--
Mark K. Kim

http://members.aol.com/markkkim/

'draw something on the screen
SCREEN 12
CONST size% = 50
FOR y% = 0 TO 3
  FOR x% = 0 TO 3
    LINE (x% * size%, y% * size%)-(x% * size% + size%, y% * size% + size%),
y% * 4 + x%, BF
  NEXT
NEXT

'save the screen to 4 files
'save plane 0
OUT &H3CE, &H4
OUT &H3CF, &H0
DEF SEG = &HA000
BSAVE "plane0.vga", 0, &HFFFF
DEF SEG
'save plane 1
OUT &H3CE, &H4
OUT &H3CF, &H1
DEF SEG = &HA000
BSAVE "plane1.vga", 0, &HFFFF
DEF SEG
'save plane 2
OUT &H3CE, &H4
OUT &H3CF, &H2
DEF SEG = &HA000
BSAVE "plane2.vga", 0, &HFFFF
DEF SEG
'save plane 3
OUT &H3CE, &H4
OUT &H3CF, &H3
DEF SEG = &HA000
BSAVE "plane3.vga", 0, &HFFFF
DEF SEG

'pause
PRINT "Press any key to clear the screen... "; : a$ = INPUT$(1): CLS
PRINT "Press any key to load the picture... "; : a$ = INPUT$(1): CLS

'load picture from the 4 files
'load plane 0
OUT &H3C4, &H2
OUT &H3C5, &H1
DEF SEG = &HA000
BLOAD "plane0.vga", 0
DEF SEG
'load plane 1
OUT &H3C4, &H2
OUT &H3C5, &H2
DEF SEG = &HA000
BLOAD "plane1.vga", 0
DEF SEG
'load plane 2
OUT &H3C4, &H2
OUT &H3C5, &H4
DEF SEG = &HA000
BLOAD "plane2.vga", 0
DEF SEG
'load plane 3
OUT &H3C4, &H2
OUT &H3C5, &H8
DEF SEG = &HA000
BLOAD "plane3.vga", 0
DEF SEG



Tue, 23 Mar 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Bload and bsave in screen 12

2. BLOAD/BSAVE Screen 12

3. How to Bsave Screen 12 picture

4. save/load SCREEN 12 screens in QBasic?

5. faster PSET for SCREEN 12 / memory layout of SCREEN 12

6. Getting screen 12 in ASIC

7. Screen 12 with Palette Using

8. Saving Text Screen w/o BSAVE?

9. Screen 12 backgrounds in QB 4.5

10. 80x60 in PowerBASIC Screen 12

11. Screen 12

12. Address for Screen 11,12,13?

 

 
Powered by phpBB® Forum Software