Emulator Issues #2984
closedPlease fix graphic on Harvest moon a wonderful life
0%
Description
Please fix graphic on Harvest moon a wonderful life. The text on it is bad
Updated by smpbastos over 14 years ago
Glitch:
http://img25.imageshack.us/img25/4869/sdsdsm.jpg
http://img25.imageshack.us/img25/9283/sdsssg.jpg
[ -> ]Bumpity bump bumpbump....bump! Preggo sis is needed something to do and was hopin to find a fix for this game for her to keep her occupied and out of my hair so BUMP!
Been looking into this (graphical error - jumbled text) just a little bit today well actually quite a lot mainly because I figured it would be a simple fix. Well the first thing I did was to get into the actual font texture files on the disc. There was no problem there the image is crystal clear.
This leaves really only 2 other possible causes that would be an error in the Texture Decoding, or in the instruction from the game saying which part of the texture is each letter.
The font in this game is formated as RGB5A3 the rest of the textures other than the menu's are all CMBR format which is flawlessly decoded.
I am uncertain if its a problem in the TextureDecoder or in the instructions from the game telling the emu what part of the image = what letter.
If anyone knows about the decoder here is the code for the RGB5A3 section.
Code:
kernel void DecodeRGB5A3(global uchar *dst,
const global uchar *src, int width)
{
int x = get_global_id(0) * 4, y = get_global_id(1) * 4;
int srcOffset = x + (y * width) / 4;
for (int iy = 0; iy < 4; iy++)
{
ushort8 val = convert_ushort8(vload8(srcOffset, src));
ushort4 vs = val.odd | (ushort4)(val.even << (ushort4)8);
uchar16 resNoAlpha;
resNoAlpha.s26AE = convert_uchar4(vs >> (ushort4)7); // R
resNoAlpha.s159D = convert_uchar4(vs >> (ushort4)2); // G
resNoAlpha.s048C = convert_uchar4(vs << (ushort4)3); // B
resNoAlpha &= (uchar16)0xF8;
resNoAlpha |= (uchar16)(resNoAlpha >> (uchar16)5) & (uchar16)3; // 5 -> 8
resNoAlpha.s37BF = (uchar4)(0xFF);
uchar16 resAlpha;
resAlpha.s26AE = convert_uchar4(vs >> (ushort4)8); // R
resAlpha.s159D = convert_uchar4(vs >> (ushort4)4); // G
resAlpha.s048C = convert_uchar4(vs); // B
resAlpha &= (uchar16)0x0F;
resAlpha |= (resAlpha << (uchar16)4);
resAlpha.s37BF = convert_uchar4(vs >> (ushort4)7) & (uchar4)0xE0;
resAlpha.s37BF |= ((resAlpha.s37BF >> (uchar4)3) & (uchar4)0x1C)
| ((resAlpha.s37BF >> (uchar4)6) & (uchar4)0x3);
uchar16 choice = (uchar16)((uchar4)(vs.s0 >> 8),
(uchar4)(vs.s1 >> 8),
(uchar4)(vs.s2 >> 8),
(uchar4)(vs.s3 >> 8));
uchar16 res;
res = select(resAlpha, resNoAlpha, choice);
vstore16(res, 0, dst + ((y + iy) * width + x) * 4);
srcOffset++;
}
now in this here the following section looks off....
Code:
resAlpha.s26AE = convert_uchar4(vs >> (ushort4)8); // R
resAlpha.s159D = convert_uchar4(vs >> (ushort4)4); // G
resAlpha.s048C = convert_uchar4(vs); // B
However I am not a pro at it by any means. The file is located in */User/OpenCL for anyone who wants to tinker with it.
Ok I forgot where I was I ended up looking through some other files while writing. Anyways hope this helps.
For help in finding the cause of text error. Does anyone know what other games have a similar font bug. If so please tell me so I can confirm if its the same formatting. If so this may actually be the cause of it.
Updated by BhaaL over 14 years ago
Might be related to Issue 30, not merging since its still unclear if its the same issue, as STC does not work.
Updated by seapancake about 14 years ago
I can confirm this on both 2.0 and R6164, OpenCL makes no difference to the issue.