DIM Row$(1 TO 8)
SCREEN 12
'make red-brick wall
Row$(1) = CHR$(&H0) + CHR$(&H0) + CHR$(&HFE) + CHR$(&HFE)
Row$(2) = Row$(1)
Row$(3) = Row$(1)
Row$(4) = CHR$(&H0) + CHR$(&H0) + CHR$(&H0) + CHR$(&H0)
Row$(5) = CHR$(&H0) + CHR$(&H0) + CHR$(&HEF) + CHR$(&HEF)
Row$(6) = Row$(5)
Row$(7) = Row$(5)
Row$(8) = Row$(4)
FOR r = 1 TO 8
FOR f = 1 TO LEN(Row$(r))
PRINT DECtoBIN(ASC(Row$(r), f)); " ";
NEXT
PRINT " Row:"; r
NEXT
PRINT
PRINT "Searching string for number 12 (wall color), binary "; DECtoBIN$(12); " but i see it not"
FUNCTION BINtoDEC (b AS STRING)
FOR Si = 1 TO LEN(b)
e$ = MID$(b$, Si, 1)
c = VAL(e$) '
Sj = LEN(b) - Si
BINtoDEC = BINtoDEC + (c * 2 ^ Sj)
NEXT Si
END FUNCTION
FUNCTION DECtoBIN$ (vstup)
FOR rj = 7 TO 0 STEP -1
IF vstup AND 2 ^ rj THEN DECtoBIN$ = DECtoBIN$ + "1" ELSE DECtoBIN$ = DECtoBIN$ + "0"
NEXT rj
END FUNCTION
screen 11
paint (10,10),chr$(8)+chr$(8)+chr$(8)+chr$(255)+chr$(8)+chr$(8)+chr$(8)
Thanks I'll try later to put all together this informations into a running code.
Thank you Steve for a detailed analysis. I had nothing how orientate, so I tried to apply my assumption (as seen, so bad). I'll try somewhere to download the QB4.5 + dosbox for tests. If everything works as I suppose, maybe one old backlog could be solved in QB64? Even a completely new set of 32-bit color instructions could be applied? :) I will continue to experiment with it. It's a nice thing.
Perfect work, Steve! Your code work as expected and with TempodiBasic's string it draw correct brick! How you find values 85 and 170 in your StringToTile16 function? Yes, 170 + 85 is maximum, 255, but how you find value 170? It is with comparation between expected output in QB4.5 and your program, or how?
Hey Steve
excellent work! I have renamed your new code "Paint Tiling Steve's QB45 Emulator.BAS".
Now I work to get a not red brickswall!
In 16 color modes, every line is 4-byte long (2^4=16): one byte sets the red attribute, one the green, one the blue, one the brightess of the eight pixels of the line.
In 256-color mode, you will need 8 bytes for every line (2^8=256).
about
two questions:
1. in a 32 bit mode how many bytes do we need to code color?
2. in 256 color mode I think that the 8 bytes are grouped for the 3 cardinal values BGRA as BBGGRRAA?
thanks
Q :in 256 color mode I think that the 8 bytes are grouped for the 3 cardinal values BGRA as BBGGRRAA?
thanks
A: In 256 color mode, each byte is one pixel, IIRC.