From 5e450063fbe25926ae50d569c285db428055318a Mon Sep 17 00:00:00 2001 From: João Silva Date: Mon, 14 Aug 2017 06:03:05 +0100 Subject: Deleted several unused variables, code and files. --- source/dsp2emu.c | 58 +++++++++----------------------------------------------- 1 file changed, 9 insertions(+), 49 deletions(-) (limited to 'source/dsp2emu.c') diff --git a/source/dsp2emu.c b/source/dsp2emu.c index 9e3e137..4e22d54 100644 --- a/source/dsp2emu.c +++ b/source/dsp2emu.c @@ -8,7 +8,7 @@ bool DSP2Op06HasLen = false; int32_t DSP2Op06Len = 0; uint8_t DSP2Op05Transparent = 0; -void DSP2_Op05() +void DSP2_Op05(void) { uint8_t color; // Overlay bitmap with transparency. @@ -49,16 +49,14 @@ void DSP2_Op05() { c1 = *p1++; c2 = *p2++; - *p3++ = (((c2 >> 4) == color) ? c1 & 0xf0 : c2 & 0xf0) | - (((c2 & 0x0f) == color) ? c1 & 0x0f : c2 & 0x0f); + *p3++ = (((c2 >> 4) == color) ? c1 & 0xf0 : c2 & 0xf0) | (((c2 & 0x0f) == color) ? c1 & 0x0f : c2 & 0x0f); } } -void DSP2_Op01() +void DSP2_Op01(void) { // Op01 size is always 32 bytes input and output. // The hardware does strange things if you vary the size. - int32_t j; uint8_t c0, c1, c2, c3; uint8_t* p1 = DSP1.parameters; @@ -66,55 +64,20 @@ void DSP2_Op01() uint8_t* p2b = &DSP1.output[16]; // halfway // Process 8 blocks of 4 bytes each - for (j = 0; j < 8; j++) { c0 = *p1++; c1 = *p1++; c2 = *p1++; c3 = *p1++; - - *p2a++ = (c0 & 0x10) << 3 | - (c0 & 0x01) << 6 | - (c1 & 0x10) << 1 | - (c1 & 0x01) << 4 | - (c2 & 0x10) >> 1 | - (c2 & 0x01) << 2 | - (c3 & 0x10) >> 3 | - (c3 & 0x01); - - *p2a++ = (c0 & 0x20) << 2 | - (c0 & 0x02) << 5 | - (c1 & 0x20) | - (c1 & 0x02) << 3 | - (c2 & 0x20) >> 2 | - (c2 & 0x02) << 1 | - (c3 & 0x20) >> 4 | - (c3 & 0x02) >> 1; - - *p2b++ = (c0 & 0x40) << 1 | - (c0 & 0x04) << 4 | - (c1 & 0x40) >> 1 | - (c1 & 0x04) << 2 | - (c2 & 0x40) >> 3 | - (c2 & 0x04) | - (c3 & 0x40) >> 5 | - (c3 & 0x04) >> 2; - - - *p2b++ = (c0 & 0x80) | - (c0 & 0x08) << 3 | - (c1 & 0x80) >> 2 | - (c1 & 0x08) << 1 | - (c2 & 0x80) >> 4 | - (c2 & 0x08) >> 1 | - (c3 & 0x80) >> 6 | - (c3 & 0x08) >> 3; + *p2a++ = (c0 & 0x10) << 3 | (c0 & 0x01) << 6 | (c1 & 0x10) << 1 | (c1 & 0x01) << 4 | (c2 & 0x10) >> 1 | (c2 & 0x01) << 2 | (c3 & 0x10) >> 3 | (c3 & 0x01); + *p2a++ = (c0 & 0x20) << 2 | (c0 & 0x02) << 5 | (c1 & 0x20) | (c1 & 0x02) << 3 | (c2 & 0x20) >> 2 | (c2 & 0x02) << 1 | (c3 & 0x20) >> 4 | (c3 & 0x02) >> 1; + *p2b++ = (c0 & 0x40) << 1 | (c0 & 0x04) << 4 | (c1 & 0x40) >> 1 | (c1 & 0x04) << 2 | (c2 & 0x40) >> 3 | (c2 & 0x04) | (c3 & 0x40) >> 5 | (c3 & 0x04) >> 2; + *p2b++ = (c0 & 0x80) | (c0 & 0x08) << 3 | (c1 & 0x80) >> 2 | (c1 & 0x08) << 1 | (c2 & 0x80) >> 4 | (c2 & 0x08) >> 1 | (c3 & 0x80) >> 6 | (c3 & 0x08) >> 3; } - return; } -void DSP2_Op06() +void DSP2_Op06(void) { // Input: // size @@ -131,13 +94,10 @@ int32_t DSP2Op0DOutLen = 0; int32_t DSP2Op0DInLen = 0; // Scale bitmap based on input length out output length - -void DSP2_Op0D() +void DSP2_Op0D(void) { // (Modified) Overload's algorithm - int32_t i; - for(i = 0 ; i < DSP2Op0DOutLen ; i++) { int32_t j = i << 1; -- cgit v1.2.3