Add comments to prevent various warnings about falling through on case statements.

This commit is contained in:
Shanoah Alkire 2019-02-23 22:08:57 -08:00
parent 8e8598412d
commit 64ab2d53e1
5 changed files with 65 additions and 6 deletions

View File

@ -255,6 +255,7 @@ int get_macroblock_address_increment()
DUMPBITS(11); DUMPBITS(11);
return 0xb0022; return 0xb0022;
} }
// Fall through
default: default:
return 0;//error return 0;//error
@ -434,6 +435,7 @@ static bool get_intra_block()
ipu_cmd.pos[4] = 0; ipu_cmd.pos[4] = 0;
return true; return true;
} }
// Fall through
case 1: case 1:
{ {
@ -586,6 +588,7 @@ static bool get_non_intra_block(int * last)
ipu_cmd.pos[4] = 0; ipu_cmd.pos[4] = 0;
return true; return true;
} }
// Fall through
case 1: case 1:
if (!GETWORD()) if (!GETWORD())
@ -704,6 +707,7 @@ __fi bool mpeg2sliceIDEC()
ipuRegs.top = 0; ipuRegs.top = 0;
ipuRegs.ctrl.ECD = 0; ipuRegs.ctrl.ECD = 0;
// Fall through
case 1: case 1:
ipu_cmd.pos[0] = 1; ipu_cmd.pos[0] = 1;
@ -711,6 +715,7 @@ __fi bool mpeg2sliceIDEC()
{ {
return false; return false;
} }
// Fall through
case 2: case 2:
ipu_cmd.pos[0] = 2; ipu_cmd.pos[0] = 2;
@ -736,6 +741,7 @@ __fi bool mpeg2sliceIDEC()
decoder.coded_block_pattern = 0x3F;//all 6 blocks decoder.coded_block_pattern = 0x3F;//all 6 blocks
memzero_sse_a(mb8); memzero_sse_a(mb8);
memzero_sse_a(rgb32); memzero_sse_a(rgb32);
// Fall through
case 1: case 1:
ipu_cmd.pos[1] = 1; ipu_cmd.pos[1] = 1;
@ -760,30 +766,40 @@ __fi bool mpeg2sliceIDEC()
ipu_cmd.pos[2] = 1; ipu_cmd.pos[2] = 1;
return false; return false;
} }
// Fall through
case 2: case 2:
if (!slice_intra_DCT(0, (u8*)mb8.Y + 8, DCT_stride, ipu_cmd.pos[2] == 2)) if (!slice_intra_DCT(0, (u8*)mb8.Y + 8, DCT_stride, ipu_cmd.pos[2] == 2))
{ {
ipu_cmd.pos[2] = 2; ipu_cmd.pos[2] = 2;
return false; return false;
} }
// Fall through
case 3: case 3:
if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset, DCT_stride, ipu_cmd.pos[2] == 3)) if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset, DCT_stride, ipu_cmd.pos[2] == 3))
{ {
ipu_cmd.pos[2] = 3; ipu_cmd.pos[2] = 3;
return false; return false;
} }
// Fall through
case 4: case 4:
if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset + 8, DCT_stride, ipu_cmd.pos[2] == 4)) if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset + 8, DCT_stride, ipu_cmd.pos[2] == 4))
{ {
ipu_cmd.pos[2] = 4; ipu_cmd.pos[2] = 4;
return false; return false;
} }
// Fall through
case 5: case 5:
if (!slice_intra_DCT(1, (u8*)mb8.Cb, decoder_stride >> 1, ipu_cmd.pos[2] == 5)) if (!slice_intra_DCT(1, (u8*)mb8.Cb, decoder_stride >> 1, ipu_cmd.pos[2] == 5))
{ {
ipu_cmd.pos[2] = 5; ipu_cmd.pos[2] = 5;
return false; return false;
} }
// Fall through
case 6: case 6:
if (!slice_intra_DCT(2, (u8*)mb8.Cr, decoder_stride >> 1, ipu_cmd.pos[2] == 6)) if (!slice_intra_DCT(2, (u8*)mb8.Cr, decoder_stride >> 1, ipu_cmd.pos[2] == 6))
{ {
@ -805,6 +821,7 @@ __fi bool mpeg2sliceIDEC()
ipu_dither(rgb32, rgb16, decoder.dte); ipu_dither(rgb32, rgb16, decoder.dte);
decoder.SetOutputTo(rgb16); decoder.SetOutputTo(rgb16);
} }
// Fall through
case 2: case 2:
{ {
@ -822,6 +839,7 @@ __fi bool mpeg2sliceIDEC()
mbaCount = 0; mbaCount = 0;
} }
// Fall through
case 3: case 3:
while (1) while (1)
@ -847,7 +865,7 @@ __fi bool mpeg2sliceIDEC()
{ {
case 8: /* macroblock_escape */ case 8: /* macroblock_escape */
mbaCount += 33; mbaCount += 33;
/* pass through */ // Fall through
case 15: /* macroblock_stuffing (MPEG1 only) */ case 15: /* macroblock_stuffing (MPEG1 only) */
DUMPBITS(11); DUMPBITS(11);
@ -869,6 +887,7 @@ __fi bool mpeg2sliceIDEC()
decoder.dc_dct_pred[1] = decoder.dc_dct_pred[1] =
decoder.dc_dct_pred[2] = 128 << decoder.intra_dc_precision; decoder.dc_dct_pred[2] = 128 << decoder.intra_dc_precision;
} }
// Fall through
case 4: case 4:
if (!GETWORD()) if (!GETWORD())
@ -876,7 +895,6 @@ __fi bool mpeg2sliceIDEC()
ipu_cmd.pos[1] = 4; ipu_cmd.pos[1] = 4;
return false; return false;
} }
break; break;
jNO_DEFAULT; jNO_DEFAULT;
@ -885,9 +903,11 @@ __fi bool mpeg2sliceIDEC()
ipu_cmd.pos[1] = 0; ipu_cmd.pos[1] = 0;
ipu_cmd.pos[2] = 0; ipu_cmd.pos[2] = 0;
} }
// Fall through
finish_idec: finish_idec:
finishmpeg2sliceIDEC(); finishmpeg2sliceIDEC();
// Fall through
case 3: case 3:
{ {
@ -904,6 +924,7 @@ finish_idec:
ipuRegs.ctrl.SCD = 1; ipuRegs.ctrl.SCD = 1;
} }
} }
// Fall through
case 4: case 4:
if (!getBits32((u8*)&ipuRegs.top, 0)) if (!getBits32((u8*)&ipuRegs.top, 0))
@ -942,12 +963,15 @@ __fi bool mpeg2_slice()
ipuRegs.top = 0; ipuRegs.top = 0;
memzero_sse_a(mb8); memzero_sse_a(mb8);
memzero_sse_a(mb16); memzero_sse_a(mb16);
// Fall through
case 1: case 1:
if (!bitstream_init()) if (!bitstream_init())
{ {
ipu_cmd.pos[0] = 1; ipu_cmd.pos[0] = 1;
return false; return false;
} }
// Fall through
case 2: case 2:
ipu_cmd.pos[0] = 2; ipu_cmd.pos[0] = 2;
@ -969,36 +993,48 @@ __fi bool mpeg2_slice()
{ {
case 0: case 0:
decoder.coded_block_pattern = 0x3F; decoder.coded_block_pattern = 0x3F;
// Fall through
case 1: case 1:
if (!slice_intra_DCT(0, (u8*)mb8.Y, DCT_stride, ipu_cmd.pos[1] == 1)) if (!slice_intra_DCT(0, (u8*)mb8.Y, DCT_stride, ipu_cmd.pos[1] == 1))
{ {
ipu_cmd.pos[1] = 1; ipu_cmd.pos[1] = 1;
return false; return false;
} }
// Fall through
case 2: case 2:
if (!slice_intra_DCT(0, (u8*)mb8.Y + 8, DCT_stride, ipu_cmd.pos[1] == 2)) if (!slice_intra_DCT(0, (u8*)mb8.Y + 8, DCT_stride, ipu_cmd.pos[1] == 2))
{ {
ipu_cmd.pos[1] = 2; ipu_cmd.pos[1] = 2;
return false; return false;
} }
// Fall through
case 3: case 3:
if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset, DCT_stride, ipu_cmd.pos[1] == 3)) if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset, DCT_stride, ipu_cmd.pos[1] == 3))
{ {
ipu_cmd.pos[1] = 3; ipu_cmd.pos[1] = 3;
return false; return false;
} }
// Fall through
case 4: case 4:
if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset + 8, DCT_stride, ipu_cmd.pos[1] == 4)) if (!slice_intra_DCT(0, (u8*)mb8.Y + DCT_offset + 8, DCT_stride, ipu_cmd.pos[1] == 4))
{ {
ipu_cmd.pos[1] = 4; ipu_cmd.pos[1] = 4;
return false; return false;
} }
// Fall through
case 5: case 5:
if (!slice_intra_DCT(1, (u8*)mb8.Cb, decoder_stride >> 1, ipu_cmd.pos[1] == 5)) if (!slice_intra_DCT(1, (u8*)mb8.Cb, decoder_stride >> 1, ipu_cmd.pos[1] == 5))
{ {
ipu_cmd.pos[1] = 5; ipu_cmd.pos[1] = 5;
return false; return false;
} }
// Fall through
case 6: case 6:
if (!slice_intra_DCT(2, (u8*)mb8.Cr, decoder_stride >> 1, ipu_cmd.pos[1] == 6)) if (!slice_intra_DCT(2, (u8*)mb8.Cr, decoder_stride >> 1, ipu_cmd.pos[1] == 6))
{ {
@ -1044,6 +1080,8 @@ __fi bool mpeg2_slice()
{ {
case 0: case 0:
decoder.coded_block_pattern = get_coded_block_pattern(); // max 9bits decoder.coded_block_pattern = get_coded_block_pattern(); // max 9bits
// Fall through
case 1: case 1:
if (decoder.coded_block_pattern & 0x20) if (decoder.coded_block_pattern & 0x20)
{ {
@ -1053,6 +1091,8 @@ __fi bool mpeg2_slice()
return false; return false;
} }
} }
// Fall through
case 2: case 2:
if (decoder.coded_block_pattern & 0x10) if (decoder.coded_block_pattern & 0x10)
{ {
@ -1062,6 +1102,8 @@ __fi bool mpeg2_slice()
return false; return false;
} }
} }
// Fall through
case 3: case 3:
if (decoder.coded_block_pattern & 0x08) if (decoder.coded_block_pattern & 0x08)
{ {
@ -1071,6 +1113,8 @@ __fi bool mpeg2_slice()
return false; return false;
} }
} }
// Fall through
case 4: case 4:
if (decoder.coded_block_pattern & 0x04) if (decoder.coded_block_pattern & 0x04)
{ {
@ -1080,6 +1124,8 @@ __fi bool mpeg2_slice()
return false; return false;
} }
} }
// Fall through
case 5: case 5:
if (decoder.coded_block_pattern & 0x2) if (decoder.coded_block_pattern & 0x2)
{ {
@ -1089,6 +1135,8 @@ __fi bool mpeg2_slice()
return false; return false;
} }
} }
// Fall through
case 6: case 6:
if (decoder.coded_block_pattern & 0x1) if (decoder.coded_block_pattern & 0x1)
{ {
@ -1110,6 +1158,7 @@ __fi bool mpeg2_slice()
coded_block_pattern = decoder.coded_block_pattern; coded_block_pattern = decoder.coded_block_pattern;
decoder.SetOutputTo(mb16); decoder.SetOutputTo(mb16);
// Fall through
case 3: case 3:
{ {
@ -1127,6 +1176,7 @@ __fi bool mpeg2_slice()
mbaCount = 0; mbaCount = 0;
} }
// Fall through
case 4: case 4:
{ {
@ -1143,6 +1193,7 @@ __fi bool mpeg2_slice()
ipuRegs.ctrl.SCD = 1; ipuRegs.ctrl.SCD = 1;
} }
} }
// Fall through
case 5: case 5:
if (!getBits32((u8*)&ipuRegs.top, 0)) if (!getBits32((u8*)&ipuRegs.top, 0))

