Capture a screen ??? def seg mode
Posted: Tue Nov 17, 2015 4:17 pm
Hi,
I'm still here with another question: in QB71 or QB45 normally I use this statement to capture a screen
screen 12
cls
locate 15,20:print "HELLO..."
def seg=&HA000
bsave"ok.gif",0,64000 (entire screen)
def seg
How can I do the same thing in qb64 ????
and most important statement....
to save an entire page in screen 12 to reuse next like a background...
file$ = "treasure"
DEF SEG = &HA000
OUT &H3CE, 4: OUT &H3CF, 0: BSAVE file$ + ".BLU", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 1: BSAVE file$ + ".GRN", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 2: BSAVE file$ + ".RED", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 3: BSAVE file$ + ".INT", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 0
DEF SEG
Save the palette
DIM pal&(255)
DEF SEG = VARSEG(pal&(0))
FOR col% = 0 TO 255
OUT &H3C7, col%
POKE VARPTR(pal&(col%)), INP(&H3C9)
POKE VARPTR(pal&(col%)) + 1, INP(&H3C9)
POKE VARPTR(pal&(col%)) + 2, INP(&H3C9)
NEXT
BSAVE "treasure.pal", VARPTR(pal&(0)), 1023
load the same page for backgrounding...
SCREEN 12
file$ = "treasure"
DEF SEG = &HA000
OUT &H3C4, 2: OUT &H3C5, 1: BLOAD file$ + ".BLU", 0
OUT &H3C4, 2: OUT &H3C5, 2: BLOAD file$ + ".GRN", 0
OUT &H3C4, 2: OUT &H3C5, 4: BLOAD file$ + ".RED", 0
OUT &H3C4, 2: OUT &H3C5, 8: BLOAD file$ + ".INT", 0
OUT &H3C4, 2: OUT &H3C5, 16
DEF SEG
DIM pal&(255)
DEF SEG = VARSEG(pal&(0))
BLOAD "treasure.pal", VARPTR(pal&(0))
FOR col% = 0 TO 255
OUT &H3C8, col%
OUT &H3C9, PEEK(VARPTR(pal&(col%)))
OUT &H3C9, PEEK(VARPTR(pal&(col%)) + 1)
OUT &H3C9, PEEK(VARPTR(pal&(col%)) + 2)
NEXT
Now these statements in qb64 are not valid and this is a big problem because in my project I use a lot....but when I compile them in qb71 or qb45 there are many problems, this is the reason I'm trying to use qb64...
I'm still here with another question: in QB71 or QB45 normally I use this statement to capture a screen
screen 12
cls
locate 15,20:print "HELLO..."
def seg=&HA000
bsave"ok.gif",0,64000 (entire screen)
def seg
How can I do the same thing in qb64 ????
and most important statement....
to save an entire page in screen 12 to reuse next like a background...
file$ = "treasure"
DEF SEG = &HA000
OUT &H3CE, 4: OUT &H3CF, 0: BSAVE file$ + ".BLU", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 1: BSAVE file$ + ".GRN", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 2: BSAVE file$ + ".RED", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 3: BSAVE file$ + ".INT", 0, 38400
OUT &H3CE, 4: OUT &H3CF, 0
DEF SEG
Save the palette
DIM pal&(255)
DEF SEG = VARSEG(pal&(0))
FOR col% = 0 TO 255
OUT &H3C7, col%
POKE VARPTR(pal&(col%)), INP(&H3C9)
POKE VARPTR(pal&(col%)) + 1, INP(&H3C9)
POKE VARPTR(pal&(col%)) + 2, INP(&H3C9)
NEXT
BSAVE "treasure.pal", VARPTR(pal&(0)), 1023
load the same page for backgrounding...
SCREEN 12
file$ = "treasure"
DEF SEG = &HA000
OUT &H3C4, 2: OUT &H3C5, 1: BLOAD file$ + ".BLU", 0
OUT &H3C4, 2: OUT &H3C5, 2: BLOAD file$ + ".GRN", 0
OUT &H3C4, 2: OUT &H3C5, 4: BLOAD file$ + ".RED", 0
OUT &H3C4, 2: OUT &H3C5, 8: BLOAD file$ + ".INT", 0
OUT &H3C4, 2: OUT &H3C5, 16
DEF SEG
DIM pal&(255)
DEF SEG = VARSEG(pal&(0))
BLOAD "treasure.pal", VARPTR(pal&(0))
FOR col% = 0 TO 255
OUT &H3C8, col%
OUT &H3C9, PEEK(VARPTR(pal&(col%)))
OUT &H3C9, PEEK(VARPTR(pal&(col%)) + 1)
OUT &H3C9, PEEK(VARPTR(pal&(col%)) + 2)
NEXT
Now these statements in qb64 are not valid and this is a big problem because in my project I use a lot....but when I compile them in qb71 or qb45 there are many problems, this is the reason I'm trying to use qb64...