06-20-2003, 04:26 AM
Hi all ! ... GLENN , I think u'll love answering me ! lol
Here is a new SVGA problem !
I don't manage to get the good RGB values ...
Example : I poke the (1000 , 450) pixel with red=255 , green=255 and blue=0
Then , when I peek this pixel , I have wrong values !
It seems to be a bank problem ... so to avoid from bank problm , I calculate each time the new ( or not ) bank
and I make a classical bankswitching .
My code is like this : ( I can't show it coze it's on another computer )
Is my code wrong ? or is it once again because of my OS ? ( Win ME )
Here is a new SVGA problem !
I don't manage to get the good RGB values ...
Example : I poke the (1000 , 450) pixel with red=255 , green=255 and blue=0
Then , when I peek this pixel , I have wrong values !
It seems to be a bank problem ... so to avoid from bank problm , I calculate each time the new ( or not ) bank
and I make a classical bankswitching .
My code is like this : ( I can't show it coze it's on another computer )
Code:
DEF SEG = &HA000
offsetblue = ( y * 1024 + x ) * bitperpixel
offsetgreen = offsetblue + 1
offsetred = offsetgreen + 1
bluebank = INT ( offsetblue / 65536 )
greenbank = INT ( offsetgreen / 65536 )
redbank = INT ( offsetred / 65536 )
bluepixel = offsetblue - bluebank * 65536
greenpixel = offsetgreen - greenbank * 65536
redpixel = offsetred - redbank * 65536
REGS.ax = &H4F05
REGS.bx = 0
REGS.dx = bluebank
INTERRUPTX &H10 , REGS , REGS
blue = PEEK ( bluepixel )
REGS.ax = &H4F05
REGS.bx = 0
REGS.dx = greenbank
INTERRUPTX &H10 , REGS , REGS
green = PEEK ( greenpixel )
REGS.ax = &H4F05
REGS.bx = 0
REGS.dx = redbank
INTERRUPTX &H10 , REGS , REGS
red = PEEK ( redpixel )
DEF SEG
Is my code wrong ? or is it once again because of my OS ? ( Win ME )