Annotation of hatari/src/convert/high640x8.c, revision 1.1.1.7

1.1.1.5   root        1: /*
                      2:   Hatari - high640x8.c
1.1       root        3: 
1.1.1.5   root        4:   This file is distributed under the GNU Public License, version 2 or at your
                      5:   option any later version. Read the file gpl.txt for details.
1.1.1.2   root        6: 
1.1.1.5   root        7:   Screen Conversion, High Res to 640x8Bit
1.1       root        8: */
                      9: 
1.1.1.2   root       10: 
1.1.1.5   root       11: static void ConvertHighRes_640x8Bit(void)
                     12: {
                     13:        Uint16 *edi, *ebp;
                     14:        Uint32 *esi;
                     15:        Uint16 eax, ebx;
                     16:        int y, x, update;
                     17: 
                     18:        edi = (Uint16 *)pSTScreen;        /* ST format screen */
                     19:        ebp = (Uint16 *)pSTScreenCopy;    /* Previous ST format screen */
                     20:        esi = (Uint32 *)pPCScreenDest;    /* PC format screen */
                     21: 
                     22:        /* NOTE 'ScrUpdateFlag' is already set (to full update or check, no palettes) */
                     23:        update = ScrUpdateFlag & PALETTEMASK_UPDATEMASK;
                     24: 
                     25:        for (y = STScreenStartHorizLine; y < STScreenEndHorizLine; y++)
                     26:        {
                     27: 
                     28:                for (x = 0; x < 40; x++)
                     29:                {
                     30: 
                     31:                        /* Do 16 pixels at one time */
                     32:                        ebx = *edi;
                     33: 
                     34:                        if (update || ebx != *ebp)  /* Does differ? */
                     35:                        {
1.1.1.6   root       36:                                bScreenContentsChanged = true;
1.1.1.2   root       37: 
                     38: #if SDL_BYTEORDER == SDL_BIG_ENDIAN
1.1.1.5   root       39:                                /* Plot in 'right-order' on big endian systems */
1.1.1.7 ! root       40:                                HIGH_BUILD_PIXELS_0 ;               /* Generate pixels [12,13,14,15] */
1.1.1.5   root       41:                                PLOT_HIGH_640_8BIT(3) ;
1.1.1.7 ! root       42:                                HIGH_BUILD_PIXELS_1 ;               /* Generate pixels [8,9,10,11] */
1.1.1.5   root       43:                                PLOT_HIGH_640_8BIT(2) ;
1.1.1.7 ! root       44:                                HIGH_BUILD_PIXELS_2 ;               /* Generate pixels [4,5,6,7] */
1.1.1.5   root       45:                                PLOT_HIGH_640_8BIT(1) ;
1.1.1.7 ! root       46:                                HIGH_BUILD_PIXELS_3 ;               /* Generate pixels [0,1,2,3] */
1.1.1.5   root       47:                                PLOT_HIGH_640_8BIT(0) ;
1.1.1.2   root       48: #else
1.1.1.5   root       49:                                /* Plot in 'wrong-order', as ebx is 68000 endian */
                     50:                                HIGH_BUILD_PIXELS_0 ;               /* Generate pixels [4,5,6,7] */
                     51:                                PLOT_HIGH_640_8BIT(1) ;
                     52:                                HIGH_BUILD_PIXELS_1 ;               /* Generate pixels [0,1,2,3] */
                     53:                                PLOT_HIGH_640_8BIT(0) ;
                     54:                                HIGH_BUILD_PIXELS_2 ;               /* Generate pixels [12,13,14,15] */
                     55:                                PLOT_HIGH_640_8BIT(3) ;
                     56:                                HIGH_BUILD_PIXELS_3 ;               /* Generate pixels [8,9,10,11] */
                     57:                                PLOT_HIGH_640_8BIT(2) ;
1.1.1.2   root       58: #endif
1.1.1.5   root       59:                        }
1.1.1.2   root       60: 
1.1.1.5   root       61:                        esi += 4;                               /* Next PC pixels */
                     62:                        edi += 1;                               /* Next ST pixels */
                     63:                        ebp += 1;                               /* Next ST copy pixels */
                     64:                }
1.1.1.2   root       65: 
1.1.1.5   root       66:                /*??  esi = esi -40*8 +PCScreenBytesPerLine/2;*/   /* Back to start of line + Offset to next line */
                     67:        }
1.1       root       68: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.