Annotation of hatari/src/convert/vdi16.c, revision 1.1.1.2

1.1.1.2 ! root        1: /* Screen Conversion, VDI Res to 16Colour */
1.1       root        2: 
                      3: void ConvertVDIRes_16Colour(void)
                      4: {
1.1.1.2 ! root        5:   Uint32 *edi, *ebp;
        !             6:   Uint32 *esi;
        !             7:   Uint32 eax, edx;
        !             8:   register Uint32 ebx, ecx;
        !             9: 
        !            10:   edx = eax = 0;
        !            11:   ScrY = 0;                             /* Starting line in ST screen */
        !            12: 
        !            13:   /* Get screen addresses, 'edi'-ST screen, 'ebp'-Previous ST screen,
        !            14:    * 'esi'-PC screen */
        !            15:   
        !            16:   edi = (Uint32 *)pSTScreen;        /* ST format screen 4-plane 16 colours */
        !            17:   ebp = (Uint32 *)pSTScreenCopy;    /* Previous ST format screen */
        !            18: 
        !            19:   do      /* y-loop */
        !            20:   {
        !            21:     esi = (Uint32 *)pPCScreenDest;   /* PC format screen, byte per pixel 256 colours */
        !            22: 
        !            23:     ScrX = VDIWidth >> 4;           /* Amount to draw across - in 16-pixels (8 bytes) */
        !            24: 
        !            25:     do          /* x-loop */
        !            26:     {
        !            27:       /* Do 16 pixels at one time */
        !            28:       ebx = *edi;
        !            29:       ecx = *(edi+1);
        !            30: 
        !            31:       /* Full update? or just test changes? */
        !            32:       if((ScrUpdateFlag&0xe0000000) || ebx!=*ebp || ecx!=*(ebp+1))  /* Does differ? */
        !            33:       {
        !            34:         bScreenContentsChanged = TRUE;
        !            35: 
        !            36: #if SDL_BYTEORDER == SDL_BIG_ENDIAN
        !            37:         /* Plot pixels */
        !            38:         LOW_BUILD_PIXELS_0 ;      /* Generate 'ecx' as pixels [4,5,6,7] */
        !            39:         PLOT_LOW_320_8BIT(3) ;
        !            40:         LOW_BUILD_PIXELS_1 ;      /* Generate 'ecx' as pixels [12,13,14,15] */
        !            41:         PLOT_LOW_320_8BIT(1) ;
        !            42:         LOW_BUILD_PIXELS_2 ;      /* Generate 'ecx' as pixels [0,1,2,3] */
        !            43:         PLOT_LOW_320_8BIT(2) ;
        !            44:         LOW_BUILD_PIXELS_3 ;      /* Generate 'ecx' as pixels [8,9,10,11] */
        !            45:         PLOT_LOW_320_8BIT(0) ;
        !            46: #else
        !            47:         /* Plot pixels */
        !            48:         LOW_BUILD_PIXELS_0 ;      /* Generate 'ecx' as pixels [4,5,6,7] */
        !            49:         PLOT_LOW_320_8BIT(1) ;
        !            50:         LOW_BUILD_PIXELS_1 ;      /* Generate 'ecx' as pixels [12,13,14,15] */
        !            51:         PLOT_LOW_320_8BIT(3) ;
        !            52:         LOW_BUILD_PIXELS_2 ;      /* Generate 'ecx' as pixels [0,1,2,3] */
        !            53:         PLOT_LOW_320_8BIT(0) ;
        !            54:         LOW_BUILD_PIXELS_3 ;      /* Generate 'ecx' as pixels [8,9,10,11] */
        !            55:         PLOT_LOW_320_8BIT(2) ;
        !            56: #endif
        !            57:       }
        !            58: 
        !            59:       esi += 4;                         /* Next PC pixels */
        !            60:       edi += 2;                         /* Next ST pixels */
        !            61:       ebp += 2;                         /* Next ST copy pixels */
        !            62:     }
        !            63:     while( --ScrX );                    /* Loop on X */
1.1       root       64: 
1.1.1.2 ! root       65:     pPCScreenDest = (void *)(((Uint8 *)pPCScreenDest)+PCScreenBytesPerLine);  /* Offset to next line */
1.1       root       66: 
1.1.1.2 ! root       67:     ScrY += 1;
1.1       root       68:   }
1.1.1.2 ! root       69:   while( ScrY < VDIHeight );      /* Loop on Y */
1.1       root       70: 
                     71: }
1.1.1.2 ! root       72: 

unix.superglobalmegacorp.com

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