Moderators: pcwzrd13, deluxux, VasiliyRS
Xiden wrote:Do these backgrounds show up automatically once they are on the vmu?
mrneo240 wrote:your best bet is to not encode directly 565 but instead rgb565 vq4 with no mips
256x256 can be still fairly small
example of my usual 0GDTEX.PVR
if you want the image to be oriented correctly on the bottom plane, feel free to flip
image used:
BlueCrab wrote:In case someone is looking for the Gimp plugin that was mentioned on the first page of the topic, I dug it up off of the KOS website. You can find it here: http://gamedev.allusion.net/random/gimp ... -16.tar.gz
It probably won't be of much help at all, but I figured I'd mention it for completeness...
Code: Select all
Código:
/ * Simples RGB888 -> PVR RGB565 (RETÂNGULO) | <BR> 2019 * /
enum ImgDimension {
DIM_16X16 = 0x10,
DIM_32X32 = 0x20,
DIM_64X64 = 0x40,
DIM_128X128 = 0x80
};
void RGB888ToRGB565 (enum ImgDimension eImgDimension, uint8_t * pRGB888, uint8_t ** pRGB565, int * nRGB565Size) {
uint8_t GBIX_HEADER [] = {'G', 'B', 'Eu', 'X', 0x08, 0x00, 0x00, 0x00, 0x9A, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
uint8_t PVRT_HEADER [] = {'P', 'V', 'R', 'T', 0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x00, 0x00, eImgDimension, 0x00, eImgDimension, 0x00};
uint32_t nHdrSz = (tamanho de (GBIX_HEADER) + tamanho de (PVRT_HEADER));
uint32_t nImgSz = (2 * (eImgDimension * eImgDimension));
uint32_t nTmpSz = (nHdrSz + nImgSz);
uint8_t * pTmp = malloc (nTmpSz);
uint8_t * p = pTmp;
int i;
// define o tamanho dos dados da imagem
PVRT_HEADER [4] = (nImgSz & 0xFF);
PVRT_HEADER [5] = ((nImgSz >> 0x08) & 0xFF);
PVRT_HEADER [6] = ((nImgSz >> 0x10) & 0xFF);
PVRT_HEADER [7] = ((nImgSz >> 0x18) & 0xFF);
// copia o cabeçalho do GBIX
memmove (p, GBIX_HEADER, sizeof (GBIX_HEADER));
p + = sizeof (GBIX_HEADER);
// copia o cabeçalho do PVRT
memmove (p, PVRT_HEADER, sizeof (PVRT_HEADER));
p + = sizeof (PVRT_HEADER);
// faz a conversão
for (i = 0; i <(eImgDimension * eImgDimension); i ++) {
uint16_t nR = (((* pRGB888 ++ >> 3) & 0x1F) << 11);
uint16_t nG = (((* pRGB888 ++ >> 2) & 0x3F) << 5);
uint16_t nB = ((* pRGB888 ++ >> 3) e 0x1F);
uint16_t nRGB565 = (nR | nG | nB);
* p ++ = (nRGB565 e 0xFF);
* p ++ = ((nRGB565 >> 8) e 0xFF);
}
* nRGB565Size = nTmpSz;
* pRGB565 = pTmp;
}
Return to “New Releases/Homebrew/Emulation”
Users browsing this forum: No registered users