Page 1 of 2

Color bug with screen128

Posted: Mon Jul 03, 2023 2:47 pm
by Sid_Som
I tried it on the web emulator also, it does the same.

But this is the bug, when you go to screen mode 128 it does not show the text for the black color.
Not sure if this issue has been brought up before or not (I checked the other topics and did not see it). I noticed it when going back to finish a program.

Is this an issue in the actual hardware or just the emulator?

Re: Color bug with screen128

Posted: Mon Jul 03, 2023 2:56 pm
by DragWx
Color 0 is always the transparent color. If you did "COLOR 0,1" and printed some text, you'd see an effect that looks like the letters are cut out from white blocks, through which you see the graphics layer.

Try color 16 instead; it's also black but not transparent.

Re: Color bug with screen128

Posted: Mon Jul 03, 2023 8:15 pm
by kelli217
DragWx wrote: Mon Jul 03, 2023 2:56 pm Color 0 is always the transparent color. If you did "COLOR 0,1" and printed some text, you'd see an effect that looks like the letters are cut out from white blocks, through which you see the graphics layer.

Try color 16 instead; it's also black but not transparent.
A little tricky to do that. The COLOR command doesn't support values higher than 15, no matter what mode the text screen is in.

Layer 1's config has to have its T256C bit set, in addition to being in tile mode and 1bpp color depth.

And only then can you do it, by putting the low nybble of the color index in the 'foreground' value for the COLOR command, and the high nybble in the 'background' value. For color 16, then, that's COLOR 0,1.

Re: Color bug with screen128

Posted: Mon Jul 03, 2023 11:42 pm
by DragWx
Oops, you're right. :P

Having bitmap + 256 color text mode could be a potential screen mode candidate; I know in DOS, you can toggle between being able to have blinking text or being able to use all 16 colors for text background colors. This would end up being similar.

Re: Color bug with screen128

Posted: Tue Jul 04, 2023 11:06 pm
by Sid_Som
So using the color black for text is out of the question for screen mode 128? Wasn't sure if that was intentional or not.
Oh well; guess there will be no black option then (for people to use in this game). :)

Re: Color bug with screen128

Posted: Wed Jul 05, 2023 12:51 am
by Guybrush
There's nothing stopping you from defining any of the colors #1-#15 as black.

Re: Color bug with screen128

Posted: Sun Jul 09, 2023 12:23 am
by Sid_Som
You mean I can change one of the other colors to black? I do not know how to do that.

Re: Color bug with screen128

Posted: Sun Jul 09, 2023 12:30 am
by Sid_Som
There's a COLOR command? Was unaware of that. Either way, the COLOR command is irrelevant to my program. But thank you all for the reply.

Re: Color bug with screen128

Posted: Sun Jul 09, 2023 11:20 am
by Guybrush
Sid_Som wrote: Sun Jul 09, 2023 12:23 am You mean I can change one of the other colors to black? I do not know how to do that.
The color palette is in VERA's memory at $1FA00-$1FBFF, two bytes (12 bits, actually) for each entry.

So, to set the color #N to black, simply set $1FA00 + (N * 2) and $1FA00 + (N * 2 + 1) to 0

In BASIC, that would be
VPOKE 1,$FA00+N*2,0
VPOKE 1,$FA00+N*2+1,0

Re: Color bug with screen128

Posted: Sun Jul 09, 2023 10:50 pm
by ahenry3068
I've been trying out various techniques even if they aren't quite necessary.

I was using transparent text, just making sure there was a black graphics screen behind it.

I just used this vpoke to use color 6 as black text, works perfectly.

Used it in my Game of Life, not quite posted yet for this function... Will post whatever I have done
before bedtime tonight. (1 or 2 hrs from now....lol)

Playing with visual stuff now... Hope to implement Mouse input