Annotation of hatari/src/convert/vdi4.c, revision 1.1.1.3

1.1.1.2   root        1: /* Screen Conversion, VDI Res to 4Colour */
1.1       root        2: 
                      3: 
1.1.1.3 ! root        4: static void ConvertVDIRes_4Colour(void)
1.1       root        5: {
1.1.1.2   root        6:   Uint32 *edi, *ebp;
                      7:   Uint32 *esi;
1.1.1.3 ! root        8:   Uint32 eax, ebx, ecx;
        !             9:   int y, x;
1.1.1.2   root       10: 
                     11:   /* Get screen addresses, 'edi'-ST screen, 'ebp'-Previous ST screen, 'esi'-PC screen */
                     12:   edi = (Uint32 *)pSTScreen;          /* ST format screen 2-plane 4 colors */
                     13:   ebp = (Uint32 *)pSTScreenCopy;      /* Previous ST format screen */
                     14: 
1.1.1.3 ! root       15:   for (y = 0; y < VDIHeight; y++) {
        !            16: 
1.1.1.2   root       17:     esi = (Uint32 *)pPCScreenDest;    /* PC format screen, byte per pixel 256 colors */
                     18: 
1.1.1.3 ! root       19:     x = VDIWidth >> 4;             /* Amount to draw across - in 16-pixels (4 bytes) */
1.1.1.2   root       20: 
                     21:     do          /* x-loop */
                     22:     {
                     23:       /* Do 16 pixels at one time */
                     24:       ebx = *edi;
                     25: 
                     26:       if( (ScrUpdateFlag&0xe0000000) || ebx!=*ebp )  /* Update? */
                     27:          {
                     28:            bScreenContentsChanged = TRUE;
                     29: 
                     30:         /* Plot pixels */
                     31: #if SDL_BYTEORDER == SDL_BIG_ENDIAN
                     32:         MED_BUILD_PIXELS_0 ;          /* Generate 'ecx' as pixels [4,5,6,7] */
                     33:         PLOT_MED_640_8BIT(3) ;
                     34:         MED_BUILD_PIXELS_1 ;          /* Generate 'ecx' as pixels [12,13,14,15] */
                     35:         PLOT_MED_640_8BIT(1) ;
                     36:         MED_BUILD_PIXELS_2 ;          /* Generate 'ecx' as pixels [0,1,2,3] */
                     37:         PLOT_MED_640_8BIT(2) ;
                     38:         MED_BUILD_PIXELS_3 ;          /* Generate 'ecx' as pixels [8,9,10,11] */
                     39:         PLOT_MED_640_8BIT(0) ;
                     40: #else
                     41:         MED_BUILD_PIXELS_0 ;          /* Generate 'ecx' as pixels [4,5,6,7] */
                     42:         PLOT_MED_640_8BIT(1) ;
                     43:         MED_BUILD_PIXELS_1 ;          /* Generate 'ecx' as pixels [12,13,14,15] */
                     44:         PLOT_MED_640_8BIT(3) ;
                     45:         MED_BUILD_PIXELS_2 ;          /* Generate 'ecx' as pixels [0,1,2,3] */
                     46:         PLOT_MED_640_8BIT(0) ;
                     47:         MED_BUILD_PIXELS_3 ;          /* Generate 'ecx' as pixels [8,9,10,11] */
                     48:         PLOT_MED_640_8BIT(2) ;
                     49: #endif
                     50:       }
                     51: 
                     52:       esi += 4;                       /* Next PC pixels */
                     53:       edi += 1;                       /* Next ST pixels */
                     54:       ebp += 1;                       /* Next ST copy pixels */
                     55:     }
1.1.1.3 ! root       56:     while( --x );                  /* Loop on X */
1.1       root       57: 
1.1.1.3 ! root       58:     /* Offset to next line */
        !            59:     pPCScreenDest = (void *)(((Uint8 *)pPCScreenDest)+PCScreenBytesPerLine);
1.1       root       60:   }
                     61: }

unix.superglobalmegacorp.com

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