|
|
1.1 ! root 1: // Screen Conversion, VDI Res to 4Colour ! 2: ! 3: void ConvertVDIRes_4Colour_YLoop(void); ! 4: void Line_ConvertVDIRes_4Colour(void); ! 5: ! 6: void ConvertVDIRes_4Colour(void) ! 7: { ! 8: fprintf(stderr,"FIXME: Screen Conversion, VDI Res to 4Colour\n"); ! 9: ! 10: /* FIXME */ ! 11: /* ! 12: __asm { ! 13: push ebp ! 14: push edi ! 15: push esi ! 16: push ebx ! 17: ! 18: xor edx,edx // Clear index for loop ! 19: ! 20: mov eax,0 ! 21: mov [ScrY],eax // Starting line in ST screen ! 22: ! 23: // Get screen addresses, 'edi'-ST screen, 'ebp'-Previous ST screen, 'esi'-PC screen ! 24: mov edi,[pSTScreen] // ST format screen 4-plane 16 colours ! 25: mov ebp,[pSTScreenCopy] // Previous ST format screen ! 26: mov esi,[pPCScreenDest] // PC format screen, byte per pixel 256 colours ! 27: ! 28: jmp ConvertVDIRes_4Colour_YLoop ! 29: } ! 30: */ ! 31: } ! 32: /* ! 33: NAKED void ConvertVDIRes_4Colour_YLoop(void) ! 34: { ! 35: __asm { ! 36: // Get screen addresses, 'edi'-ST screen, 'ebp'-Previous ST screen, 'esi'-PC screen ! 37: mov esi,[pPCScreenDest] // PC format screen, byte per pixel 256 colours ! 38: ! 39: jmp Line_ConvertVDIRes_4Colour // 0 palette same, can do check tests ! 40: } ! 41: } ! 42: NAKED void Line_ConvertVDIRes_4Colour(void) ! 43: { ! 44: __asm { ! 45: mov eax,[VDIWidth] // Amount to draw across ! 46: shr eax,4 // in 16-pixels(4 bytes) ! 47: mov [ScrX],eax ! 48: x_loop: ! 49: #ifdef TEST_SCREEN_UPDATE ! 50: mov WORD PTR [esi+0],0 ! 51: mov WORD PTR [esi+4],0 ! 52: mov WORD PTR [esi+8],0 ! 53: mov WORD PTR [esi+12],0 ! 54: mov WORD PTR [esi+16],0 ! 55: mov WORD PTR [esi+20],0 ! 56: mov WORD PTR [esi+24],0 ! 57: mov WORD PTR [esi+28],0 ! 58: #endif //TEST_SCREEN_UPDATE ! 59: ! 60: // Do 16 pixels at one time ! 61: mov ebx,[edi] ! 62: // Full update? or just test changes? ! 63: test [ScrUpdateFlag],0xe0000000 ! 64: jne copy_word // Force ! 65: // Does differ? ! 66: cmp ebx,[ebp] ! 67: je next_word // Pixels are same as last frame, so ignore ! 68: ! 69: copy_word: ! 70: mov [bScreenContentsChanged],TRUE ! 71: ! 72: // Plot pixels ! 73: MED_BUILD_PIXELS_0 // Generate 'ecx' as pixels [4,5,6,7] ! 74: PLOT_MED_640_8BIT(4) ! 75: MED_BUILD_PIXELS_1 // Generate 'ecx' as pixels [12,13,14,15] ! 76: PLOT_MED_640_8BIT(12) ! 77: MED_BUILD_PIXELS_2 // Generate 'ecx' as pixels [0,1,2,3] ! 78: PLOT_MED_640_8BIT(0) ! 79: MED_BUILD_PIXELS_3 // Generate 'ecx' as pixels [8,9,10,11] ! 80: PLOT_MED_640_8BIT(8) ! 81: ! 82: next_word: ! 83: add esi,16 // Next PC pixels ! 84: add edi,4 // Next ST pixels ! 85: add ebp,4 // Next ST copy pixels ! 86: ! 87: dec [ScrX] ! 88: jne x_loop // Loop on X ! 89: ! 90: mov eax,[pPCScreenDest] ! 91: add eax,[PCScreenBytesPerLine] // Offset to next line ! 92: mov [pPCScreenDest],eax ! 93: ! 94: inc [ScrY] ! 95: mov eax,[VDIHeight] ! 96: cmp [ScrY],eax ! 97: jne ConvertVDIRes_4Colour_YLoop // And on Y ! 98: ! 99: pop ebx ! 100: pop esi ! 101: pop edi ! 102: pop ebp ! 103: ! 104: ret ! 105: } ! 106: } ! 107: */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.