View File

@ -697,6 +697,7 @@ SIO_WRITE sioWriteMemcard(u8 data)
case 0x11: // On Boot/Probe case 0x11: // On Boot/Probe
case 0x12: // On Write/Delete/Recheck? case 0x12: // On Write/Delete/Recheck?
sio2.packet.recvVal3 = 0x8C; sio2.packet.recvVal3 = 0x8C;
// Fall through
case 0x81: // Checked right after copy/delete case 0x81: // Checked right after copy/delete
case 0xBF: // Wtf?? On game booting? case 0xBF: // Wtf?? On game booting?

View File

@ -495,9 +495,9 @@ template<int idx> static __fi int _vifCode_STColRow(const u32* data, u32* pmem2)
pxAssume(ret > 0); pxAssume(ret > 0);
switch (ret) { switch (ret) {
case 4: pmem2[3] = data[3]; case 4: pmem2[3] = data[3]; // Fall through
case 3: pmem2[2] = data[2]; case 3: pmem2[2] = data[2]; // Fall through
case 2: pmem2[1] = data[1]; case 2: pmem2[1] = data[1]; // Fall through
case 1: pmem2[0] = data[0]; case 1: pmem2[0] = data[0];
break; break;
jNO_DEFAULT jNO_DEFAULT

View File

@ -1048,15 +1048,19 @@ bool AppConfig::IsOkApplyPreset(int n, bool ignoreMTVU)
case 5: // Mostly Harmful case 5: // Mostly Harmful
isRateSet ? 0 : (isRateSet = true, EmuOptions.Speedhacks.EECycleRate = 1); // +1 EE cyclerate isRateSet ? 0 : (isRateSet = true, EmuOptions.Speedhacks.EECycleRate = 1); // +1 EE cyclerate
isSkipSet ? 0 : (isSkipSet = true, EmuOptions.Speedhacks.EECycleSkip = 1); // +1 EE cycle skip isSkipSet ? 0 : (isSkipSet = true, EmuOptions.Speedhacks.EECycleSkip = 1); // +1 EE cycle skip
// Fall through
case 4: // Very Aggressive case 4: // Very Aggressive
isRateSet ? 0 : (isRateSet = true, EmuOptions.Speedhacks.EECycleRate = -2); // -2 EE cyclerate isRateSet ? 0 : (isRateSet = true, EmuOptions.Speedhacks.EECycleRate = -2); // -2 EE cyclerate
// Fall through
case 3: // Aggressive case 3: // Aggressive
isRateSet ? 0 : (isRateSet = true, EmuOptions.Speedhacks.EECycleRate = -1); // -1 EE cyclerate isRateSet ? 0 : (isRateSet = true, EmuOptions.Speedhacks.EECycleRate = -1); // -1 EE cyclerate
// Fall through
case 2: // Balanced case 2: // Balanced
isMTVUSet ? 0 : (isMTVUSet = true, EmuOptions.Speedhacks.vuThread = true); // Enable MTVU isMTVUSet ? 0 : (isMTVUSet = true, EmuOptions.Speedhacks.vuThread = true); // Enable MTVU
// Fall through
case 1: // Safe (Default) case 1: // Safe (Default)
EmuOptions.Speedhacks.IntcStat = true; EmuOptions.Speedhacks.IntcStat = true;
@ -1065,6 +1069,7 @@ bool AppConfig::IsOkApplyPreset(int n, bool ignoreMTVU)
// If waterfalling from > Safe, break to avoid MTVU disable. // If waterfalling from > Safe, break to avoid MTVU disable.
if (n > 1) break; if (n > 1) break;
// Fall through
case 0: // Safest case 0: // Safest
isMTVUSet ? 0 : (isMTVUSet = true, EmuOptions.Speedhacks.vuThread = false); // Disable MTVU isMTVUSet ? 0 : (isMTVUSet = true, EmuOptions.Speedhacks.vuThread = false); // Disable MTVU

View File

@ -1250,6 +1250,8 @@ u8 CALLBACK PADpoll(u8 value)
DEBUG_OUT(0xF3); DEBUG_OUT(0xF3);
return 0xF3; return 0xF3;
} }
// Fall through
// READ_DATA_AND_VIBRATE // READ_DATA_AND_VIBRATE
case 0x42: case 0x42:
query.response[2] = 0x5A; query.response[2] = 0x5A;