VQ Framebuffer Article
-
- DC Developer
- Posts: 13
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Thu Apr 02, 2015 11:26 pm
- Has thanked: 15 times
- Been thanked: 6 times
VQ Framebuffer Article
Hey I just wanted to post this article I wrote for my blog about using a VQ Texture for emulation on the Dreamcast, based on my experience writing FrNES back in the day, and experimenting with an approach that TapamN mentioned in a 2 year old post that I read last week. It might be of interest to anyone writing code that produces procedural textures for the DC.
http://www.numechanix.com/blog/index.php/2015/10/03/20/
A code sample is presented at my github.
https://github.com/maslevin/dreamcast-samples
http://www.numechanix.com/blog/index.php/2015/10/03/20/
A code sample is presented at my github.
https://github.com/maslevin/dreamcast-samples
Re: VQ Framebuffer Article
Vq can be used with less than 16 bits btw
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
-
- DC Developer
- Posts: 13
- Joined: Thu Apr 02, 2015 11:26 pm
- Has thanked: 15 times
- Been thanked: 6 times
Re: VQ Framebuffer Article
Don't the paletted modes for VQ still require the image to be twiddled as well (because the bit flag for paletted modes is shared with the flag for image twiddling)?
Re: VQ Framebuffer Article
I've never tried that, so I'm not sure, sorry
However
So I'm not sure what you mean
However
Code: Select all
>>palette4 = 5 << 27
>>palette8 = 6 << 27
>>twid = 1 << 26
>>palette4 & twid
0
>>palette8 & twid
0
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: VQ Framebuffer Article
The bits for selecting the palette used overlap with the twiddled/strided bits. Thus, the hardware requires all paletted images to be twiddled.
-
- DCEmu Crazy Poster
- Posts: 28
- Joined: Wed Apr 23, 2014 3:04 pm
- Has thanked: 0
- Been thanked: 0
Re: VQ Framebuffer Article
anyone tested this on real Dreamcast ?
in DCDBSysArc990907E.doc §3.6.2 Texture Formats and §3.6.2.3 VQ Textures is clearly defined as subset of twiddled textures only, and only square.
I suppose even if it works it's kind of "undefined behaviour" case.
PS: if anyone interested - regular model of PowerVR2 chip, PMX1 aka Neon250, doesn't have onchip palette memory like DC's CLX2/Holly, so it have VQ-style paletted texture format instead. each element of codebook represents single A8R8G8B8 texel (last 32bits of code book entry not used). can be either twiddled or nontwiddled.
in DCDBSysArc990907E.doc §3.6.2 Texture Formats and §3.6.2.3 VQ Textures is clearly defined as subset of twiddled textures only, and only square.
I suppose even if it works it's kind of "undefined behaviour" case.
PS: if anyone interested - regular model of PowerVR2 chip, PMX1 aka Neon250, doesn't have onchip palette memory like DC's CLX2/Holly, so it have VQ-style paletted texture format instead. each element of codebook represents single A8R8G8B8 texel (last 32bits of code book entry not used). can be either twiddled or nontwiddled.
-
- DC Developer
- Posts: 13
- Joined: Thu Apr 02, 2015 11:26 pm
- Has thanked: 15 times
- Been thanked: 6 times
Re: VQ Framebuffer Article
Hey MetalliC,
I tested this on a real DC through the writing of the article and the associated research.
What you are referring to is an incomplete reference, as far as I am aware. I have found reference to the non-palleted VQ texture in the Kamui manual (although, no documentation of its byte-structure) so it's definitely a known aspect of the hardware, at least by the Katana SDK team.
Interesting point about the PMX1. I've often wondered if there are 32BPP modes/features of the PVR2 that we haven't yet discovered.
-Matt
I tested this on a real DC through the writing of the article and the associated research.
What you are referring to is an incomplete reference, as far as I am aware. I have found reference to the non-palleted VQ texture in the Kamui manual (although, no documentation of its byte-structure) so it's definitely a known aspect of the hardware, at least by the Katana SDK team.
Interesting point about the PMX1. I've often wondered if there are 32BPP modes/features of the PVR2 that we haven't yet discovered.
-Matt
-
- DCEmu Crazy Poster
- Posts: 28
- Joined: Wed Apr 23, 2014 3:04 pm
- Has thanked: 0
- Been thanked: 0
Re: VQ Framebuffer Article
Hi
Kamui docs more looks like edited Videologic's PVR2 user manual, there is no need to describe how thing works inside, but just how to use it.
in term of rendering features PMX1 core differs in a few things only, all in Texture Control Word:
- texture type 5 is 32bit B8G8R8A8 (you are looking for
- there is no onchip palette RAM, so no 4 or 8 BPP Palette textures (types 5 and 6 in CLX2)
- bit 21 enables "VQ palette" texture mode described in previous post.
its the only differences I've seen in games so far, but its possible there are more.
in my opinion, CLX2 may have some undocumented texturing-related things hidden only in TCW bits 21-24 (in the case of non palette textures only). so it seems unlikely.
great, thank you for making this clear.maslevin wrote: I tested this on a real DC through the writing of the article and the associated research.
indeed its not 100% complete, but this reference for internal Sega usage only, so it describes a lot of things in much much greater details than KatanaSDK docs.maslevin wrote: What you are referring to is an incomplete reference, as far as I am aware. I have found reference to the non-palleted VQ texture in the Kamui manual (although, no documentation of its byte-structure) so it's definitely a known aspect of the hardware, at least by the Katana SDK team.
Kamui docs more looks like edited Videologic's PVR2 user manual, there is no need to describe how thing works inside, but just how to use it.
sadly, I don't think its exists or can be enabled in CLX2.maslevin wrote: Interesting point about the PMX1. I've often wondered if there are 32BPP modes/features of the PVR2 that we haven't yet discovered.
in term of rendering features PMX1 core differs in a few things only, all in Texture Control Word:
- texture type 5 is 32bit B8G8R8A8 (you are looking for
- there is no onchip palette RAM, so no 4 or 8 BPP Palette textures (types 5 and 6 in CLX2)
- bit 21 enables "VQ palette" texture mode described in previous post.
its the only differences I've seen in games so far, but its possible there are more.
in my opinion, CLX2 may have some undocumented texturing-related things hidden only in TCW bits 21-24 (in the case of non palette textures only). so it seems unlikely.