| Home | Forums | What's new | Resources | |
| Some technical questions |
| RockinB - Aug 20, 2005 |
| RockinB | Aug 21, 2005 | ||
| Thanks for your response! So the upper and lower field just contain either even or odd lines. The double interlace mode should thus be high quality. But if the game does not run at 50/60 Hz this would mean the same image for even and odd lines for a couple of fields/frames. So using double interlace would be best at full speed. About using color calculations with character patterns made using a color lookup table....it could be possible, maybe. The 16 color lookup table is an excellent method for saving texture memory. AND for assigning different priorities and different color calculation registers for each single pixel in palette mode. I've once again read the CHROME demo of SGL. Indeed it does enable to put highlights into the interior of polygons, Which otherwise would only be possible by increasing polygon count. The author furthermore says, that it renders faster than in RGB mode. But I'm not sure if that's right and for what reason. Using this method is really crazy and difficult. I wonder if one could really efficiently exploit this, not only because of the lack of tools. | |||
| antime | Aug 22, 2005 | |||||||||
Yes, you have to pretty much design your game around never missing the frame buffer swap if you use that mode. Take a look at late 80s and early 90s DOS demos for examples of what you can do with palette manipulation. Could very well be, but depends on the internal design of VDP1. Using RGB textures you need to read two bytes per source pixel, but only one when using VDP2-palettized textures. VDP1-palettized textures would need three reads (index and colour definition). By the way, I checked with Charles MacDonald's VDP1 doc, and the shadow and half-transparency modes will not change palette values in the framebuffer. Instead, shadow will skip the pixel and half-transparency will write over it. | ||||||||||
| RockinB | Aug 22, 2005 | |||
| I could verify in the VDP1 manual that all color calculations can be done in color lookup table mode, too. This includes the palette gouraud shading tricks, although the manual says that the result cannot be guaranteed. Hopefully this doesn't mean that there are different VDP1 revisions with some of them acting different for this case. I'm interested in performance benchmarks of the different drawing modes to find an optimal solution. The only things I found are: - "shadow and half-transparency take 6 times longer, than without color calculation" - "pre clipping takes up to 5 CPU cycles per line"
So the only reason for speedup is due to reduced access to the VDP1 VRAM. BTW: This trick allows textured polygons by drawing non-textured polygons (further speedup), by using a palette code for polygon color + gouraud shading. But the restriction of the result is even bigger. <!--QuoteBegin-a ntime@Mon, 2005-08-22 @ 08:24 PM By the way, I checked with Charles MacDonald's VDP1 doc, and the shadow and half-transparency modes will not change palette values in the framebuffer. Instead, shadow will skip the pixel and half-transparency will write over it. [post=138578]Quoted post[/post] [/quote] Yes, that allows color calculations to be used on a framebuffer with mixed content, RGB and palette pixels. A quite usefull graphic can be found in the VDP1 manual, page 111. | ||||
| antime | Aug 23, 2005 | |||
Well, that's the best reason I can think of. The extra cost of shadow/half-transparency should give some idea about how much those avoided reads are worth. If VDP1 is smart about read texture values, it can save even more cycles by reading more than one source pixel at a time. Possibly it also reads the palette to an internal buffer which would mean a small fixed overhead but overall large savings for VDP1-textured parts. If you have the time and inclination you could try to measure the time needed to draw different texture formats. | ||||
| ExCyber | Aug 24, 2005 | |||
Isn't there one palette mode that actually uses a CLUT stored in VDP1 VRAM to render RGB to the framebuffer, allowing you to do both palettized textures and color calculation? I'm pretty sure I saw this somewhere... | ||||
| RockinB | Aug 24, 2005 | |||
| Questions remaining: How long is the V-Blank period? How long is the H-Blank period? BTW: it's goot to know that the clock speed of the VDP1, the CPU and maybe the whole system is significantly higher (> 28 MHz instead of < 27 MHz) when using horizontal resolution 352 or 704 instead of 320 or 640.
VDP1 supports color modes 16bit RGB and palette (stored inside VDP2). Additionally, VDP1 supports CLUT, which is a table in VDP1 VRAM with 16 entries each having 16 bits. In CLUT, the VDP1 DOES NOT CARE OF THE PIXEL FORMAT, it just writes it as is into the framebuffer (which is of interest for palette, read on). So the normal palette mode allows to set priority and VDP2 color calculation bits PER SPRITE, while the advantage of using a CLUT with palette entries is that it allows that PER PIXEL. Color calculations are possible on RGB mode and CLUT with table containing RGB pixels. As we know from the CHROME demo, it's possible to inperpolate palette indices using red gouraud shading in palette mode and in CLUT mode with table having palette entries. | ||||
| RockinB | Sep 5, 2005 | |||
Reading the DTS documents I've found some further statements about VDP1 drawing speeds:
BTW: I've just got SCU indirect DMA to work. | ||||
| antime | Sep 5, 2005 | |||
| Another quote, from Charles MacDonald's VDP1 hardware notes...: I assume that Charles' timings were performed with textured polygons. The difference in the performance hit could be explained by Sega's DTS using very small primitives, making the reading of the shading table a significant overhead, or some internal pipelining where the per-pixel calculation cost is absorbed by the cost of reading the source texels. It would however be slightly odd to use small polygons to test fillrate, so providing the DTS figure is correct I'm leaning towards the latter explanation. | ||||
| RockinB | Nov 25, 2005 | ||
| Here is a nice thing I discovered: Less restricted hires display: When using high resolution mode (horizontal resolution of 640 or 704) the VDP2 manual says you'll have to use NGB0 and NGB1 along with a couple of other restrictions. Well, I don't know if that is a translation error from japanese original (it would imply to be able to use not more than one NBG scroll), because it works with only one NGB, too. Isn't that cool? Another thing that's interesting: You can set different resolutions for VDP1 and VDP2. The most coolest about this is, that you are not forced to use a 8bpp palette only framebuffer for VDP1 when using hi res display. That's what all fighting games do. Question: There are 3 modes: non-interlaced, single interlaced and double interlaced. The SGL does not provide to set this explicitly, so it must be implied in some other settings like screen resolution. Anyone knows something about this? | |||