--- previous/src/convert/high640x8.c 2018/04/24 19:25:10 1.1 +++ previous/src/convert/high640x8.c 2018/04/24 19:29:34 1.1.1.3 @@ -4,7 +4,7 @@ This file is distributed under the GNU Public License, version 2 or at your option any later version. Read the file gpl.txt for details. - Screen Conversion, High Res to 640x8Bit + NeXT mono, memory to SDL_Surface */ static inline void putpixel(SDL_Surface * surface, Uint16 x, Uint16 y, Uint32 col) @@ -72,31 +72,66 @@ static void ConvertHighRes_640x8Bit(void colors[x] = SDL_MapRGB(sdlscrn->format, sdlColors[x].r, sdlColors[x].g, sdlColors[x].b); } - for (y = 0; y < 832; y++) - { + if (ConfigureParams.System.bTurbo) { + for (y = 0; y < 832; y++) + { - for (x = 0; x < 1120; x++) + for (x = 0; x < 1120; x++) + { + switch (x&0x3) + { + case 0x0: + col=(NEXTVideo[(x/4)+y*280]&0xC0)>>6; + break; + case 0x1: + col=(NEXTVideo[(x/4)+y*280]&0x30)>>4; + break; + case 0x2: + col=(NEXTVideo[(x/4)+y*280]&0x0C)>>2; + break; + case 0x3: + col=(NEXTVideo[(x/4)+y*280]&0x03); + break; + } + /* Hack to provide video output on color systems to * + * do memory configuration experiments. Remove later */ + if (ConfigureParams.System.bColor) { + col = (NEXTColorVideo[(x*2)+(y*280*8)]&0x30)>>4; + } + /* --------------------------------------------------*/ + putpixel(sdlscrn,x,y,col); + } + } + } + else { + for (y = 0; y < 832; y++) { - switch (x&0x3) + + for (x = 0; x < 1120; x++) { - case 0x0: - col=(NEXTVideo[(x/4)+y*288]&0xC0)>>6; -// col=(NEXTVideo[(x/4)+y*280]&0xC0)>>6; - break; - case 0x1: - col=(NEXTVideo[(x/4)+y*288]&0x30)>>4; -// col=(NEXTVideo[(x/4)+y*280]&0x30)>>4; - break; - case 0x2: - col=(NEXTVideo[(x/4)+y*288]&0x0C)>>2; -// col=(NEXTVideo[(x/4)+y*280]&0x0C)>>2; - break; - case 0x3: - col=(NEXTVideo[(x/4)+y*288]&0x03); -// col=(NEXTVideo[(x/4)+y*280]&0x03); - break; + switch (x&0x3) + { + case 0x0: + col=(NEXTVideo[(x/4)+y*288]&0xC0)>>6; + break; + case 0x1: + col=(NEXTVideo[(x/4)+y*288]&0x30)>>4; + break; + case 0x2: + col=(NEXTVideo[(x/4)+y*288]&0x0C)>>2; + break; + case 0x3: + col=(NEXTVideo[(x/4)+y*288]&0x03); + break; + } + /* Hack to provide video output on color systems to * + * do memory configuration experiments. Remove later */ + if (ConfigureParams.System.bColor) { + col = (NEXTColorVideo[(x*2)+(y*288*8)]&0x30)>>4; + } + /* --------------------------------------------------*/ + putpixel(sdlscrn,x,y,col); } - putpixel(sdlscrn,x,y,col); } } }