Enable VMU support by default.
Fake Bump Mapping handling until we take the time to do it fast+properly.
This commit is contained in:
parent
1a4801b569
commit
183d08a922
|
@ -4,6 +4,7 @@
|
|||
#include "maple_devs.h"
|
||||
#include "maple_cfg.h"
|
||||
|
||||
#define HAS_VMU
|
||||
/*
|
||||
bus_x=0{p0=1{config};p1=2{config};config;}
|
||||
Plugins:
|
||||
|
|
|
@ -15,6 +15,7 @@ const char* maple_sega_mic_name = "MicDevice for Dreameye";
|
|||
|
||||
const char* maple_sega_brand = "Produced By or Under License From SEGA ENTERPRISES,LTD.";
|
||||
|
||||
#define HAS_VMU
|
||||
|
||||
enum MapleFunctionID
|
||||
{
|
||||
|
|
|
@ -182,6 +182,14 @@ pixelcvt_next(convYUV_PL,4,1)
|
|||
//1,0
|
||||
pb->prel(3,YUV422<PixelPacker>(Y1,Yu,Yv));
|
||||
}
|
||||
pixelcvt_next(convBMP_PL,4,1)
|
||||
{
|
||||
u16* p_in=(u16*)data;
|
||||
pb->prel(0,ARGB8888(p_in[0]));
|
||||
pb->prel(1,ARGB8888(p_in[1]));
|
||||
pb->prel(2,ARGB8888(p_in[2]));
|
||||
pb->prel(3,ARGB8888(p_in[3]));
|
||||
}
|
||||
pixelcvt_end;
|
||||
//twiddled
|
||||
pixelcvt_start(conv565_TW,2,2)
|
||||
|
@ -252,6 +260,14 @@ pixelcvt_next(convYUV_TW,2,2)
|
|||
//1,1
|
||||
pb->prel(1,1,YUV422<PixelPacker>(Y1,Yu,Yv));
|
||||
}
|
||||
pixelcvt_next(convBMP_TW,2,2)
|
||||
{
|
||||
u16* p_in=(u16*)data;
|
||||
pb->prel(0,0,ARGB8888(p_in[0]));
|
||||
pb->prel(0,1,ARGB8888(p_in[1]));
|
||||
pb->prel(1,0,ARGB8888(p_in[2]));
|
||||
pb->prel(1,1,ARGB8888(p_in[3]));
|
||||
}
|
||||
pixelcvt_end;
|
||||
|
||||
pixelcvt_start(convPAL4_TW,4,4)
|
||||
|
@ -377,12 +393,14 @@ template void texture_PL<conv565_PL<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width
|
|||
template void texture_PL<conv1555_PL<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_PL<conv4444_PL<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_PL<convYUV_PL<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_PL<convBMP_PL<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
|
||||
//twiddled formats !
|
||||
template void texture_TW<conv565_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_TW<conv1555_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_TW<conv4444_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_TW<convYUV_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_TW<convBMP_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
|
||||
template void texture_TW<convPAL4_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_TW<convPAL8_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
|
@ -392,18 +410,21 @@ template void texture_VQ<conv565_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width
|
|||
template void texture_VQ<conv1555_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_VQ<conv4444_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_VQ<convYUV_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
template void texture_VQ<convBMP_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
|
||||
//Planar
|
||||
#define tex565_PL texture_PL<conv565_PL<pp_565> >
|
||||
#define tex1555_PL texture_PL<conv1555_PL<pp_565> >
|
||||
#define tex4444_PL texture_PL<conv4444_PL<pp_565> >
|
||||
#define texYUV422_PL texture_PL<convYUV_PL<pp_565> >
|
||||
#define texBMP_PL texture_PL<convBMP_PL<pp_565> >
|
||||
|
||||
//Twiddle
|
||||
#define tex565_TW texture_TW<conv565_TW<pp_565> >
|
||||
#define tex1555_TW texture_TW<conv1555_TW<pp_565> >
|
||||
#define tex4444_TW texture_TW<conv4444_TW<pp_565> >
|
||||
#define texYUV422_TW texture_TW<convYUV_TW<pp_565> >
|
||||
#define texBMP_TW texture_TW<convBMP_TW<pp_565> >
|
||||
#define texPAL4_TW texture_TW<convPAL4_TW<pp_565> >
|
||||
#define texPAL8_TW texture_TW<convPAL8_TW<pp_565> >
|
||||
|
||||
|
@ -412,6 +433,7 @@ template void texture_VQ<convYUV_TW<pp_565> >(PixelBuffer* pb,u8* p_in,u32 Width
|
|||
#define tex1555_VQ texture_VQ<conv1555_TW<pp_565> >
|
||||
#define tex4444_VQ texture_VQ<conv4444_TW<pp_565> >
|
||||
#define texYUV422_VQ texture_VQ<convYUV_TW<pp_565> >
|
||||
#define texBMP_VQ texture_VQ<convBMP_TW<pp_565> >
|
||||
|
||||
void texture_PAL4(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
void texture_PAL8(PixelBuffer* pb,u8* p_in,u32 Width,u32 Height);
|
||||
|
|
|
@ -40,7 +40,7 @@ PvrTexInfo format[8]=
|
|||
{"565", 16,GL_UNSIGNED_SHORT_5_6_5, &tex565_PL,&tex565_TW,&tex565_VQ}, //565
|
||||
{"4444", 16,GL_UNSIGNED_SHORT_4_4_4_4, &tex4444_PL,&tex4444_TW,&tex4444_VQ}, //4444
|
||||
{"yuv", 16,GL_UNSIGNED_SHORT_5_6_5, &texYUV422_PL,&texYUV422_TW,&texYUV422_VQ}, //yuv
|
||||
{"ns/bump", 0}, //ns
|
||||
{"UNSUPPORTED BUMP MAPPED POLY", 16,GL_UNSIGNED_SHORT_4_4_4_4,&texBMP_PL,&texBMP_TW,&texBMP_VQ}, //bump_ns
|
||||
{"pal4", 4,0,0,texPAL4_TW,0}, //pal4
|
||||
{"pla8", 8,0,0,texPAL8_TW,0}, //pal8
|
||||
{"ns/1555", 0}, //ns, 1555
|
||||
|
@ -191,6 +191,7 @@ struct TextureCacheData
|
|||
case 1: //1 565 R value: 5 bits; G value: 6 bits; B value: 5 bits
|
||||
case 2: //2 4444 value: 4 bits; RGB values: 4 bits each
|
||||
case 3: //3 YUV422 32 bits per 2 pixels; YUYV values: 8 bits each
|
||||
case 4: //4 -NOT_PROPERLY SUPPORTED- Bump Map 16 bits/pixel; S value: 8 bits; R value: 8 bits -NOT_PROPERLY SUPPORTED-
|
||||
case 5: //5 4 BPP Palette Palette texture with 4 bits/pixel
|
||||
case 6: //6 8 BPP Palette Palette texture with 8 bits/pixel
|
||||
if (tcw.ScanOrder && tex->PL)
|
||||
|
@ -229,9 +230,6 @@ struct TextureCacheData
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//4 Bump Map 16 bits/pixel; S value: 8 bits; R value: 8 bits
|
||||
//Bump maps are not supported for now
|
||||
default:
|
||||
printf("Unhandled texture %d\n",tcw.PixelFmt);
|
||||
size=w*h*2;
|
||||
|
|
Loading…
Reference in New Issue