mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
Fix video mode patching
This commit is contained in:
parent
214c50c19a
commit
caa01d15b4
@ -6,15 +6,16 @@
|
||||
#include <types.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof a / sizeof a[0])
|
||||
/*
|
||||
GXRModeObj TVPal528Prog =
|
||||
{
|
||||
|
||||
// viYOrigin is calculated as (576 - 528)/2 in libogc 2.0.0 for the following render modes.
|
||||
// But we need to use (574 - 528)/2 so that the render modes match the Revolution SDK.
|
||||
static GXRModeObj TVPal528Prog_RVL = {
|
||||
6, // viDisplayMode
|
||||
640, // fbWidth
|
||||
528, // efbHeight
|
||||
528, // xfbHeight
|
||||
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
|
||||
(VI_MAX_HEIGHT_PAL - 528)/2, // viYOrigin
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
@ -23,10 +24,10 @@ GXRModeObj TVPal528Prog =
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6,6},{6,6},{6,6}, // pix 1
|
||||
{6,6},{6,6},{6,6}, // pix 2
|
||||
{6,6},{6,6},{6,6} // pix 3
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
@ -39,17 +40,15 @@ GXRModeObj TVPal528Prog =
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
GXRModeObj TVPal528ProgSoft =
|
||||
{
|
||||
static GXRModeObj TVPal528ProgSoft_RVL = {
|
||||
6, // viDisplayMode
|
||||
640, // fbWidth
|
||||
528, // efbHeight
|
||||
528, // xfbHeight
|
||||
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
|
||||
(VI_MAX_HEIGHT_PAL - 528)/2, // viYOrigin
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
@ -58,10 +57,10 @@ GXRModeObj TVPal528ProgSoft =
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6,6},{6,6},{6,6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6,6},{6,6},{6,6}, // pix 1
|
||||
{6,6},{6,6},{6,6}, // pix 2
|
||||
{6,6},{6,6},{6,6} // pix 3
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
@ -74,17 +73,15 @@ GXRModeObj TVPal528ProgSoft =
|
||||
8, // line n+1
|
||||
8 // line n+1
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
GXRModeObj TVPal524ProgAa =
|
||||
{
|
||||
static GXRModeObj TVPal524ProgAa_RVL = {
|
||||
6, // viDisplayMode
|
||||
640, // fbWidth
|
||||
264, // efbHeight
|
||||
524, // xfbHeight
|
||||
(VI_MAX_WIDTH_PAL - 640)/2, // viXOrigin
|
||||
(VI_MAX_HEIGHT_PAL - 528)/2, // viYOrigin
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
524, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
@ -93,10 +90,10 @@ GXRModeObj TVPal524ProgAa =
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3,2},{9,6},{3,10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3,2},{9,6},{3,10}, // pix 1
|
||||
{9,2},{3,6},{9,10}, // pix 2
|
||||
{9,2},{3,6},{9,10} // pix 3
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
@ -109,10 +106,505 @@ GXRModeObj TVPal524ProgAa =
|
||||
8, // line n+1
|
||||
4 // line n+1
|
||||
}
|
||||
|
||||
};
|
||||
*/
|
||||
static GXRModeObj* vmodes[] = {
|
||||
|
||||
static GXRModeObj TVPal528Int_RVL = {
|
||||
4, // viDisplayMode
|
||||
640, // fbWidth
|
||||
528, // efbHeight
|
||||
528, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_DF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVPal528IntDf_RVL = {
|
||||
4, // viDisplayMode
|
||||
640, // fbWidth
|
||||
528, // efbHeight
|
||||
528, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_DF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
8, // line n-1
|
||||
8, // line n-1
|
||||
10, // line n
|
||||
12, // line n
|
||||
10, // line n
|
||||
8, // line n+1
|
||||
8 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVEurgb60Hz480Prog_RVL = {
|
||||
22, // viDisplayMode
|
||||
640, // fbWidth
|
||||
480, // efbHeight
|
||||
480, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVEurgb60Hz480ProgSoft_RVL = {
|
||||
22, // viDisplayMode
|
||||
640, // fbWidth
|
||||
480, // efbHeight
|
||||
480, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
8, // line n-1
|
||||
8, // line n-1
|
||||
10, // line n
|
||||
12, // line n
|
||||
10, // line n
|
||||
8, // line n+1
|
||||
8 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVEurgb60Hz480ProgAa_RVL = {
|
||||
22, // viDisplayMode
|
||||
640, // fbWidth
|
||||
242, // efbHeight
|
||||
480, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_TRUE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
4, // line n-1
|
||||
8, // line n-1
|
||||
12, // line n
|
||||
16, // line n
|
||||
12, // line n
|
||||
8, // line n+1
|
||||
4 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVPal524IntAa_RVL = {
|
||||
4, // viDisplayMode
|
||||
640, // fbWidth
|
||||
264, // efbHeight
|
||||
524, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2 //574 instead of 576
|
||||
640, // viWidth
|
||||
524, // viHeight
|
||||
VI_XFBMODE_DF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_TRUE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
4, // line n-1
|
||||
8, // line n-1
|
||||
12, // line n
|
||||
16, // line n
|
||||
12, // line n
|
||||
8, // line n+1
|
||||
4 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVPal264Int_RVL = {
|
||||
4, // viDisplayMode
|
||||
640, // fbWidth
|
||||
264, // efbHeight
|
||||
264, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_TRUE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVPal264IntAa_RVL = {
|
||||
4, // viDisplayMode
|
||||
640, // fbWidth
|
||||
264, // efbHeight
|
||||
264, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
23, // viYOrigin (574 - 528)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_TRUE, // field_rendering
|
||||
GX_TRUE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVPal264Ds_RVL = {
|
||||
5, // viDisplayMode
|
||||
640, // fbWidth
|
||||
264, // efbHeight
|
||||
264, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
11, // viYOrigin (572/2 - 528/2)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVPal264DsAa_RVL = {
|
||||
5, // viDisplayMode
|
||||
640, // fbWidth
|
||||
264, // efbHeight
|
||||
264, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
11, // viYOrigin (572/2 - 528/2)/2
|
||||
640, // viWidth
|
||||
528, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_TRUE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVMpal240Int_RVL = {
|
||||
8, // viDisplayMode
|
||||
640, // fbWidth
|
||||
240, // efbHeight
|
||||
240, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_TRUE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static GXRModeObj TVMpal240IntAa_RVL = {
|
||||
8, // viDisplayMode
|
||||
640, // fbWidth
|
||||
240, // efbHeight
|
||||
240, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_TRUE, // field_rendering
|
||||
GX_TRUE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVMpal480Int_RVL = {
|
||||
8, // viDisplayMode
|
||||
640, // fbWidth
|
||||
480, // efbHeight
|
||||
480, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_DF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
0, // line n-1
|
||||
0, // line n-1
|
||||
21, // line n
|
||||
22, // line n
|
||||
21, // line n
|
||||
0, // line n+1
|
||||
0 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVMpal480ProgSoft_RVL = {
|
||||
10, // viDisplayMode
|
||||
640, // fbWidth
|
||||
480, // efbHeight
|
||||
480, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_FALSE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 1
|
||||
{6, 6}, {6, 6}, {6, 6}, // pix 2
|
||||
{6, 6}, {6, 6}, {6, 6} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
8, // line n-1
|
||||
8, // line n-1
|
||||
10, // line n
|
||||
12, // line n
|
||||
10, // line n
|
||||
8, // line n+1
|
||||
8 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj TVMpal480ProgAa_RVL = {
|
||||
10, // viDisplayMode
|
||||
640, // fbWidth
|
||||
242, // efbHeight
|
||||
480, // xfbHeight
|
||||
40, // viXOrigin (720 - 640)/2
|
||||
0, // viYOrigin (480 - 480)/2
|
||||
640, // viWidth
|
||||
480, // viHeight
|
||||
VI_XFBMODE_SF, // xFBmode
|
||||
GX_FALSE, // field_rendering
|
||||
GX_TRUE, // aa
|
||||
|
||||
// sample points arranged in increasing Y order
|
||||
{
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 0, 3 sample points, 1/12 units, 4 bits each
|
||||
{3, 2}, {9, 6}, {3, 10}, // pix 1
|
||||
{9, 2}, {3, 6}, {9, 10}, // pix 2
|
||||
{9, 2}, {3, 6}, {9, 10} // pix 3
|
||||
},
|
||||
|
||||
// vertical filter[7], 1/64 units, 6 bits each
|
||||
{
|
||||
4, // line n-1
|
||||
8, // line n-1
|
||||
12, // line n
|
||||
16, // line n
|
||||
12, // line n
|
||||
8, // line n+1
|
||||
4 // line n+1
|
||||
}
|
||||
};
|
||||
|
||||
static GXRModeObj *vmodes[] = {
|
||||
&TVNtsc240Ds,
|
||||
&TVNtsc240DsAa,
|
||||
&TVNtsc240Int,
|
||||
@ -123,17 +615,26 @@ static GXRModeObj* vmodes[] = {
|
||||
&TVNtsc480Prog,
|
||||
&TVNtsc480ProgSoft,
|
||||
&TVNtsc480ProgAa,
|
||||
&TVMpal240Int_RVL,
|
||||
&TVMpal240IntAa_RVL,
|
||||
&TVMpal240Ds,
|
||||
&TVMpal240DsAa,
|
||||
&TVMpal480Int_RVL,
|
||||
&TVMpal480IntAa,
|
||||
&TVMpal480IntDf,
|
||||
&TVPal264Ds,
|
||||
&TVPal264DsAa,
|
||||
&TVPal264Int,
|
||||
&TVPal264IntAa,
|
||||
//&TVPal524ProgAa,
|
||||
&TVPal524IntAa,
|
||||
&TVPal528Int,
|
||||
&TVPal528IntDf,
|
||||
//&TVPal528Prog,
|
||||
//&TVPal528ProgSoft,
|
||||
&TVMpal480Prog,
|
||||
&TVMpal480ProgSoft_RVL,
|
||||
&TVMpal480ProgAa_RVL,
|
||||
&TVPal264Ds_RVL,
|
||||
&TVPal264DsAa_RVL,
|
||||
&TVPal264Int_RVL,
|
||||
&TVPal264IntAa_RVL,
|
||||
&TVPal524IntAa_RVL,
|
||||
&TVPal524ProgAa_RVL,
|
||||
&TVPal528Int_RVL,
|
||||
&TVPal528IntDf_RVL,
|
||||
&TVPal528Prog_RVL,
|
||||
&TVPal528ProgSoft_RVL,
|
||||
&TVPal576IntDfScale,
|
||||
&TVEurgb60Hz240Ds,
|
||||
&TVEurgb60Hz240DsAa,
|
||||
@ -142,9 +643,9 @@ static GXRModeObj* vmodes[] = {
|
||||
&TVEurgb60Hz480Int,
|
||||
&TVEurgb60Hz480IntDf,
|
||||
&TVEurgb60Hz480IntAa,
|
||||
&TVEurgb60Hz480Prog,
|
||||
&TVEurgb60Hz480ProgSoft,
|
||||
&TVEurgb60Hz480ProgAa
|
||||
&TVEurgb60Hz480Prog_RVL,
|
||||
&TVEurgb60Hz480ProgSoft_RVL,
|
||||
&TVEurgb60Hz480ProgAa_RVL
|
||||
};
|
||||
|
||||
static bool compare_videomodes(GXRModeObj* mode1, GXRModeObj* mode2)
|
||||
@ -157,16 +658,27 @@ static void patch_videomode(GXRModeObj* mode1, GXRModeObj* mode2)
|
||||
memcpy(mode1, mode2, sizeof *mode1);
|
||||
}
|
||||
|
||||
static GXRModeObj* PAL2NTSC[]={
|
||||
static GXRModeObj* PAL2NTSC[] = {
|
||||
&TVMpal240Int_RVL, &TVNtsc240Int,
|
||||
&TVMpal240IntAa_RVL, &TVNtsc240IntAa,
|
||||
&TVMpal240Ds, &TVNtsc240Ds,
|
||||
&TVMpal240DsAa, &TVNtsc240DsAa,
|
||||
&TVMpal480Int_RVL, &TVNtsc480Int,
|
||||
&TVMpal480IntAa, &TVNtsc480IntAa,
|
||||
&TVMpal480IntDf, &TVNtsc480IntDf,
|
||||
&TVPal264Ds, &TVNtsc240Ds,
|
||||
&TVPal264DsAa, &TVNtsc240DsAa,
|
||||
&TVPal264Int, &TVNtsc240Int,
|
||||
&TVPal264IntAa, &TVNtsc240IntAa,
|
||||
&TVPal524IntAa, &TVNtsc480IntAa,
|
||||
&TVPal528Int, &TVNtsc480Int,
|
||||
&TVPal528IntDf, &TVNtsc480IntDf,
|
||||
&TVPal528Prog, &TVNtsc480Prog,
|
||||
&TVMpal480Prog, &TVNtsc480Prog,
|
||||
&TVMpal480ProgSoft_RVL, &TVNtsc480ProgSoft,
|
||||
&TVMpal480ProgAa_RVL, &TVNtsc480ProgAa,
|
||||
&TVPal264Ds_RVL, &TVNtsc240Ds,
|
||||
&TVPal264DsAa_RVL, &TVNtsc240DsAa,
|
||||
&TVPal264Int_RVL, &TVNtsc240Int,
|
||||
&TVPal264IntAa_RVL, &TVNtsc240IntAa,
|
||||
&TVPal524IntAa_RVL, &TVNtsc480IntAa,
|
||||
&TVPal524ProgAa_RVL, &TVNtsc480ProgAa,
|
||||
&TVPal528Int_RVL, &TVNtsc480Int,
|
||||
&TVPal528IntDf_RVL, &TVNtsc480IntDf,
|
||||
&TVPal528Prog_RVL, &TVNtsc480Prog,
|
||||
&TVPal528ProgSoft_RVL, &TVNtsc480ProgSoft,
|
||||
&TVPal576IntDfScale, &TVNtsc480IntDf,
|
||||
&TVEurgb60Hz240Ds, &TVNtsc240Ds,
|
||||
&TVEurgb60Hz240DsAa, &TVNtsc240DsAa,
|
||||
@ -175,33 +687,37 @@ static GXRModeObj* PAL2NTSC[]={
|
||||
&TVEurgb60Hz480Int, &TVNtsc480Int,
|
||||
&TVEurgb60Hz480IntDf, &TVNtsc480IntDf,
|
||||
&TVEurgb60Hz480IntAa, &TVNtsc480IntAa,
|
||||
&TVEurgb60Hz480Prog, &TVNtsc480Prog,
|
||||
&TVEurgb60Hz480ProgSoft,&TVNtsc480Prog,
|
||||
&TVEurgb60Hz480ProgAa, &TVNtsc480Prog,
|
||||
&TVEurgb60Hz480Prog_RVL, &TVNtsc480Prog,
|
||||
&TVEurgb60Hz480ProgSoft_RVL, &TVNtsc480ProgSoft,
|
||||
&TVEurgb60Hz480ProgAa_RVL, &TVNtsc480ProgAa,
|
||||
0,0
|
||||
};
|
||||
|
||||
static GXRModeObj* NTSC2PAL[]={
|
||||
&TVNtsc240Ds, &TVPal264Ds,
|
||||
&TVNtsc240DsAa, &TVPal264DsAa,
|
||||
&TVNtsc240Int, &TVPal264Int,
|
||||
&TVNtsc240IntAa, &TVPal264IntAa,
|
||||
&TVNtsc480Int, &TVPal528Int,
|
||||
&TVNtsc480IntDf, &TVPal528IntDf,
|
||||
&TVNtsc480IntAa, &TVPal524IntAa,
|
||||
&TVNtsc480Prog, &TVPal528Prog,
|
||||
static GXRModeObj* NTSC2PAL[] = {
|
||||
&TVNtsc240Ds, &TVPal264Ds_RVL,
|
||||
&TVNtsc240DsAa, &TVPal264DsAa_RVL,
|
||||
&TVNtsc240Int, &TVPal264Int_RVL,
|
||||
&TVNtsc240IntAa, &TVPal264IntAa_RVL,
|
||||
&TVNtsc480Int, &TVPal528Int_RVL,
|
||||
&TVNtsc480IntAa, &TVPal524IntAa_RVL,
|
||||
&TVNtsc480IntDf, &TVPal528IntDf_RVL,
|
||||
&TVNtsc480Prog, &TVPal528Prog_RVL,
|
||||
&TVNtsc480ProgSoft, &TVPal528ProgSoft_RVL,
|
||||
&TVNtsc480ProgAa, &TVPal524ProgAa_RVL,
|
||||
0,0
|
||||
};
|
||||
|
||||
static GXRModeObj* NTSC2PAL60[]={
|
||||
static GXRModeObj* NTSC2PAL60[] = {
|
||||
&TVNtsc240Ds, &TVEurgb60Hz240Ds,
|
||||
&TVNtsc240DsAa, &TVEurgb60Hz240DsAa,
|
||||
&TVNtsc240Int, &TVEurgb60Hz240Int,
|
||||
&TVNtsc240IntAa, &TVEurgb60Hz240IntAa,
|
||||
&TVNtsc480Int, &TVEurgb60Hz480Int,
|
||||
&TVNtsc480IntDf, &TVEurgb60Hz480IntDf,
|
||||
&TVNtsc480IntAa, &TVEurgb60Hz480IntAa,
|
||||
&TVNtsc480Prog, &TVEurgb60Hz480Prog,
|
||||
&TVNtsc480IntDf, &TVEurgb60Hz480IntDf,
|
||||
&TVNtsc480Prog, &TVEurgb60Hz480Prog_RVL,
|
||||
&TVNtsc480ProgSoft, &TVEurgb60Hz480ProgSoft_RVL,
|
||||
&TVNtsc480ProgAa, &TVEurgb60Hz480ProgAa_RVL,
|
||||
0,0
|
||||
};
|
||||
|
||||
@ -269,7 +785,7 @@ static bool Search_and_patch_Video_Modes(void *Address, u32 Size, GXRModeObj* Ta
|
||||
void patchVideoModes(void *dst, u32 len, int vidMode, GXRModeObj *vmode, int patchVidModes, u8 bootType)
|
||||
{
|
||||
GXRModeObj **table = 0;
|
||||
char region = *((char *)(0x80000003));
|
||||
char region = *(char *)0x80000003;
|
||||
|
||||
// Video patch set to "all" or the video mode is progressive and it's a PAL Wii game
|
||||
if((patchVidModes == 3 || (vidMode == 5 && region == 'P' && bootType == TYPE_WII_GAME)) && vmode != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user