Home | Forums | What's new | Resources | |
VDP2 questions |
AntiPasta - Apr 3, 2003 |
< Prev | 1 | 2 | 3 | Next> |
paul_met | Oct 23, 2019 | |||||
So what is the solution in this situation? Can you suggest any options? |
fafling | Oct 23, 2019 | |||
RBG0 is not transparent in the water area, otherwise the line color screen would not be displayed : it displays only through color calculation on the non transparent pixels of the layers that activate it. The water texture is very faint with the blending because it has a very low ratio (3:29 !), but it's there on RBG0 and it is visible in movement. Here's a screen of it from a WIP version of Kronos where color calculation didn't work on that layer. For some reason, water texture is more visible in the Regal ruin circuit with color calculation working (and yes, I checked that it displays like that on the console) : So here we have 3 layer blending (RBG0, line color screen and NBG0). Actually, they could have pushed it further since VDP2 can do up to 4 layer blending when line color screen is in 2nd position. Like they could have made a blending of 2 reflections layers instead of 1. On that topic, I think there's a typo on the ratios on the line with the arrow of this extended color calculation table from p. 238 of VDP2 manual. It should be 2:1:1 instead of 2:1:0, otherwise it makes no sense : |
paul_met | Oct 24, 2019 | |||||
It turns out that ECC cannot be forced to work in Color Rm Mode = 1? |
fafling | Oct 24, 2019 | |||
Extended color calculation can be used without changing the CRAM mode, but it requires you to change NBG0 to be in RGB format instead of 8 bpp palette. So 16 bpp RGB makes its tiles twice as big. Is there enough room in VDP2 VRAM ? And that requires you to tweak the cycle pattern register for that screen (hint : grab a console to test that). |
David Gámiz Jiménez | Oct 24, 2019 | |||||
Well. I rechecked all again. At the beginning of my analysis. Sonic R was once of the games that more I checked. I my first notes, checked in emulators first and after in real hardware. I saw some blend between layers. Only checked always the first level. It is true in the third is more clear the effect. Well, more forward in my 3 or 4 four time read the vpd2 documentation. I understand that it is possible have multi-layer (4 max) blend with VDP2. And in other way between sprite whit MSB Shadow function, this last it is a lot restrictive and quite usefulness by my point of view, at least for 3D. Well. I try to share my current results: In first level or third level is the same configuration. Only changes the ratios. The priorities it is the same in both scenarios. All have "Extended Color Calculation Enabled". In this chain work all OK. All see between them and blend all. Prio:5/6 Map: NBG3 [T] + Prio:3 Ripple character water and depth cueign: VDP1 [T] + Prio:2 Pixel water areas: RBG0 [T] + Prio:2 NBG0 [Opaque] The Line Color Screen only work with the RBG0 + NGB0, in this part of chain, NBG3, VDP1 not blend with the LCS: Line Color Screen [per Line color Animated]+Prio:2 Pixel water areas: RBG0 [T] + Prio:2 NBG0 [Opaque] Finally. My perception that VDP2 only can blend one layer. It is because, sadly, the all most games that use VDP2 transparency, when have two or more layer, not use or not use well "Extended Color Calculation Enabled" and not blend. But I take note, for the next point in my analysis research I will take more time in this games. Thanks for sharing your knowledge. |
paul_met | Oct 24, 2019 | |||||
Yes, if I switch the NBG0 layer to RGB (16bpp) mode, then double translucency works. But in this case, all other backgrounds are also switched to RGB mode (global parameter). |
fafling | Oct 24, 2019 | |||
@David Gámiz Jiménez... Yes, the line color screen is inserted only on the top layer. So if RBG0 is behind a semi-transparent layer, the line color screen disappears. Sonic R allows to check that in emulators. Did you find some other games that use extended color calculation ? Even games where ECC doesn't work because some condition isn't met, it can be interesting to check how emulators handle that situation. @paul_met... To set only NBG0 to RGB format, you should change the character color number registry bits N0CHCN2~N0CHCN0 (p.60 of VDP2 manual), leaving unchanged the other bits of that registry. |
paul_met | Oct 25, 2019 | |||||
That's exactly what I did. But I meant that the color change parameter for the NBG0 layer is global and all other backgrounds that are displayed through the NBG0 layer also go into RGB mode. I apologize for my English, it’s not good, as I would like. |
fafling | Oct 25, 2019 | |||
Changing that register is not enough. Have you changed NBG0's tiles, map and cycle pattern accordingly? If you don't, it's normal that graphics get corrupted. Like I said, enabling extended color calculation after the facts is not an easy task. |
paul_met | Oct 25, 2019 | |||||
If I go this way, I will have to change not only the picture of the global map, but also all the other backgrounds in the game. That's what I wanted to say. |
fafling | Oct 25, 2019 | |||
OK I didn't understand that. There's yet another possibilty that doesn't require to enable ECC, but that's not simple either. You could make the black part of the dialog box displayed by normal shadow pixels on the framebuffer instead of NBG3. Would need to :
|
paul_met | Oct 25, 2019 | |||||
I'm afraid that I don’t have enough skills to create VPD1 objects. On the other hand, if the degree of translucency of the dialog window is reduced to a certain level, the non-translucency of the NBG2 layer is almost not evident. |
fafling | Oct 25, 2019 | |||
I think it's still pretty obvious. |
paul_met | Oct 26, 2019 | |||
Okay. I noticed that when I switch Color Ram Mode = 0, the palette for only two layers deteriorates (NBG1 - text, NBG3 - dialog box). While the background palette (NBG0) and color areas (NBG2) remain the same. In addition, if you change bits 8 and 9 at the address 18000E, it turns out that the layers NBG0 and NBG2 use VRAM-A, but NBG1 and NBG3 use VRAM-B. How to make all layers use VRAM-A? |
fafling | Oct 26, 2019 | |||
The color RAM adresses used by a layer have nothing to do with where that layer is stored in VDP2 VRAM. CRAM addresses are determined by (p. 69-74, 76-78 and 216-217 of VDP2 manual) :
|
< Prev | 1 | 2 | 3 | Next> |