TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

everything drawn in OVR with color 0 is transparent

Open fachi177 opened this issue 2 years ago • 8 comments

Why is everything drawn in OVR with color 0 transparent? It is intended? Also, SCREEN OFFSET works the other way around now, I have to change the signs to make it work like before you can see these problems in this game https://tic80.com/play?cart=1414

fachi177 avatar May 03 '22 02:05 fachi177

See the wiki on VRAM. You can set the OVR transparent color. Perhaps you can set it to say 255 or something though?

joshgoebel avatar May 03 '22 03:05 joshgoebel

Oh, I just saw them. yes, one of the colors has to be transparent. now only 15 colors can be used in OVR. I should change the name of my game from Paint32 to Paint31 XD

fachi177 avatar May 03 '22 04:05 fachi177

Also, SCREEN OFFSET works the other way around now

@fachi177 Does it work differently in both XY directions or just one?

nesbox avatar May 03 '22 06:05 nesbox

@fachi177 Did you try a no color such as 255?

joshgoebel avatar May 03 '22 06:05 joshgoebel

How do you set color 0 as not transparent in OVR ?

potato25 avatar May 03 '22 07:05 potato25

Poke the ovr trans register in VRAM.

joshgoebel avatar May 03 '22 08:05 joshgoebel

@fachi177 Did you try a no color such as 255?

yes i did, but it only accepts 4-bit color value, you must put a color

Also, SCREEN OFFSET works the other way around now

@fachi177 Does it work differently in both XY directions or just one?

Yes, both. I had to put a minus sign on both of them to fix my game.

fachi177 avatar May 03 '22 14:05 fachi177

Were you poking the full 1 byte register? Obviously you can't poke a 8 bit value with poke4.

I'm pretty sure we handled this case which means the docs are wrong that it's a 4 bit value only.

joshgoebel avatar May 03 '22 22:05 joshgoebel

Ping.

joshgoebel avatar Dec 05 '22 01:12 joshgoebel

This used to work as I describe (the register internally was 8 bit)... this was broken by the big endian patch though - which turned it into a 4 bit register: 99dc5553. So now we probably need to decide to just call the register 8 bits truly (allowing you to turn off transparency in vbank1) - or if this is meant to be a new graphics chipset limitation. @nesbox

joshgoebel avatar Dec 17 '22 15:12 joshgoebel

this was broken by the big endian patch though

I don't see that it was broken by the big endian patch, it was 4bit before the 99dc5553bed3c2c71fc9352b28ec2af9ea1067fa Anyway, TIC-80 uses only first 4 bits to get color info, other 4 bits are unused and it doesn't matter what to call poke4() or poke() in this case.

nesbox avatar Jan 12 '23 21:01 nesbox

@nesbox It absolute was 8 bit before. https://github.com/nesbox/TIC-80/commit/99dc5553bed3c2c71fc9352b28ec2af9ea1067fa#diff-c9998e9cc98408138dd404d46a35dc13b28d125c316fcc6200d0e46b40e87d8fL488

Line 488. That the register was actually 8 bits was intentional (at least this was always 100% clear to me) - exactly to allow for using all 16 colors in OVR1.. The big endianness change was not supposed to change the behavior of the engine, so this seems like it would be a bug in any case.

No?

joshgoebel avatar Jan 15 '23 15:01 joshgoebel

It absolute was 8 bit before.

No, it was 4 bits before u8 border:TIC_PALETTE_BPP; where TIC_PALETTE_BPP == 4

nesbox avatar Jan 17 '23 10:01 nesbox