From 3b8323853f4eeddb61398e77c51bb2349f430227 Mon Sep 17 00:00:00 2001 From: João Silva Date: Sat, 14 Jan 2017 23:08:50 +0000 Subject: Removed a LOT of useless stuff. --- source/dsp2emu.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'source/dsp2emu.c') diff --git a/source/dsp2emu.c b/source/dsp2emu.c index 453ab6a..d5a9855 100644 --- a/source/dsp2emu.c +++ b/source/dsp2emu.c @@ -208,45 +208,3 @@ void DSP2_Op0D() } #endif - -#if 0 // Probably no reason to use this code - it's not quite bit accurate and it doesn't look as good as Overload's algorithm - -void DSP2_Op0D() -{ - // Float implementation of Neviksti's algorithm - // This is the right algorithm to match the DSP2 bits but the precision - // of the PC float does not match the precision of the fixed point math - // on the DSP2 causing occasional one off data mismatches (which should - // be no problem because its just a one pixel difference in a scaled image - // to be displayed). - - float multiplier; - float pixloc; - int i, j; - uint8_t pixelarray[512]; - - if (DSP2Op0DInLen <= DSP2Op0DOutLen) - multiplier = (float) 1.0; - else - multiplier = (float)((DSP2Op0DInLen * 2.0) / (DSP2Op0DOutLen * 2.0 + 1.0)); - - pixloc = 0.0; - for (i = 0; i < DSP2Op0DOutLen * 2; i++) - { - // j = (int)(i * multiplier); - j = (int) pixloc; - - if (j & 1) - pixelarray[i] = DSP1.parameters[j >> 1] & 0x0f; - else - pixelarray[i] = (DSP1.parameters[j >> 1] & 0xf0) >> 4; - - pixloc += multiplier; // use an add in the loop instead of multiply to increase loop speed - } - - for (i = 0; i < DSP2Op0DOutLen; i++) - DSP1.output[i] = (pixelarray[i << 1] << 4) | pixelarray[(i << 1) + 1]; -} - -#endif - -- cgit v1.2.3