Skip to content

Commit

Permalink
- Fix 540p and 1080i video timings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Jul 28, 2019
1 parent 3e1144f commit 0948c79
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions cube/swiss/source/patcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -1425,8 +1425,8 @@ u8 video_timing[] = {
};

u8 video_timing_540p60[] = {
0x07,0x00,0x02,0x1C,
0x00,0x19,0x00,0x19,
0x0A,0x00,0x02,0x1C,
0x00,0x10,0x00,0x10,
0x00,0x00,0x00,0x00,
0x28,0x28,0x28,0x28,
0x04,0x60,0x04,0x60,
Expand All @@ -1438,8 +1438,8 @@ u8 video_timing_540p60[] = {
};

u8 video_timing_1080i60[] = {
0x07,0x00,0x02,0x1C,
0x00,0x17,0x00,0x18,
0x05,0x00,0x02,0x1C,
0x00,0x1D,0x00,0x1E,
0x00,0x01,0x00,0x00,
0x28,0x29,0x28,0x29,
0x04,0x60,0x04,0x5F,
Expand Down Expand Up @@ -1487,8 +1487,8 @@ u8 video_timing_ntsc50[] = {
};

u8 video_timing_540p50[] = {
0x07,0x00,0x02,0x1C,
0x00,0x19,0x00,0x19,
0x0A,0x00,0x02,0x1C,
0x00,0x10,0x00,0x10,
0x00,0x00,0x00,0x00,
0x28,0x28,0x28,0x28,
0x04,0x60,0x04,0x60,
Expand All @@ -1500,8 +1500,8 @@ u8 video_timing_540p50[] = {
};

u8 video_timing_1080i50[] = {
0x07,0x00,0x02,0x1C,
0x00,0x17,0x00,0x18,
0x05,0x00,0x02,0x1C,
0x00,0x1D,0x00,0x1E,
0x00,0x01,0x00,0x00,
0x28,0x29,0x28,0x29,
0x04,0x60,0x04,0x5F,
Expand Down Expand Up @@ -2971,8 +2971,9 @@ void Patch_VideoMode(u32 *data, u32 length, int dataType)
data[i + 192] = 0x7C090050; // sub r0, r0, r9
data[i + 313] = 0x801C0000; // lwz r0, 0 (r28)
data[i + 315] = 0x28000002; // cmplwi r0, 2
data[i + 317] = 0x28000003; // cmplwi r0, 3
data[i + 319] = 0x28000002; // cmplwi r0, 2
data[i + 316] = 0x41800020; // blt +8
data[i + 317] = 0x28000002; // cmplwi r0, 2
data[i + 319] = 0x28000003; // cmplwi r0, 3
data[i + 506] = 0xA8730000; // lha r3, 0 (r19)
data[i + 516] = branchAndLink(VIConfigureHook2, VIConfigure + 516);
break;
Expand All @@ -2989,8 +2990,9 @@ void Patch_VideoMode(u32 *data, u32 length, int dataType)
data[i + 234] = 0x7D9A6050; // sub r12, r12, r26
data[i + 332] = 0x815D0024; // lwz r10, 36 (r29)
data[i + 336] = 0x280A0002; // cmplwi r10, 2
data[i + 343] = 0x280A0003; // cmplwi r10, 3
data[i + 345] = 0x280A0002; // cmplwi r10, 2
data[i + 342] = 0x41800020; // blt +8
data[i + 343] = 0x280A0002; // cmplwi r10, 2
data[i + 345] = 0x280A0003; // cmplwi r10, 3
data[i + 542] = 0xA87E000A; // lha r3, 10 (r30)
data[i + 552] = branchAndLink(VIConfigureHook2, VIConfigure + 552);
break;
Expand Down

0 comments on commit 0948c79

Please sign in to comment.